From patchwork Tue Jul 16 11:58:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 169054 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp751951ilk; Tue, 16 Jul 2019 04:58:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqyKEO5jQvD7/tbRteNKjWwCD0seeL1QFO+L/d0ypM4QL5O12hL3zp/8TdZu2aXJp2TxqA/n X-Received: by 2002:a65:42c3:: with SMTP id l3mr32889190pgp.372.1563278339535; Tue, 16 Jul 2019 04:58:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563278339; cv=none; d=google.com; s=arc-20160816; b=fLK4+135b4dL+eidPRC3BuLsTYOU10fnaUF5dgYHSrdZokikVt2gtF2x8laf7X6n+q rXpyOvJu0pFKROQHatfr/16oDd4LXtXWHvTn7J9kZPjyHj4iBwWpmklj2NK7u85X/YtB mz3Uoveq/rJseNHG3MO2Ew3kDQvdVyT0ICURtWvp25N8ckxyZ30BnIPn2rzkIHGBPgi+ ZOHstPq9lNVLrAoAjv6DuIdPtWLdkZLYtbH8A9vduI50EkTR8fRBncxqK6M3LTgwuamq mokxMNLsmi5t3/0hAz3xX3WECpVVGbc9uxKPjCA44TIqnIpb5QHq77DhdoFqZn4Dchhp kITw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=gkc1jh95nH4uGus8z54x8VuUUo1FvsfXXyLOz9roJ1M=; b=Wi/wZ2qYHFO666WPdtD35tQsWi1Gky0RofLjE4t5c0mcUdAB4v3orZJOKKEFa4quwV eSzEK116pkfi9aSGnI/tp4pcdASbud2rNHEC2Q95HFP8AOZRviYgZR96m2A3CgC9/eKw 8v4sW3l7bfDuyag6hKQcUbLKfDWOxPO/uNT9AZSqcxfWfEULB+Mf7QKKtiQhqzr6AIDC CcDSLd8B5tH9rE/Ipgwpt9QfZTmhmjNNG6e9jBKDXRJOaU5cKlwSWxOtOlVp/OhMUyI1 M6a93AYwO2cDx97zBXrmh6ZA+IKd3KmXza3eaF0xGKFaMCvmB7xM9Gc8oVBJHSA+QTX7 kGNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=POnvnwED; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x1si18076628pjq.98.2019.07.16.04.58.59; Tue, 16 Jul 2019 04:58:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=POnvnwED; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728004AbfGPL67 (ORCPT + 5 others); Tue, 16 Jul 2019 07:58:59 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:37930 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727796AbfGPL66 (ORCPT ); Tue, 16 Jul 2019 07:58:58 -0400 Received: by mail-lf1-f66.google.com with SMTP id h28so13487367lfj.5 for ; Tue, 16 Jul 2019 04:58:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gkc1jh95nH4uGus8z54x8VuUUo1FvsfXXyLOz9roJ1M=; b=POnvnwEDfT8XQ8UCwYrg2njlc66GKHcwNkunnk28IsHNUl0/+iKJ3+FeTlEBzNPerJ kbaxYF2uot0fwUO/wdb6d2ygQGwzW5q1Syj6vt2k//L/2jo8691cz/SoaVhy1eyTvDsN nVD3coRsD7PfeHQh+gAhRpWrHW+D+3Zm6BsyPGS/HHal2ZttBtrWw0v2P48V/YE2TkYs 1He2GJ3o3rR7E11/rUqTBOJCMQD1H32us4Y5YxMUcMskW44Er9PVYDHBpo3F7knA8HCl KOmiNQ/hDMIJjEgT+XRrkMcHkoamsEk27ctF/7d3h3dseb7/oZm7TiuUACKH4wqkQuCj byDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gkc1jh95nH4uGus8z54x8VuUUo1FvsfXXyLOz9roJ1M=; b=cHcRj+bCHPlLftjKubatqy2ddZxpzag5RnngN3YBGWMGv2YHE8kjLJioWCp+/P9VRc lFGgxUwvNhLNeloBZwcpbjs6Xj6duI3EiZLgNRsZ1W99ezwO8/wjkV4gJi6FP3gESZOq mUW7x5nHB0eXXHYIm5/lr7FsdNo1w0UwDUGgOBNGk0e/Sa1Rd4z3RY8mXEIUS8pfzUHD 0OxXcmBRViuT5atqDBaK0TPquGf1MHua7VYShtfWfPG39MgAEYB3zGJsFvoGW33+3xcQ JResyyjY5UsnWk3iLTOruxCEZng9WKjIa9UlTxzp7YJOnhvTKfzh0pVd8OB+Wx6vyMJL WZkg== X-Gm-Message-State: APjAAAXarBnHnlWamBWrA7aeea9V4CmH31V7SzoqXSwc0fwK2sAwv2Qb 6dBhlVVDZmT6dBtS7ztwCpVsvXumpuA= X-Received: by 2002:ac2:518d:: with SMTP id u13mr14567102lfi.40.1563278336909; Tue, 16 Jul 2019 04:58:56 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id o17sm3723706ljg.71.2019.07.16.04.58.55 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 16 Jul 2019 04:58:55 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Bartosz Golaszewski , Linus Walleij Subject: [PATCH] gpio: of: Normalize return code variable name Date: Tue, 16 Jul 2019 13:58:54 +0200 Message-Id: <20190716115854.12098-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org It is confusing to name return variables mixedly "status", "err" or "ret". I just changed them all to "ret", by personal preference, to lower cognitive stress. Signed-off-by: Linus Walleij --- drivers/gpio/gpiolib-of.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) -- 2.21.0 diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index f974075ff00e..2bc0bcd7a410 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -740,7 +740,7 @@ static int of_gpiochip_add_pin_range(struct gpio_chip *chip) { return 0; } int of_gpiochip_add(struct gpio_chip *chip) { - int status; + int ret; if (!chip->of_node) return 0; @@ -755,9 +755,9 @@ int of_gpiochip_add(struct gpio_chip *chip) of_gpiochip_init_valid_mask(chip); - status = of_gpiochip_add_pin_range(chip); - if (status) - return status; + ret = of_gpiochip_add_pin_range(chip); + if (ret) + return ret; /* If the chip defines names itself, these take precedence */ if (!chip->names) @@ -766,13 +766,13 @@ int of_gpiochip_add(struct gpio_chip *chip) of_node_get(chip->of_node); - status = of_gpiochip_scan_gpios(chip); - if (status) { + ret = of_gpiochip_scan_gpios(chip); + if (ret) { of_node_put(chip->of_node); gpiochip_remove_pin_ranges(chip); } - return status; + return ret; } void of_gpiochip_remove(struct gpio_chip *chip)