lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 1 Mar 2023 12:11:35 +0800
From:   kernel test robot <lkp@...el.com>
To:     William Breathitt Gray <william.gray@...aro.org>,
        linus.walleij@...aro.org, brgl@...ev.pl
Cc:     llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
        broonie@...nel.org, linux-gpio@...r.kernel.org,
        linux-kernel@...r.kernel.org, michael@...le.cc, quarium@...il.com,
        jhentges@...esio.com, jay.dolan@...esio.com,
        William Breathitt Gray <william.gray@...aro.org>
Subject: Re: [PATCH 3/3] gpio: pcie-idio-24: Migrate to the regmap API

Hi William,

I love your patch! Perhaps something to improve:

[auto build test WARNING on 4827aae061337251bb91801b316157a78b845ec7]

url:    https://github.com/intel-lab-lkp/linux/commits/William-Breathitt-Gray/regmap-Pass-regmap-and-irq_drv_data-as-parameters-for-set_type_config/20230301-030010
base:   4827aae061337251bb91801b316157a78b845ec7
patch link:    https://lore.kernel.org/r/39f4c4b7083b2a50973e0ac5b4b1db5040fcda53.1677547393.git.william.gray%40linaro.org
patch subject: [PATCH 3/3] gpio: pcie-idio-24: Migrate to the regmap API
config: x86_64-randconfig-a001-20230227 (https://download.01.org/0day-ci/archive/20230301/202303011146.BnevM8E4-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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/6f59a8e427da386890ca2eaccab41064a250ebea
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review William-Breathitt-Gray/regmap-Pass-regmap-and-irq_drv_data-as-parameters-for-set_type_config/20230301-030010
        git checkout 6f59a8e427da386890ca2eaccab41064a250ebea
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/gpio/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303011146.BnevM8E4-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/gpio/gpio-pcie-idio-24.c:353:7: warning: variable 'irq_type' is uninitialized when used here [-Wuninitialized]
           if (!irq_type)
                ^~~~~~~~
   drivers/gpio/gpio-pcie-idio-24.c:319:23: note: initialize the variable 'irq_type' to silence this warning
           unsigned int irq_type;
                                ^
                                 = 0
   1 warning generated.


vim +/irq_type +353 drivers/gpio/gpio-pcie-idio-24.c

   305	
   306	static int idio_24_probe(struct pci_dev *pdev, const struct pci_device_id *id)
   307	{
   308		struct device *const dev = &pdev->dev;
   309		int err;
   310		const size_t pci_plx_bar_index = 1;
   311		const size_t pci_bar_index = 2;
   312		const char *const name = pci_name(pdev);
   313		struct gpio_regmap_config gpio_config = {};
   314		void __iomem *pex8311_intcsr;
   315		void __iomem *idio_24_regs;
   316		struct regmap *pex8311_intcsr_map;
   317		struct regmap *idio_24_map;
   318		struct regmap_irq_chip *chip;
   319		unsigned int irq_type;
   320		struct regmap_irq_chip_data *chip_data;
   321	
   322		err = pcim_enable_device(pdev);
   323		if (err) {
   324			dev_err(dev, "Failed to enable PCI device (%d)\n", err);
   325			return err;
   326		}
   327	
   328		err = pcim_iomap_regions(pdev, BIT(pci_plx_bar_index) | BIT(pci_bar_index), name);
   329		if (err) {
   330			dev_err(dev, "Unable to map PCI I/O addresses (%d)\n", err);
   331			return err;
   332		}
   333	
   334		pex8311_intcsr = pcim_iomap_table(pdev)[pci_plx_bar_index] + PLX_PEX8311_PCI_LCS_INTCSR;
   335		idio_24_regs = pcim_iomap_table(pdev)[pci_bar_index];
   336	
   337		pex8311_intcsr_map = devm_regmap_init_mmio(dev, pex8311_intcsr,
   338							   &pex8311_intcsr_regmap_config);
   339		if (IS_ERR(pex8311_intcsr_map))
   340			return dev_err_probe(dev, PTR_ERR(pex8311_intcsr_map),
   341					     "Unable to initialize PEX8311 register map\n");
   342		idio_24_map = devm_regmap_init_mmio(dev, idio_24_regs,
   343						    &idio_24_regmap_config);
   344		if (IS_ERR(idio_24_map))
   345			return dev_err_probe(dev, PTR_ERR(idio_24_map),
   346					     "Unable to initialize register map\n");
   347	
   348		chip = devm_kzalloc(dev, sizeof(*chip), GFP_KERNEL);
   349		if (!chip)
   350			return -ENOMEM;
   351	
   352		chip->irq_drv_data = devm_kzalloc(dev, sizeof(irq_type), GFP_KERNEL);
 > 353		if (!irq_type)
   354			return -ENOMEM;
   355	
   356		chip->name = name;
   357		chip->status_base = IDIO_24_STATUS_BASE;
   358		chip->mask_base = IDIO_24_COS_ENABLE;
   359		chip->ack_base = IDIO_24_ACK_BASE;
   360		chip->num_regs = 4;
   361		chip->irqs = idio_24_regmap_irqs;
   362		chip->num_irqs = ARRAY_SIZE(idio_24_regmap_irqs);
   363		chip->handle_mask_sync = idio_24_handle_mask_sync;
   364		chip->set_type_config = idio_24_set_type_config;
   365	
   366		/* Software board reset */
   367		err = regmap_write(idio_24_map, IDIO_24_SOFT_RESET, 0);
   368		if (err)
   369			return err;
   370		/*
   371		 * enable PLX PEX8311 internal PCI wire interrupt and local interrupt
   372		 * input
   373		 */
   374		err = regmap_update_bits(pex8311_intcsr_map, 0x0, IDIO_24_ENABLE_IRQ,
   375					 IDIO_24_ENABLE_IRQ);
   376		if (err)
   377			return err;
   378	
   379		err = devm_regmap_add_irq_chip(dev, idio_24_map, pdev->irq, 0, 0, chip,
   380					       &chip_data);
   381		if (err)
   382			return dev_err_probe(dev, err, "IRQ registration failed\n");
   383	
   384		gpio_config.parent = dev;
   385		gpio_config.regmap = idio_24_map;
   386		gpio_config.ngpio = IDIO_24_NGPIO;
   387		gpio_config.names = idio_24_names;
   388		gpio_config.reg_dat_base = GPIO_REGMAP_ADDR(IDIO_24_DAT_BASE);
   389		gpio_config.reg_set_base = GPIO_REGMAP_ADDR(IDIO_24_DAT_BASE);
   390		gpio_config.reg_dir_out_base = GPIO_REGMAP_ADDR(IDIO_24_CONTROL_REG);
   391		gpio_config.ngpio_per_reg = IDIO_24_NGPIO_PER_REG;
   392		gpio_config.irq_domain = regmap_irq_get_domain(chip_data);
   393		gpio_config.reg_mask_xlate = idio_24_reg_mask_xlate;
   394	
   395		return PTR_ERR_OR_ZERO(devm_gpio_regmap_register(dev, &gpio_config));
   396	}
   397	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ