Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751928AbdHANKE (ORCPT ); Tue, 1 Aug 2017 09:10:04 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:54624 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751115AbdHANKC (ORCPT ); Tue, 1 Aug 2017 09:10:02 -0400 X-AuditID: b6c32a45-f79466d000002ac6-4a-59807da88a8f From: Bartlomiej Zolnierkiewicz To: Julia Lawall Cc: keescook@chromium.org, kernel-janitors@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 04/11] fbdev: da8xx-fb: Drop unnecessary static Date: Tue, 01 Aug 2017 15:09:57 +0200 Message-id: <2086929.avP79hnAKk@amdc3058> User-Agent: KMail/4.13.3 (Linux/3.13.0-96-generic; KDE/4.13.3; x86_64; ; ) In-reply-to: <1500149266-32357-5-git-send-email-Julia.Lawall@lip6.fr> MIME-version: 1.0 Content-transfer-encoding: 7Bit Content-type: text/plain; charset="us-ascii" X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrNIsWRmVeSWpSXmKPExsWy7bCmqe6K2oZIg5Z7fBbLHpxmtDjTnWux 9Za0xYm+D6wWl3fNYXNg9ZjdcJHFY++WLI/Pm+QCmKO4bFJSczLLUov07RK4Ms7svMxe0MFW cWdXN1MD40mWLkZODgkBE4lLPy+wQ9hiEhfurWfrYuTiEBLYwSjRdOQiI4TzmVFiy6WXbDAd M29fQKg6+PcTM4TzlVFi3qYzYHPZBKwkJravYgSxRQTUJVo37AKzmQXKJXZfP8/axcjBISzg LPH1XhBImEVAVWLOjVNgC3gFNCVO/7nBBGKLCnhJbNnXDmZzCrhKbJ3UAlUjKPFj8j0WiJHy Evv2T2WFsHUkzh5bB3a1hEAzu8Tufw/ZQXZJCMhKbDrADPGAi8SnpROhXhaWeHV8C5QtJdHd MQvKns4osf23BMSczYwSq3ZPgEpYSxw+fhFq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p1QD42lL/y7dE8Y7tx74 29x2urAk1rFsw0mep9sWHl0i7LP//xu3Jfw/Cy/8iiifyv98997bQiu3Prnlnxbvdjj9rLQI +/XVzEofr3/R8Zlo/ff0nUTlChf7tOjWrcyPOrN3yJ/dcfXPzQdRDRwMv+s1A7uW9/4++T3j 7mF1wYlPfta9+6wSvWDOniwlluKMREMt5qLiRADXA7p9rwIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170801130959epcas2p1c3ac8f64f86b9fe131cbff01585919e3 X-Msg-Generator: CA X-Sender-IP: 182.195.42.80 X-Local-Sender: =?UTF-8?B?QmFydGxvbWllaiBab2xuaWVya2lld2ljehtTUlBPTC1LZXJu?= =?UTF-8?B?ZWwgKFRQKRvsgrzshLHsoITsnpAbU2VuaW9yIFNvZnR3YXJlIEVuZ2luZWVy?= X-Global-Sender: =?UTF-8?B?QmFydGxvbWllaiBab2xuaWVya2lld2ljehtTUlBPTC1LZXJu?= =?UTF-8?B?ZWwgKFRQKRtTYW1zdW5nIEVsZWN0cm9uaWNzG1NlbmlvciBTb2Z0d2FyZSBF?= =?UTF-8?B?bmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjczOTI=?= CMS-TYPE: 102P X-CMS-RootMailID: 20170715203255epcas2p40497b7388043ff9ec488a3f0fbbdf63f X-RootMTR: 20170715203255epcas2p40497b7388043ff9ec488a3f0fbbdf63f References: <1500149266-32357-1-git-send-email-Julia.Lawall@lip6.fr> <1500149266-32357-5-git-send-email-Julia.Lawall@lip6.fr> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 735 Lines: 39 On Saturday, July 15, 2017 10:07:39 PM 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 Patch queued for 4.14, thanks. Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics