Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1701023 > unrolled thread
| Started by | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> |
|---|---|
| First post | 2017-08-01 15:20 +0200 |
| Last post | 2017-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.
Re: [PATCH 04/11] fbdev: da8xx-fb: Drop unnecessary static Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2017-08-01 15:20 +0200
| From | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> |
|---|---|
| Date | 2017-08-01 15:20 +0200 |
| Subject | Re: [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
Back to top | Article view | linux.kernel
csiph-web