Re: [Patch V7 2/3] tpm_tis-spi: Add hardware wait polling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Hi Krishna,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on broonie-spi/for-next]
[also build test WARNING on char-misc/char-misc-testing char-misc/char-misc-next char-misc/char-misc-linus linus/master v6.2 next-20230301]
[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]

base: for-next
patch link:
patch subject: [Patch V7 2/3] tpm_tis-spi: Add hardware wait polling
config: m68k-allyesconfig (
compiler: m68k-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git remote add linux-review
        git fetch --no-tags linux-review Krishna-Yarlagadda/spi-Add-TPM-HW-flow-flag/20230302-013628
        git checkout d47344c6b9ab634483742457f6692b01f02c4698
        # 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=m68k olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash drivers/char/tpm/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Link:

All warnings (new ones prefixed by >>):

   drivers/char/tpm/tpm_tis_spi_main.c:335:36: warning: 'acpi_tis_spi_match' defined but not used [-Wunused-const-variable=]
     335 | static const struct acpi_device_id acpi_tis_spi_match[] = {
         |                                    ^~~~~~~~~~~~~~~~~~
   drivers/char/tpm/tpm_tis_spi_main.c: In function 'tpm_tis_spi_probe':
>> drivers/char/tpm/tpm_tis_spi_main.c:263:42: warning: 'phy' is used uninitialized [-Wuninitialized]
     263 |         struct spi_controller *ctlr = phy->spi_device->controller;
         |                                       ~~~^~~~~~~~~~~~
   drivers/char/tpm/tpm_tis_spi_main.c:262:33: note: 'phy' was declared here
     262 |         struct tpm_tis_spi_phy *phy;
         |                                 ^~~

vim +/phy +263 drivers/char/tpm/tpm_tis_spi_main.c

   260	static int tpm_tis_spi_probe(struct spi_device *dev)
   261	{
   262		struct tpm_tis_spi_phy *phy;
 > 263		struct spi_controller *ctlr = phy->spi_device->controller;
   264		int irq;
   266		phy = devm_kzalloc(&dev->dev, sizeof(struct tpm_tis_spi_phy),
   267				   GFP_KERNEL);
   268		if (!phy)
   269			return -ENOMEM;
   271		phy->flow_control = tpm_tis_spi_flow_control;
   273		if (ctlr->flags & SPI_CONTROLLER_HALF_DUPLEX)
   274			phy->spi_device->mode |= SPI_TPM_HW_FLOW;
   276		/* If the SPI device has an IRQ then use that */
   277		if (dev->irq > 0)
   278			irq = dev->irq;
   279		else
   280			irq = -1;
   282		init_completion(&phy->ready);
   283		return tpm_tis_spi_init(dev, phy, irq, &tpm_spi_phy_ops);
   284	}

0-DAY CI Kernel Test Service

[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux