lkml.org 
[lkml]   [2023]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH] spi: bcm2835: add a sentinel at the end of the lookup array
    On Thu, Oct 5, 2023 at 11:10 AM Andy Shevchenko
    <andriy.shevchenko@linux.intel.com> wrote:
    >
    > On Wed, Oct 04, 2023 at 08:39:06PM +0200, Bartosz Golaszewski wrote:
    > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
    > >
    > > GPIOLIB expects the array of lookup entries to be terminated with an
    > > empty member. We need to increase the size of the variable length array
    > > in the lookup table by 1.
    >
    > Right and seems we (used to?) have the same mistake spread over the kernel.

    Almost all lookup tables are static and have a sentinel appended. The
    temporary lookup hack is only used here and in the int3472 driver
    AFAIK so it's not that bad.

    > Perhaps a helper at some point?
    >

    I don't want to make it a habit for people. This is still a hack, just
    less bad than what was here before. So I don't think we need a helper
    here.

    Bart

    > Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    >
    > --
    > With Best Regards,
    > Andy Shevchenko
    >
    >

    \
     
     \ /
      Last update: 2023-10-05 15:59    [W:3.103 / U:3.268 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site