Re: [PATCH] gpiolib: put gpio_suffixes in a single compilation unit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 12, 2024 at 08:48:21PM +0200, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
> 
> The gpio_suffixes array is defined in the gpiolib.h header. This means
> the array is stored in .rodata of every compilation unit that includes
> it. Put the definition for the array in gpiolib.c and export just the
> symbol in the header. We need the size of the array so expose it too.

Instead of having two exported variables you may just make the arrays be NULL
terminated. That's how, for example, ID tables are done.

-- 
With Best Regards,
Andy Shevchenko






[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux