From patchwork Wed May 28 07:16:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 31035 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f70.google.com (mail-pa0-f70.google.com [209.85.220.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 49617203C3 for ; Wed, 28 May 2014 07:16:48 +0000 (UTC) Received: by mail-pa0-f70.google.com with SMTP id kp14sf2450301pab.5 for ; Wed, 28 May 2014 00:16:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=sqGlh7r/qqsdDRiEqJuObm9rE7OspQzKCsvp/Jz4EhA=; b=nIPaRRzKp73Oi0ICsT3eB8Ljwk2K8QV1LpiCznRnmMGY9yH47lyxaB8Vb8PD42LEY5 rydhW+5vBg1Lk4b/Y93yP6yeqQodeGBmZQT3eQv6SwNhZWeztq4stSdV9h5hlVujCtxq 4USGIVBqvWyK2PcTkcvM4dbsvBFQk7tMiUkDfuLUE7FU2jP3lgyI8EpE5aMKtNqDOFkx s2cVvXTUfU4hJ8HZbUhprwC2Y8lZnouPACI62T4HHgr5trXjV2m8HcJrMLgyRG11OLXT 42JqbTpHjt+kGjFox6o3NR0LYATQoYcYrXzH3Kof9nl2xPEwvFpmsESVQmlgoXjX4COg +G7w== X-Gm-Message-State: ALoCoQk2ApPPL3oDiEhsHON5mxnliD333PR+HLlijj3NXkVqJRKYvZjvW2s9fR3of70DsNnPL7Hf X-Received: by 10.66.162.165 with SMTP id yb5mr15684434pab.2.1401261407583; Wed, 28 May 2014 00:16:47 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.47.82 with SMTP id l76ls3410522qga.61.gmail; Wed, 28 May 2014 00:16:47 -0700 (PDT) X-Received: by 10.58.123.71 with SMTP id ly7mr32003013veb.11.1401261407428; Wed, 28 May 2014 00:16:47 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id ty10si3052540vdc.73.2014.05.28.00.16.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 28 May 2014 00:16:47 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.169 as permitted sender) client-ip=209.85.220.169; Received: by mail-vc0-f169.google.com with SMTP id ij19so11861955vcb.14 for ; Wed, 28 May 2014 00:16:47 -0700 (PDT) X-Received: by 10.58.100.244 with SMTP id fb20mr44068veb.39.1401261407339; Wed, 28 May 2014 00:16:47 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp179197vcb; Wed, 28 May 2014 00:16:47 -0700 (PDT) X-Received: by 10.68.200.133 with SMTP id js5mr43848563pbc.138.1401261406840; Wed, 28 May 2014 00:16:46 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id px17si22354254pab.171.2014.05.28.00.16.46; Wed, 28 May 2014 00:16:46 -0700 (PDT) Received-SPF: none (google.com: linux-gpio-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754014AbaE1HQo (ORCPT + 1 other); Wed, 28 May 2014 03:16:44 -0400 Received: from mail-wg0-f41.google.com ([74.125.82.41]:47907 "EHLO mail-wg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751873AbaE1HQn (ORCPT ); Wed, 28 May 2014 03:16:43 -0400 Received: by mail-wg0-f41.google.com with SMTP id z12so10779876wgg.24 for ; Wed, 28 May 2014 00:16:42 -0700 (PDT) X-Received: by 10.180.186.8 with SMTP id fg8mr46038925wic.39.1401261402211; Wed, 28 May 2014 00:16:42 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id l5sm40997086wja.12.2014.05.28.00.16.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 May 2014 00:16:41 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Alexandre Courbot , Linus Walleij , Michael Stickel Subject: [PATCH] gpio: mcp23s08: switch chip count to int Date: Wed, 28 May 2014 09:16:38 +0200 Message-Id: <1401261398-29794-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.9.3 Sender: linux-gpio-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-gpio@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.169 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Commit 3e3bed913e8bbd78f38cefd5d575475f45c05dd0 "gpio: mcp23s08: fixed count variable for devicetree probing" introduced a loop check to see if the number of chips were unconsistent and going below zero counting downwards, but this requires the counting variable to be able to be negative, so switch the variable from unsigned to int. Cc: Michael Stickel Signed-off-by: Linus Walleij --- drivers/gpio/gpio-mcp23s08.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-mcp23s08.c b/drivers/gpio/gpio-mcp23s08.c index 00fbb30b9b10..f3bee370bcf2 100644 --- a/drivers/gpio/gpio-mcp23s08.c +++ b/drivers/gpio/gpio-mcp23s08.c @@ -867,7 +867,7 @@ static int mcp23s08_probe(struct spi_device *spi) { struct mcp23s08_platform_data *pdata; unsigned addr; - unsigned chips = 0; + int chips = 0; struct mcp23s08_driver_data *data; int status, type; unsigned base = -1,