]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
staging: gpib: Modernize gpib_interface_t initialization and make static
authorDave Penkler <dpenkler@gmail.com>
Sat, 11 Jan 2025 16:05:14 +0000 (17:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Jan 2025 05:43:34 +0000 (06:43 +0100)
commit95cfc75234534b117fa5762696f0cd4a29243796
tree202223cdcec3fee7abeb055d0c4a2af43ad13a91
parent9125aa208a17cbbd3fdcc7953bb41d2d2fd35df0
staging: gpib: Modernize gpib_interface_t initialization and make static

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.

Signed-off-by: Dave Penkler <dpenkler@gmail.com>
Link: https://lore.kernel.org/r/20250111160514.26954-1-dpenkler@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 files changed:
drivers/staging/gpib/agilent_82350b/agilent_82350b.c
drivers/staging/gpib/agilent_82350b/agilent_82350b.h
drivers/staging/gpib/agilent_82357a/agilent_82357a.c
drivers/staging/gpib/cb7210/cb7210.c
drivers/staging/gpib/cb7210/cb7210.h
drivers/staging/gpib/cec/cec.h
drivers/staging/gpib/cec/cec_gpib.c
drivers/staging/gpib/eastwood/fluke_gpib.c
drivers/staging/gpib/fmh_gpib/fmh_gpib.c
drivers/staging/gpib/gpio/gpib_bitbang.c
drivers/staging/gpib/hp_82335/hp82335.c
drivers/staging/gpib/hp_82335/hp82335.h
drivers/staging/gpib/hp_82341/hp_82341.c
drivers/staging/gpib/hp_82341/hp_82341.h
drivers/staging/gpib/ines/ines.h
drivers/staging/gpib/ines/ines_gpib.c
drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
drivers/staging/gpib/ni_usb/ni_usb_gpib.c
drivers/staging/gpib/pc2/pc2_gpib.c
drivers/staging/gpib/tnt4882/tnt4882_gpib.c