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


Groups > linux.kernel > #1695032 > unrolled thread

Re: [PATCH 07/11] mfd: Drop unnecessary static

Started byPavel Machek <pavel@ucw.cz>
First post2017-07-24 21:30 +0200
Last post2017-07-25 00:30 +0200
Articles 2 — 2 participants

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 07/11] mfd: Drop unnecessary static Pavel Machek <pavel@ucw.cz> - 2017-07-24 21:30 +0200
    Re: [PATCH 07/11] mfd: Drop unnecessary static Kees Cook <keescook@chromium.org> - 2017-07-25 00:30 +0200

#1695032 — Re: [PATCH 07/11] mfd: Drop unnecessary static

FromPavel Machek <pavel@ucw.cz>
Date2017-07-24 21:30 +0200
SubjectRe: [PATCH 07/11] mfd: Drop unnecessary static
Message-ID<u6Rdg-OM-15@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Hi!

> > > Drop static on a local variable, when the variable is initialized before
> > > any possible use.  Thus, the static has no benefit.

Actually... it has possible other benefit -- saving stack space. I've
used static for that purpose before. So ... careful with the
automation.

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[toc] | [next] | [standalone]


#1695211

FromKees Cook <keescook@chromium.org>
Date2017-07-25 00:30 +0200
Message-ID<u6U1u-2LB-61@gated-at.bofh.it>
In reply to#1695032
On Mon, Jul 24, 2017 at 12:20 PM, Pavel Machek <pavel@ucw.cz> wrote:
> Hi!
>
>> > > Drop static on a local variable, when the variable is initialized before
>> > > any possible use.  Thus, the static has no benefit.
>
> Actually... it has possible other benefit -- saving stack space. I've
> used static for that purpose before. So ... careful with the
> automation.

This means any functions like this must not be thread safe, though...

-Kees

-- 
Kees Cook
Pixel Security

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web