public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Rob Barnes <robbarnes@google.com>,
	Peter Huewe <peterhuewe@gmx.de>,
	Jarkko Sakkinen <jarkko@kernel.org>,
	Jason Gunthorpe <jgg@ziepe.ca>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	Rob Barnes <robbarnes@google.com>,
	linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] char: tpm: cr50: Set TPM_FIRMWARE_POWER_MANAGED based on device property
Date: Wed, 1 Dec 2021 14:35:11 +0800	[thread overview]
Message-ID: <202112011433.QeYkYJE1-lkp@intel.com> (raw)
In-Reply-To: <20211130235918.2216110-1-robbarnes@google.com>

Hi Rob,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on char-misc/char-misc-testing]
[also build test ERROR on v5.16-rc3 next-20211201]
[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/Rob-Barnes/char-tpm-cr50-Set-TPM_FIRMWARE_POWER_MANAGED-based-on-device-property/20211201-080132
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git 5d331b5922551637c586cdf5fdc1778910fc937f
config: hexagon-randconfig-r041-20211128 (https://download.01.org/0day-ci/archive/20211201/202112011433.QeYkYJE1-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 25eb7fa01d7ebbe67648ea03841cda55b4239ab2)
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/4c5a69ab6ee4ba384abbbf714753053b5cd0de2c
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Rob-Barnes/char-tpm-cr50-Set-TPM_FIRMWARE_POWER_MANAGED-based-on-device-property/20211201-080132
        git checkout 4c5a69ab6ee4ba384abbbf714753053b5cd0de2c
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/char/tpm/

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 >>):

   In file included from drivers/char/tpm/tpm_tis_spi_cr50.c:18:
   In file included from drivers/char/tpm/tpm_tis_core.h:22:
   In file included from drivers/char/tpm/tpm.h:28:
   include/linux/tpm_eventlog.h:167:6: warning: variable 'mapping_size' set but not used [-Wunused-but-set-variable]
           int mapping_size;
               ^
>> drivers/char/tpm/tpm_tis_spi_cr50.c:319:45: error: use of undeclared identifier 'dev'
           if (tpm_cr50_spi_is_firmware_power_managed(dev))
                                                      ^
   1 warning and 1 error generated.


vim +/dev +319 drivers/char/tpm/tpm_tis_spi_cr50.c

   263	
   264	int cr50_spi_probe(struct spi_device *spi)
   265	{
   266		struct tpm_tis_spi_phy *phy;
   267		struct cr50_spi_phy *cr50_phy;
   268		int ret;
   269		struct tpm_chip *chip;
   270	
   271		cr50_phy = devm_kzalloc(&spi->dev, sizeof(*cr50_phy), GFP_KERNEL);
   272		if (!cr50_phy)
   273			return -ENOMEM;
   274	
   275		phy = &cr50_phy->spi_phy;
   276		phy->flow_control = cr50_spi_flow_control;
   277		phy->wake_after = jiffies;
   278		init_completion(&phy->ready);
   279	
   280		cr50_phy->access_delay = CR50_NOIRQ_ACCESS_DELAY;
   281		cr50_phy->last_access = jiffies;
   282		mutex_init(&cr50_phy->time_track_mutex);
   283	
   284		if (spi->irq > 0) {
   285			ret = devm_request_irq(&spi->dev, spi->irq,
   286					       cr50_spi_irq_handler,
   287					       IRQF_TRIGGER_RISING | IRQF_ONESHOT,
   288					       "cr50_spi", cr50_phy);
   289			if (ret < 0) {
   290				if (ret == -EPROBE_DEFER)
   291					return ret;
   292				dev_warn(&spi->dev, "Requesting IRQ %d failed: %d\n",
   293					 spi->irq, ret);
   294				/*
   295				 * This is not fatal, the driver will fall back to
   296				 * delays automatically, since ready will never
   297				 * be completed without a registered irq handler.
   298				 * So, just fall through.
   299				 */
   300			} else {
   301				/*
   302				 * IRQ requested, let's verify that it is actually
   303				 * triggered, before relying on it.
   304				 */
   305				cr50_phy->irq_needs_confirmation = true;
   306			}
   307		} else {
   308			dev_warn(&spi->dev,
   309				 "No IRQ - will use delays between transactions.\n");
   310		}
   311	
   312		ret = tpm_tis_spi_init(spi, phy, -1, &tpm_spi_cr50_phy_ops);
   313		if (ret)
   314			return ret;
   315	
   316		cr50_print_fw_version(&phy->priv);
   317	
   318		chip = dev_get_drvdata(&spi->dev);
 > 319		if (tpm_cr50_spi_is_firmware_power_managed(dev))
   320			chip->flags |= TPM_CHIP_FLAG_FIRMWARE_POWER_MANAGED;
   321	
   322		return 0;
   323	}
   324	

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

  reply	other threads:[~2021-12-01  6:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-30 23:59 [PATCH] char: tpm: cr50: Set TPM_FIRMWARE_POWER_MANAGED based on device property Rob Barnes
2021-12-01  6:35 ` kernel test robot [this message]
2021-12-02 20:03   ` [PATCH v2] " Rob Barnes
2021-12-04 18:05     ` Jarkko Sakkinen
2021-12-06 12:03       ` [PATCH v3] " Rob Barnes
2021-12-11  5:06         ` Jarkko Sakkinen
2021-12-06 23:52 ` [PATCH] " Rob Barnes

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=202112011433.QeYkYJE1-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=jarkko@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=peterhuewe@gmx.de \
    --cc=robbarnes@google.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