From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752031AbdHCVpy (ORCPT ); Thu, 3 Aug 2017 17:45:54 -0400 Received: from gateway23.websitewelcome.com ([192.185.50.250]:21671 "EHLO gateway23.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751599AbdHCVpx (ORCPT ); Thu, 3 Aug 2017 17:45:53 -0400 Subject: Re: [PATCH] soc: integrator: remove unnecessary static in integrator_soc_init() To: Linus Walleij References: <20170719223908.GA14716@embeddedgus> Cc: "linux-kernel@vger.kernel.org" From: "Gustavo A. R. Silva" Message-ID: <68ad9e17-c5cc-2c5c-461d-450ab2af4db3@embeddedor.com> Date: Thu, 3 Aug 2017 16:45:47 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: 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: X-Source-Args: X-Source-Dir: 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: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > 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 > > Acked-by: Linus Walleij > > 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