All of lore.kernel.org
 help / color / mirror / Atom feed
* [jarkko-linux-tpmdd:master 13/13] drivers/char/tpm/tpm_tis_i2c_cr50.c:709:11: error: 'IRQF_NO_AUTOEN' undeclared; did you mean
@ 2021-03-19  0:51 kernel test robot
  2021-03-19  0:59 ` tiantao
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2021-03-19  0:51 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 4758 bytes --]

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git master
head:   c5f394f76a8b06b7bb5a568fa9933dd31d6c3cea
commit: c5f394f76a8b06b7bb5a568fa9933dd31d6c3cea [13/13] char: tpm: move to use request_irq by IRQF_NO_AUTOEN flag
config: ia64-randconfig-r011-20210318 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.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://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git/commit/?id=c5f394f76a8b06b7bb5a568fa9933dd31d6c3cea
        git remote add jarkko-linux-tpmdd git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git
        git fetch --no-tags jarkko-linux-tpmdd master
        git checkout c5f394f76a8b06b7bb5a568fa9933dd31d6c3cea
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/char/tpm/tpm_tis_i2c_cr50.c: In function 'tpm_cr50_i2c_probe':
>> drivers/char/tpm/tpm_tis_i2c_cr50.c:709:11: error: 'IRQF_NO_AUTOEN' undeclared (first use in this function); did you mean 'IRQ_NOAUTOEN'?
     709 |           IRQF_NO_AUTOEN,
         |           ^~~~~~~~~~~~~~
         |           IRQ_NOAUTOEN
   drivers/char/tpm/tpm_tis_i2c_cr50.c:709:11: note: each undeclared identifier is reported only once for each function it appears in


vim +709 drivers/char/tpm/tpm_tis_i2c_cr50.c

   662	
   663	/**
   664	 * tpm_cr50_i2c_probe() - Driver probe function.
   665	 * @client:	I2C client information.
   666	 * @id:		I2C device id.
   667	 *
   668	 * Return:
   669	 * - 0:		Success.
   670	 * - -errno:	A POSIX error code.
   671	 */
   672	static int tpm_cr50_i2c_probe(struct i2c_client *client,
   673				      const struct i2c_device_id *id)
   674	{
   675		struct tpm_i2c_cr50_priv_data *priv;
   676		struct device *dev = &client->dev;
   677		struct tpm_chip *chip;
   678		u32 vendor;
   679		u8 buf[4];
   680		int rc;
   681	
   682		if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C))
   683			return -ENODEV;
   684	
   685		chip = tpmm_chip_alloc(dev, &cr50_i2c);
   686		if (IS_ERR(chip))
   687			return PTR_ERR(chip);
   688	
   689		priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
   690		if (!priv)
   691			return -ENOMEM;
   692	
   693		/* cr50 is a TPM 2.0 chip */
   694		chip->flags |= TPM_CHIP_FLAG_TPM2;
   695		chip->flags |= TPM_CHIP_FLAG_FIRMWARE_POWER_MANAGED;
   696	
   697		/* Default timeouts */
   698		chip->timeout_a = msecs_to_jiffies(TIS_SHORT_TIMEOUT);
   699		chip->timeout_b = msecs_to_jiffies(TIS_LONG_TIMEOUT);
   700		chip->timeout_c = msecs_to_jiffies(TIS_SHORT_TIMEOUT);
   701		chip->timeout_d = msecs_to_jiffies(TIS_SHORT_TIMEOUT);
   702	
   703		dev_set_drvdata(&chip->dev, priv);
   704		init_completion(&priv->tpm_ready);
   705	
   706		if (client->irq > 0) {
   707			rc = devm_request_irq(dev, client->irq, tpm_cr50_i2c_int_handler,
   708					      IRQF_TRIGGER_FALLING | IRQF_ONESHOT |
 > 709					      IRQF_NO_AUTOEN,
   710					      dev->driver->name, chip);
   711			if (rc < 0) {
   712				dev_err(dev, "Failed to probe IRQ %d\n", client->irq);
   713				return rc;
   714			}
   715	
   716			priv->irq = client->irq;
   717		} else {
   718			dev_warn(dev, "No IRQ, will use %ums delay for TPM ready\n",
   719				 TPM_CR50_TIMEOUT_NOIRQ_MS);
   720		}
   721	
   722		rc = tpm_cr50_request_locality(chip);
   723		if (rc < 0) {
   724			dev_err(dev, "Could not request locality\n");
   725			return rc;
   726		}
   727	
   728		/* Read four bytes from DID_VID register */
   729		rc = tpm_cr50_i2c_read(chip, TPM_I2C_DID_VID(0), buf, sizeof(buf));
   730		if (rc < 0) {
   731			dev_err(dev, "Could not read vendor id\n");
   732			tpm_cr50_release_locality(chip, true);
   733			return rc;
   734		}
   735	
   736		vendor = le32_to_cpup((__le32 *)buf);
   737		if (vendor != TPM_CR50_I2C_DID_VID) {
   738			dev_err(dev, "Vendor ID did not match! ID was %08x\n", vendor);
   739			tpm_cr50_release_locality(chip, true);
   740			return -ENODEV;
   741		}
   742	
   743		dev_info(dev, "cr50 TPM 2.0 (i2c 0x%02x irq %d id 0x%x)\n",
   744			 client->addr, client->irq, vendor >> 16);
   745	
   746		return tpm_chip_register(chip);
   747	}
   748	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 27861 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [jarkko-linux-tpmdd:master 13/13] drivers/char/tpm/tpm_tis_i2c_cr50.c:709:11: error: 'IRQF_NO_AUTOEN' undeclared; did you mean
  2021-03-19  0:51 [jarkko-linux-tpmdd:master 13/13] drivers/char/tpm/tpm_tis_i2c_cr50.c:709:11: error: 'IRQF_NO_AUTOEN' undeclared; did you mean kernel test robot
@ 2021-03-19  0:59 ` tiantao
  2021-03-19  5:40   ` Jarkko Sakkinen
  0 siblings, 1 reply; 3+ messages in thread
From: tiantao @ 2021-03-19  0:59 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 5280 bytes --]


在 2021/3/19 8:51, kernel test robot 写道:
> tree:   git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git master
> head:   c5f394f76a8b06b7bb5a568fa9933dd31d6c3cea
> commit: c5f394f76a8b06b7bb5a568fa9933dd31d6c3cea [13/13] char: tpm: move to use request_irq by IRQF_NO_AUTOEN flag
> config: ia64-randconfig-r011-20210318 (attached as .config)
> compiler: ia64-linux-gcc (GCC) 9.3.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://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git/commit/?id=c5f394f76a8b06b7bb5a568fa9933dd31d6c3cea
>          git remote add jarkko-linux-tpmdd git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git
>          git fetch --no-tags jarkko-linux-tpmdd master
>          git checkout c5f394f76a8b06b7bb5a568fa9933dd31d6c3cea
>          # save the attached .config to linux build tree
>          COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
>     drivers/char/tpm/tpm_tis_i2c_cr50.c: In function 'tpm_cr50_i2c_probe':
>>> drivers/char/tpm/tpm_tis_i2c_cr50.c:709:11: error: 'IRQF_NO_AUTOEN' undeclared (first use in this function); did you mean 'IRQ_NOAUTOEN'?
>       709 |           IRQF_NO_AUTOEN,
>           |           ^~~~~~~~~~~~~~
>           |           IRQ_NOAUTOEN
>     drivers/char/tpm/tpm_tis_i2c_cr50.c:709:11: note: each undeclared identifier is reported only once for each function it appears in
>
This patch depends on the following patches.

cbe16f35bee6880becca6f20d2ebf6b457148552 genirq: Add IRQF_NO_AUTOEN for 
request_irq/nmi()

> vim +709 drivers/char/tpm/tpm_tis_i2c_cr50.c
>
>     662	
>     663	/**
>     664	 * tpm_cr50_i2c_probe() - Driver probe function.
>     665	 * @client:	I2C client information.
>     666	 * @id:		I2C device id.
>     667	 *
>     668	 * Return:
>     669	 * - 0:		Success.
>     670	 * - -errno:	A POSIX error code.
>     671	 */
>     672	static int tpm_cr50_i2c_probe(struct i2c_client *client,
>     673				      const struct i2c_device_id *id)
>     674	{
>     675		struct tpm_i2c_cr50_priv_data *priv;
>     676		struct device *dev = &client->dev;
>     677		struct tpm_chip *chip;
>     678		u32 vendor;
>     679		u8 buf[4];
>     680		int rc;
>     681	
>     682		if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C))
>     683			return -ENODEV;
>     684	
>     685		chip = tpmm_chip_alloc(dev, &cr50_i2c);
>     686		if (IS_ERR(chip))
>     687			return PTR_ERR(chip);
>     688	
>     689		priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
>     690		if (!priv)
>     691			return -ENOMEM;
>     692	
>     693		/* cr50 is a TPM 2.0 chip */
>     694		chip->flags |= TPM_CHIP_FLAG_TPM2;
>     695		chip->flags |= TPM_CHIP_FLAG_FIRMWARE_POWER_MANAGED;
>     696	
>     697		/* Default timeouts */
>     698		chip->timeout_a = msecs_to_jiffies(TIS_SHORT_TIMEOUT);
>     699		chip->timeout_b = msecs_to_jiffies(TIS_LONG_TIMEOUT);
>     700		chip->timeout_c = msecs_to_jiffies(TIS_SHORT_TIMEOUT);
>     701		chip->timeout_d = msecs_to_jiffies(TIS_SHORT_TIMEOUT);
>     702	
>     703		dev_set_drvdata(&chip->dev, priv);
>     704		init_completion(&priv->tpm_ready);
>     705	
>     706		if (client->irq > 0) {
>     707			rc = devm_request_irq(dev, client->irq, tpm_cr50_i2c_int_handler,
>     708					      IRQF_TRIGGER_FALLING | IRQF_ONESHOT |
>   > 709					      IRQF_NO_AUTOEN,
>     710					      dev->driver->name, chip);
>     711			if (rc < 0) {
>     712				dev_err(dev, "Failed to probe IRQ %d\n", client->irq);
>     713				return rc;
>     714			}
>     715	
>     716			priv->irq = client->irq;
>     717		} else {
>     718			dev_warn(dev, "No IRQ, will use %ums delay for TPM ready\n",
>     719				 TPM_CR50_TIMEOUT_NOIRQ_MS);
>     720		}
>     721	
>     722		rc = tpm_cr50_request_locality(chip);
>     723		if (rc < 0) {
>     724			dev_err(dev, "Could not request locality\n");
>     725			return rc;
>     726		}
>     727	
>     728		/* Read four bytes from DID_VID register */
>     729		rc = tpm_cr50_i2c_read(chip, TPM_I2C_DID_VID(0), buf, sizeof(buf));
>     730		if (rc < 0) {
>     731			dev_err(dev, "Could not read vendor id\n");
>     732			tpm_cr50_release_locality(chip, true);
>     733			return rc;
>     734		}
>     735	
>     736		vendor = le32_to_cpup((__le32 *)buf);
>     737		if (vendor != TPM_CR50_I2C_DID_VID) {
>     738			dev_err(dev, "Vendor ID did not match! ID was %08x\n", vendor);
>     739			tpm_cr50_release_locality(chip, true);
>     740			return -ENODEV;
>     741		}
>     742	
>     743		dev_info(dev, "cr50 TPM 2.0 (i2c 0x%02x irq %d id 0x%x)\n",
>     744			 client->addr, client->irq, vendor >> 16);
>     745	
>     746		return tpm_chip_register(chip);
>     747	}
>     748	
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [jarkko-linux-tpmdd:master 13/13] drivers/char/tpm/tpm_tis_i2c_cr50.c:709:11: error: 'IRQF_NO_AUTOEN' undeclared; did you mean
  2021-03-19  0:59 ` tiantao
@ 2021-03-19  5:40   ` Jarkko Sakkinen
  0 siblings, 0 replies; 3+ messages in thread
From: Jarkko Sakkinen @ 2021-03-19  5:40 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2108 bytes --]

On Fri, Mar 19, 2021 at 08:59:19AM +0800, tiantao (H) wrote:
> 
> 在 2021/3/19 8:51, kernel test robot 写道:
> > tree:   git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git master
> > head:   c5f394f76a8b06b7bb5a568fa9933dd31d6c3cea
> > commit: c5f394f76a8b06b7bb5a568fa9933dd31d6c3cea [13/13] char: tpm: move to use request_irq by IRQF_NO_AUTOEN flag
> > config: ia64-randconfig-r011-20210318 (attached as .config)
> > compiler: ia64-linux-gcc (GCC) 9.3.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://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git/commit/?id=c5f394f76a8b06b7bb5a568fa9933dd31d6c3cea
> >          git remote add jarkko-linux-tpmdd git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git
> >          git fetch --no-tags jarkko-linux-tpmdd master
> >          git checkout c5f394f76a8b06b7bb5a568fa9933dd31d6c3cea
> >          # save the attached .config to linux build tree
> >          COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
> > 
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> > 
> > All errors (new ones prefixed by >>):
> > 
> >     drivers/char/tpm/tpm_tis_i2c_cr50.c: In function 'tpm_cr50_i2c_probe':
> > > > drivers/char/tpm/tpm_tis_i2c_cr50.c:709:11: error: 'IRQF_NO_AUTOEN' undeclared (first use in this function); did you mean 'IRQ_NOAUTOEN'?
> >       709 |           IRQF_NO_AUTOEN,
> >           |           ^~~~~~~~~~~~~~
> >           |           IRQ_NOAUTOEN
> >     drivers/char/tpm/tpm_tis_i2c_cr50.c:709:11: note: each undeclared identifier is reported only once for each function it appears in
> > 
> This patch depends on the following patches.
> 
> cbe16f35bee6880becca6f20d2ebf6b457148552 genirq: Add IRQF_NO_AUTOEN for
> request_irq/nmi()

I'll drop the patch as it isn't compatible with the mainline.

/Jarkko

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-19  5:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-19  0:51 [jarkko-linux-tpmdd:master 13/13] drivers/char/tpm/tpm_tis_i2c_cr50.c:709:11: error: 'IRQF_NO_AUTOEN' undeclared; did you mean kernel test robot
2021-03-19  0:59 ` tiantao
2021-03-19  5:40   ` Jarkko Sakkinen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.