Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756954AbdGXW1V (ORCPT ); Mon, 24 Jul 2017 18:27:21 -0400 Received: from mail-it0-f44.google.com ([209.85.214.44]:36712 "EHLO mail-it0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756926AbdGXW1J (ORCPT ); Mon, 24 Jul 2017 18:27:09 -0400 MIME-Version: 1.0 In-Reply-To: <20170724192026.GF32425@amd> References: <1500149266-32357-1-git-send-email-Julia.Lawall@lip6.fr> <1500149266-32357-8-git-send-email-Julia.Lawall@lip6.fr> <20170724192026.GF32425@amd> From: Kees Cook Date: Mon, 24 Jul 2017 15:27:07 -0700 X-Google-Sender-Auth: 0MJs7APWa3UFwMbdgDL8VBGOYGg Message-ID: Subject: Re: [PATCH 07/11] mfd: Drop unnecessary static To: Pavel Machek Cc: Julia Lawall , Mark D Rustad , Tony Lindgren , kernel-janitors@vger.kernel.org, Lee Jones , linux-omap@vger.kernel.org, LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 475 Lines: 17 On Mon, Jul 24, 2017 at 12:20 PM, Pavel Machek 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