Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp940605imu; Wed, 23 Jan 2019 08:14:37 -0800 (PST) X-Google-Smtp-Source: ALg8bN4zkKQ5i/1hTR4/Jydc8UKQNK6fWrFynF0a09wvsTn2WyKPNdOhJStFE6fdTAf+R9AYhMb1 X-Received: by 2002:a63:5518:: with SMTP id j24mr2437666pgb.208.1548260077325; Wed, 23 Jan 2019 08:14:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548260077; cv=none; d=google.com; s=arc-20160816; b=XjvHFi9/nhcy+l/N4gxKBFk3rPkZUOcJSojp2HsAfN11dno7XVV7A55AnHw6E89Wlz s7l9am+Vk1Lz9wAH/jDX0Ikeymek1f9wRUiC4NIHmmRdcmX4zB0NZjS7Ai2t8LNZlZ7t vYOOAb85utexwAWA+ClvDViQ8rZvCw8yH0gt9ZFtal9bCHvxYsUmR3P6b//y3lP+fvzX 3PrUcwYLRoofk8cK3N4+S9VA5R+lGbVOyeQ0FQ/HzyHtvl4era+aVW67l7fMeh12Etbw yRl292hwEH4EAVFC3BPxu10yIOuuzroCeX1BCBAgZUheev2VILIQRtr5dqzLFzfIoMPu 2v0w== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=2lJs6KZUlKzXCnyp12rxk610mifbXCkwmrcMc+1WLcQ=; b=UBJLMCXbv0cAkyo1eLHNnNhcXuZdcALODEzdv7Bsx1Fb3o77sBHwdrV1+hLXYNtTmI 5JdixBdTE4jV2PfDhw+WYhJbzw4EIdUjcY7jcrz7gsEz8VwEQWocX/7WsiIl4kf5B/CX NBZxqkbk77U9AtNJkfiGSS4XixSBZNckMloUPmz6J8tigiorz1H4A6mwvK07cSngzNlR qy5PgT3l1h46Jj9E0YNolnJyVKr9cuwVUNpCe7KMnu4LzurYwb49DCE815Gz9zAGWIg8 EnSe6Alrde71dwKRp9BsYuP8M4aKpA6esZ9UmKH/gvMhJa+m3G0KSaq06/u2Ta40EvXF 9Hcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=QOlS0Cs0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 n184si20062962pgn.95.2019.01.23.08.14.19; Wed, 23 Jan 2019 08:14:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=QOlS0Cs0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726214AbfAWQNK (ORCPT + 99 others); Wed, 23 Jan 2019 11:13:10 -0500 Received: from mail-ot1-f67.google.com ([209.85.210.67]:32777 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725994AbfAWQNK (ORCPT ); Wed, 23 Jan 2019 11:13:10 -0500 Received: by mail-ot1-f67.google.com with SMTP id i20so2413415otl.0 for ; Wed, 23 Jan 2019 08:13:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=2lJs6KZUlKzXCnyp12rxk610mifbXCkwmrcMc+1WLcQ=; b=QOlS0Cs0XaYTw91TNji89nAwkWFI4H4eaDUoaXADD8zzI4cDtLjzNbqlM2VCbIlyEF +bEaNUbGdg4GP+Fkk99qIxyoE2qkWq6xN7OAqIjaf6xbXjxCtKLzU2EUqIUuhIfM2fUL xr7E4EI23HPpn1a4wRWXkjRPVdrMmV9AUy+YYLsqY1CfeSUP0Y9rBzd+a21Pl4Ag7LHE 2dA/kmNAJwND5O9x7QaklvXESwgNxN+DxC2EW6NQRM50+y+NTiHjCkCmvHGBWxySSxQy VLTPN1UShvaJI4bPWsDjzYN5LcotyJOFcQX6wPaMGLwOn6AumFJ6le8aSlvY0FybFqYm DCkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=2lJs6KZUlKzXCnyp12rxk610mifbXCkwmrcMc+1WLcQ=; b=PYULQZeXv2wFp3LnPBSB1NWOlCiGoTEA+zQkw3ndbKsKek5F6ooUJvVOXYwwgCsp6n XGlsok3AodD6aH+ByEXCI9fE6LNgw0rE8yziTimh0QZjV3imK6Cvd2mG1NCw4RCd/3Rp PwADz6CEuE7ZXr5CFH+11pqf2PUtI6B8sCU8Zoqgjo/dJNFTTrT3tH1SRE/fb5FYYaZA 023daQXEIbt9bU5v26mH14+RoOqXHdlzVMumQosZpD7SzfExsd6wLEqqXlNTvmdYMSgP HMVbeme7c1lSCXL/lXuaw7wpXSNxsSBHhLZ5rcoRq7bVAHlIcliBV7h7/Hpcg3FVCi1k UZ4w== X-Gm-Message-State: AJcUukdy5J213DuDKGNugPgO3Y+nWbCtTWUrRrdjzcknHU7lxVYOpnrI Tl+gIXyCLAB0li9Z9CZ4PvZAAvd1QTI6w0/HMiOopQ== X-Received: by 2002:a9d:635a:: with SMTP id y26mr1722083otk.27.1548259989295; Wed, 23 Jan 2019 08:13:09 -0800 (PST) MIME-Version: 1.0 References: <20190123084912.13376-1-yuehaibing@huawei.com> In-Reply-To: From: Bartosz Golaszewski Date: Wed, 23 Jan 2019 17:12:58 +0100 Message-ID: Subject: Re: [PATCH -next] gpio: davinci: drop pointless static qualifier To: Keerthy Cc: YueHaibing , Linus Walleij , LKML , linux-gpio Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org =C5=9Br., 23 sty 2019 o 11:32 Keerthy napisa=C5=82(a): > > On 23/01/19 2:19 PM, YueHaibing wrote: > > There is no need to have the 'gpio_unbanked' variable static since > > new value always be assigned before use it. > > Acked-by: Keerthy > > > > > Signed-off-by: YueHaibing > > --- > > drivers/gpio/gpio-davinci.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c > > index bdb29e5..f250454 100644 > > --- a/drivers/gpio/gpio-davinci.c > > +++ b/drivers/gpio/gpio-davinci.c > > @@ -465,7 +465,7 @@ static const struct irq_domain_ops davinci_gpio_irq= _ops =3D { > > > > static struct irq_chip *davinci_gpio_get_irq_chip(unsigned int irq) > > { > > - static struct irq_chip_type gpio_unbanked; > > + struct irq_chip_type gpio_unbanked; > > > > gpio_unbanked =3D *irq_data_get_chip_type(irq_get_irq_data(irq)); > > > > @@ -474,7 +474,7 @@ static struct irq_chip *davinci_gpio_get_irq_chip(u= nsigned int irq) > > > > static struct irq_chip *keystone_gpio_get_irq_chip(unsigned int irq) > > { > > - static struct irq_chip gpio_unbanked; > > + struct irq_chip gpio_unbanked; > > > > gpio_unbanked =3D *irq_get_chip(irq); > > return &gpio_unbanked; > > > Good catch! While it would probably never result in a race condition as it is always called from probe(), it's still wrong so patch applied. Thanks, Bart