Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752179AbdGRBbF (ORCPT ); Mon, 17 Jul 2017 21:31:05 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:53426 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751617AbdGRBbD (ORCPT ); Mon, 17 Jul 2017 21:31:03 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 5731B611B8 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sboyd@codeaurora.org Date: Mon, 17 Jul 2017 18:31:01 -0700 From: Stephen Boyd To: Julia Lawall Cc: Michael Turquette , keescook@chromium.org, kernel-janitors@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 02/11] clk: moxart: Drop unnecessary static Message-ID: <20170718013101.GA17424@codeaurora.org> References: <1500149266-32357-1-git-send-email-Julia.Lawall@lip6.fr> <1500149266-32357-3-git-send-email-Julia.Lawall@lip6.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1500149266-32357-3-git-send-email-Julia.Lawall@lip6.fr> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 796 Lines: 40 On 07/15, Julia Lawall wrote: > Drop static on a local variable, when the variable is initialized before > any possible use. Thus, the static has no benefit. > > The semantic patch that fixes this problem is as follows: > (http://coccinelle.lip6.fr/) > > // > @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: Julia Lawall > > --- > These patches are all independent of each other. Already got this one a few days earlier. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project