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


Groups > linux.kernel > #1695211

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

From Kees Cook <keescook@chromium.org>
Newsgroups linux.kernel
Subject Re: [PATCH 07/11] mfd: Drop unnecessary static
Date 2017-07-25 00:30 +0200
Message-ID <u6U1u-2LB-61@gated-at.bofh.it> (permalink)
References <u3C13-64w-3@gated-at.bofh.it> <u3C14-64w-17@gated-at.bofh.it> <u3Ckq-6aP-27@gated-at.bofh.it> <u3Ckq-6aP-25@gated-at.bofh.it> <u6Rdg-OM-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

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

csiph-web