lkml.org 
[lkml]   [2022]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] gpio: Restrict usage of gc irq members before initialization
From
Date

On 15/03/22 11:35 pm, Andy Shevchenko wrote:
> On Tue, Mar 15, 2022 at 7:38 PM kernel test robot <lkp@intel.com> wrote:
>> Hi Shreeya,
>>
>> Thank you for the patch! Yet something to improve:
>
>> All errors (new ones prefixed by >>):
>>
>> drivers/gpio/gpiolib.c: In function 'gpiod_to_irq':
>>>> drivers/gpio/gpiolib.c:3068:29: error: 'struct gpio_chip' has no member named 'irq'
>> 3068 | if (gc->to_irq && gc->irq.gc_irq_initialized) {
>> | ^~
> Exactly, because this check should go under ifdeffery.


Makes sense to me now. gc->irq.initialized must be checked inside
gpiochip_to_irq() wrapped around an ifdef CONFIG_GPIOLIB_IRQCHIP

Thanks Andy, I'll send a v3 with this change.


Shreeya Patel

\
 
 \ /
  Last update: 2022-03-15 19:43    [W:0.176 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site