From patchwork Sun Jun 9 14:55:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 166224 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp2947259ili; Sun, 9 Jun 2019 07:55:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqx3arj6rWzRVb2xTPSy1N2K/0Wr+HVIvJmGbTD0gV58ONGAvZLAiZBD+X1AbKCpDhDMFn8I X-Received: by 2002:a62:8643:: with SMTP id x64mr34277531pfd.7.1560092157945; Sun, 09 Jun 2019 07:55:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560092157; cv=none; d=google.com; s=arc-20160816; b=lysgCqZTxARwz+ZWqJWLlePRHUaYAypf3SdCUz09W58WGPbAngJYWB7DwdS36PIwsA +r6EiE0FvUke8bT8E7o2AJMrHhmzoxmoFMHV2+jIEBnh53Ah4X8pYVI3Lat+QdqtH293 wttmV1V6ujOwP8VH+Ok7/fdu5Hb3OTldBlkOmep66yhT5OmIXG99ozNiHHN9/0yeTLhN V9kFPV8rzj4uzA5rb4e2xzpKKnt1qzQjGbJ/tYseyF3sT4hJqgv9DwSibYGtv4VA8gxA QJXI2WN2dP8vzNwCJneSzCMtmMfjPhZoapi/5QogT0pLpn1yjoTq2iXXaarDjeG/RgeX qyiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=jtnoBODgvgkIn+oPvGbtw8+xb1I0SA+CgwTYY6nRBaI=; b=rN2+yvavb3GZt5/VTXglG0Icba6z4S18JDg5oTBlqv8UqX6WjmdsxFnw3N6WpmuCEX B+7RmIKoyX3gBOMZe2g3kkNbQmxXXsFSg1zLI3Iwbh5KPVtcMoPmIwf9MIqw+c8TVBVY 5FHeLe+nW8KWo+psFL8HO7kWi2E3zai4uqF8MQrm/DaHGwKp7ljx0KNKBM1iaBecMZUB r314dCryEZlq7x/On27sTNL7+v2nANufpA7BQVXFR2dokgm+ML+w9diINWJYfOJdEAyX 1E+wgzprSqFn3QEdK37dTgrFH79ndj5qmYVscFUWLF+vGSiOvmcQ7I2Iqfp7EPz9cSsD /4xQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=LAwvOwB9; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m20si7789587pjn.40.2019.06.09.07.55.57; Sun, 09 Jun 2019 07:55:57 -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=@nifty.com header.s=dec2015msa header.b=LAwvOwB9; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728635AbfFIOz5 (ORCPT + 5 others); Sun, 9 Jun 2019 10:55:57 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:37440 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728634AbfFIOz5 (ORCPT ); Sun, 9 Jun 2019 10:55:57 -0400 Received: from grover.flets-west.jp (softbank126125154139.bbtec.net [126.125.154.139]) (authenticated) by conuserg-09.nifty.com with ESMTP id x59EtdRI010736; Sun, 9 Jun 2019 23:55:39 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com x59EtdRI010736 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1560092140; bh=jtnoBODgvgkIn+oPvGbtw8+xb1I0SA+CgwTYY6nRBaI=; h=From:To:Cc:Subject:Date:From; b=LAwvOwB9hQSm+WPfhtyUDAMhWJPyJL+CTqLeX5Vs3p7o9E5MHva6iLrHb/E3ZrLh0 ikQaaueHxQMqjfVY8J0bUOSgG2U3Y9DVbHf/37TogbHCAAWBL7dnuY0kxpwpkq6DgB dyhjHDiI20t4keuvQr9mYfirRKNNzWuFdIKbaRpluqPXPzRKNzDX3Pzptxme8QfRY0 gazeIlAqU4xXGM32SPx1sCPTbQLXSHzQyHxI9uG/52NZ8NOUAlkdtcULt2F5r0nbzA Z/hSR84o4YTD9PKoXn4aUhMrNdBHiIuJB003dIBUojge326iIyUyspOyVl7Sj5PsKW p97Pvh5hek8VA== X-Nifty-SrcIP: [126.125.154.139] From: Masahiro Yamada To: linux-gpio@vger.kernel.org, Linus Walleij Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH] pinctrl: remove unneeded initializer for list_for_each_entry() iterator Date: Sun, 9 Jun 2019 23:55:37 +0900 Message-Id: <20190609145537.7953-1-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The iterator is initialized in list_for_each_entry(). Signed-off-by: Masahiro Yamada --- drivers/pinctrl/core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.17.1 diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index aeba6366fb13..15b680507867 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c @@ -98,7 +98,7 @@ EXPORT_SYMBOL_GPL(pinctrl_dev_get_drvdata); */ struct pinctrl_dev *get_pinctrl_dev_from_devname(const char *devname) { - struct pinctrl_dev *pctldev = NULL; + struct pinctrl_dev *pctldev; if (!devname) return NULL; @@ -288,7 +288,7 @@ static inline int gpio_to_pin(struct pinctrl_gpio_range *range, static struct pinctrl_gpio_range * pinctrl_match_gpio_range(struct pinctrl_dev *pctldev, unsigned gpio) { - struct pinctrl_gpio_range *range = NULL; + struct pinctrl_gpio_range *range; mutex_lock(&pctldev->mutex); /* Loop over the ranges */ @@ -368,7 +368,7 @@ static int pinctrl_get_device_gpio_range(unsigned gpio, struct pinctrl_dev **outdev, struct pinctrl_gpio_range **outrange) { - struct pinctrl_dev *pctldev = NULL; + struct pinctrl_dev *pctldev; mutex_lock(&pinctrldev_list_mutex); @@ -1642,7 +1642,7 @@ DEFINE_SHOW_ATTRIBUTE(pinctrl_groups); static int pinctrl_gpioranges_show(struct seq_file *s, void *what) { struct pinctrl_dev *pctldev = s->private; - struct pinctrl_gpio_range *range = NULL; + struct pinctrl_gpio_range *range; seq_puts(s, "GPIO ranges handled:\n");