Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1703453

Re: [PATCH] soc: integrator: remove unnecessary static in integrator_soc_init()

Path csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Newsgroups linux.kernel
Subject Re: [PATCH] soc: integrator: remove unnecessary static in integrator_soc_init()
Date Thu, 03 Aug 2017 23:50:02 +0200
Message-ID <uawae-5UG-37@gated-at.bofh.it> (permalink)
References <u55No-6BP-11@gated-at.bofh.it> <ua0tH-Vn-5@gated-at.bofh.it>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0
MIME-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
X-Antiabuse This header was added to track abuse, please include it with any abuse report
X-Antiabuse Primary Hostname - gator4166.hostgator.com
X-Antiabuse Original Domain - vger.kernel.org
X-Antiabuse Originator/Caller UID/GID - [47 12] / [47 12]
X-Antiabuse Sender Address Domain - embeddedor.com
X-Bwhitelist no
X-Source-IP 189.152.228.197
X-Exim-ID 1ddNwF-001abT-Pt
X-Source-Sender ([192.168.1.208]) [189.152.228.197]:34526
X-Source-Auth gustavo@embeddedor.com
X-Email-Count 2
X-Source-Cap Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20=
X-Local-Domain yes
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 49
Organization linux.* mail to news gateway
X-Original-Cc "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
X-Original-Date Thu, 3 Aug 2017 16:45:47 -0500
X-Original-Message-ID <68ad9e17-c5cc-2c5c-461d-450ab2af4db3@embeddedor.com>
X-Original-References <20170719223908.GA14716@embeddedgus> <CACRpkdb=tu86y4HHNbQMw5USFqdxq74cm5pdxdBwQfpRQJbKGw@mail.gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1703453

Show key headers only | View raw


Hi Linus,

On 08/02/2017 06:58 AM, Linus Walleij wrote:
> On Thu, Jul 20, 2017 at 12:39 AM, Gustavo A. R. Silva
> <gustavo@embeddedor.com> wrote:
>
>> Remove unnecessary static on local variable syscon_regmap.
>> Such variables are initialized before being used, on every
>> execution path throughout the functions. So, the static has
>> no benefit.
>>
>> This issue was detected using Coccinelle and the following
>> semantic patch:
>>
>> @bad exists@
>> position p;
>> identifier x;
>> type T;
>> @@
>>
>> static T x@p;
>> ...
>> x = <+...x...+>
>>
>> @@
>> identifier x;
>> expression e;
>> type T;
>> position p != bad.p;
>> @@
>>
>> -static
>>  T x@p;
>>  ... when != x
>>      when strict
>> ?x = e;
>>
>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
>
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
>
> You probably want to funnel this patch through the ARM SoC tree.
>

I'll do that. I'll add your ACK and CC you.

Thanks
-- 
Gustavo A. R. Silva

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Re: [PATCH] soc: integrator: remove unnecessary static in integrator_soc_init() Linus Walleij <linus.walleij@linaro.org> - 2017-08-02 14:00 +0200
  Re: [PATCH] soc: integrator: remove unnecessary static in  integrator_soc_init() "Gustavo A. R. Silva" <gustavo@embeddedor.com> - 2017-08-03 23:50 +0200

csiph-web