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


Groups > linux.kernel > #1701023 > unrolled thread

Re: [PATCH 04/11] fbdev: da8xx-fb: Drop unnecessary static

Started byBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
First post2017-08-01 15:20 +0200
Last post2017-08-01 15:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 04/11] fbdev: da8xx-fb: Drop unnecessary static Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2017-08-01 15:20 +0200

#1701023 — Re: [PATCH 04/11] fbdev: da8xx-fb: Drop unnecessary static

FromBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Date2017-08-01 15:20 +0200
SubjectRe: [PATCH 04/11] fbdev: da8xx-fb: Drop unnecessary static
Message-ID<u9FfA-4tk-17@gated-at.bofh.it>
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/)
> 
> // <smpl>
> @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;
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

Patch queued for 4.14, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web