From: Dan Carpenter <dan.carpenter@linaro.org>
To: Sumit Garg <sumit.garg@kernel.org>
Cc: Colin Ian King <coking@nvidia.com>,
Jens Wiklander <jens.wiklander@linaro.org>,
op-tee@lists.trustedfirmware.org,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] optee: make read-only array attr static const
Date: Mon, 12 Jan 2026 18:15:17 +0300 [thread overview]
Message-ID: <aWUQBSa3dw5HOsVd@stanley.mountain> (raw)
In-Reply-To: <aWTaUvGu9dlvnJO9@sumit-xelite>
On Mon, Jan 12, 2026 at 04:56:10PM +0530, Sumit Garg wrote:
> On Fri, Jan 09, 2026 at 03:44:42PM +0000, Colin Ian King wrote:
> > Don't populate the read-only array attr on the stack at run
> > time, instead make it static const.
>
> Is there any value add to do this? AFAIK, the static local variables
> aren't preffered.
>
I have never heard that static local variables aren't prefered. I
imagine that because they're often not thread safe? But if they're
const thread safeness isn't an problem. Generally, we prefer the
scope as local as possible.
regards,
dan carpenter
next prev parent reply other threads:[~2026-01-12 15:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-09 15:44 [PATCH][next] optee: make read-only array attr static const Colin Ian King
2026-01-12 11:26 ` Sumit Garg
2026-01-12 14:46 ` ryan foster
[not found] ` <DS0PR12MB8294F8C07E39842AC16CBA21AF81A@DS0PR12MB8294.namprd12.prod.outlook.com>
2026-01-16 9:14 ` Sumit Garg
2026-01-17 11:33 ` Jens Wiklander
2026-01-12 15:15 ` Dan Carpenter [this message]
2026-01-17 14:10 ` David Laight
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aWUQBSa3dw5HOsVd@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=coking@nvidia.com \
--cc=jens.wiklander@linaro.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=op-tee@lists.trustedfirmware.org \
--cc=sumit.garg@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox