Hi Shreeya, Thank you for the patch! Yet something to improve: [auto build test ERROR on linusw-gpio/for-next] [also build test ERROR on v5.17-rc8 next-20220310] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Shreeya-Patel/gpio-Restrict-usage-of-gc-irq-members-before-initialization/20220315-183950 base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git for-next config: arm-xcep_defconfig (https://download.01.org/0day-ci/archive/20220316/202203160100.PENzQsMs-lkp@xxxxxxxxx/config) compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/9f566a088a6f5fcb8830b07020294835072d516c git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Shreeya-Patel/gpio-Restrict-usage-of-gc-irq-members-before-initialization/20220315-183950 git checkout 9f566a088a6f5fcb8830b07020294835072d516c # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> 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) { | ^~ vim +3068 drivers/gpio/gpiolib.c 3045 3046 /** 3047 * gpiod_to_irq() - return the IRQ corresponding to a GPIO 3048 * @desc: gpio whose IRQ will be returned (already requested) 3049 * 3050 * Return the IRQ corresponding to the passed GPIO, or an error code in case of 3051 * error. 3052 */ 3053 int gpiod_to_irq(const struct gpio_desc *desc) 3054 { 3055 struct gpio_chip *gc; 3056 int offset; 3057 3058 /* 3059 * Cannot VALIDATE_DESC() here as gpiod_to_irq() consumer semantics 3060 * requires this function to not return zero on an invalid descriptor 3061 * but rather a negative error number. 3062 */ 3063 if (!desc || IS_ERR(desc) || !desc->gdev || !desc->gdev->chip) 3064 return -EINVAL; 3065 3066 gc = desc->gdev->chip; 3067 offset = gpio_chip_hwgpio(desc); > 3068 if (gc->to_irq && gc->irq.gc_irq_initialized) { 3069 int retirq = gc->to_irq(gc, offset); 3070 3071 /* Zero means NO_IRQ */ 3072 if (!retirq) 3073 return -ENXIO; 3074 3075 return retirq; 3076 } 3077 return -ENXIO; 3078 } 3079 EXPORT_SYMBOL_GPL(gpiod_to_irq); 3080 --- 0-DAY CI Kernel Test Service https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx