[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0518fba7-7c35-4a91-9354-6a32a35f2ed7@stanley.mountain>
Date: Wed, 8 Jan 2025 20:14:13 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Dave Penkler <dpenkler@...il.com>
Cc: gregkh@...uxfoundation.org, linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Modernize gpib_interface_t initialization and make static
The subsystem prefix is missing in the subject.
On Wed, Jan 08, 2025 at 04:29:42PM +0100, Dave Penkler wrote:
> All interface drivers were using the old style initialization of
> this struct
>
> field : value;
>
> This generated the followng sparse warning, for example:
> agilent_82357a/agilent_82357a.c:1492:1: warning: obsolete struct initializer, use C99 syntax
>
> Change the initialization to use the C99 syntax
>
> .field = value;
>
> This also resolves the checkpatch constraint of no indentation.
>
> These structs were also not declared as static, unnecessarily polluting
> the symbol namespace and generating the following sparse warnings,
> for example:
>
> agilent_82357a/agilent_82357a.c:1465:18: warning: symbol 'agilent_82357a_gpib_interface' was not declared. Should it be static?
>
> Declare them as static and remove any conflicting extern declarations
> in the corresponding include files.
The c99 initializers and the making the structs static would ideally be
done in separate patches. Splitting up patches is kind of more art than
science...
regards,
dan carpenter
Powered by blists - more mailing lists