linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: kernel test robot <lkp@intel.com>,
	Kumaravel Thiagarajan <kumaravel.thiagarajan@microchip.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org, linux-gpio@vger.kernel.org
Subject: Re: [PATCH 3/3] misc: microchip: pci1xxxx: Fix the error handling paths of gp_aux_bus_probe()
Date: Sun, 18 Sep 2022 11:25:45 +0200	[thread overview]
Message-ID: <a0215d71-b7d6-17cf-8e98-dcefa7a1671b@wanadoo.fr> (raw)
In-Reply-To: <202209181527.7wmi1NBN-lkp@intel.com>

Le 18/09/2022 à 10:03, kernel test robot a écrit :
> Hi Christophe,
> 
> Thank you for the patch! Perhaps something to improve:
> 
> [auto build test WARNING on char-misc/char-misc-testing]
> [also build test WARNING on next-20220916]
> [cannot apply to linus/master v6.0-rc5]
> [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#_base_tree_information]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/Christophe-JAILLET/misc-microchip-pci1xxxx-Fix-the-error-handling-path-of-gp_aux_bus_probe/20220918-143022
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git ceecbbddbf549fe0b7ffa3804a6e255b3360030f
> config: xtensa-randconfig-r022-20220918
> compiler: xtensa-linux-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/089c1639fdebdad9be8de56c1546308eac15747d
>          git remote add linux-review https://github.com/intel-lab-lkp/linux
>          git fetch --no-tags linux-review Christophe-JAILLET/misc-microchip-pci1xxxx-Fix-the-error-handling-path-of-gp_aux_bus_probe/20220918-143022
>          git checkout 089c1639fdebdad9be8de56c1546308eac15747d
>          # save the config file
>          mkdir build_dir && cp config build_dir/.config
>          COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=xtensa SHELL=/bin/bash drivers/misc/mchp_pci1xxxx/
> 
> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All warnings (new ones prefixed by >>):
> 
>     drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gp.c: In function 'gp_aux_bus_probe':
>>> drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gp.c:35:13: warning: variable 'irq' set but not used [-Wunused-but-set-variable]
>        35 |         int irq, retval;
>           |             ^~~
> 
> 
> vim +/irq +35 drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gp.c
> 

[...]

>      75	
>      76		retval = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_ALL_TYPES);
>      77		if (retval < 0)
>      78			goto err_aux_dev_del_0;
>      79	
>      80		retval = pci_irq_vector(pdev, 0);
>      81		if (retval < 0)
>      82			goto err_aux_dev_del_0;
>      83		irq = retval;

We save the irq number here...

>      84	
>      85		aux_bus->aux_device_wrapper[1] = kzalloc(sizeof(*aux_bus->aux_device_wrapper[1]),
>      86							 GFP_KERNEL);
>      87		if (!aux_bus->aux_device_wrapper[1]) {
>      88			retval = -ENOMEM;
>      89			goto err_aux_dev_del_0;
>      90		}
>      91	
>      92		retval = ida_alloc(&gp_client_ida, GFP_KERNEL);
>      93		if (retval < 0) {
>      94			kfree(aux_bus->aux_device_wrapper[1]);
>      95			goto err_aux_dev_del_0;
>      96		}
>      97	
>      98		aux_bus->aux_device_wrapper[1]->aux_dev.name = aux_dev_gpio_name;
>      99		aux_bus->aux_device_wrapper[1]->aux_dev.dev.parent = &pdev->dev;
>     100		aux_bus->aux_device_wrapper[1]->aux_dev.dev.release = gp_auxiliary_device_release;
>     101		aux_bus->aux_device_wrapper[1]->aux_dev.id = retval;
>     102	
>     103		aux_bus->aux_device_wrapper[1]->gp_aux_data.region_start = pci_resource_start(pdev, 0);
>     104		aux_bus->aux_device_wrapper[1]->gp_aux_data.region_length = pci_resource_end(pdev, 0);
>     105	
>     106		pdev->irq = retval;

... then this should be:
    pdev->irq = irq;
here.

I'll send a v2 in a few days.
Let see first if we get some other feedback.

CJ


  reply	other threads:[~2022-09-18  9:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-18  6:27 [PATCH 0/3] misc: microchip: pci1xxxx: Fix the error handling path of gp_aux_bus_probe() Christophe JAILLET
2022-09-18  6:27 ` [PATCH 1/3] misc: microchip: pci1xxxx: Do not disable the pci device twice in gp_aux_bus_remove() Christophe JAILLET
2022-09-18  6:27 ` [PATCH 2/3] misc: microchip: pci1xxxx: Fix a memory leak in the error handling of gp_aux_bus_probe() Christophe JAILLET
2022-09-18  6:27 ` [PATCH 3/3] misc: microchip: pci1xxxx: Fix the error handling paths " Christophe JAILLET
2022-09-18  8:03   ` kernel test robot
2022-09-18  9:25     ` Christophe JAILLET [this message]
2022-09-19 17:47   ` Kumaravel.Thiagarajan
2022-09-21 22:59   ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a0215d71-b7d6-17cf-8e98-dcefa7a1671b@wanadoo.fr \
    --to=christophe.jaillet@wanadoo.fr \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbuild-all@lists.01.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kumaravel.thiagarajan@microchip.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).