mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Stuart Yoder <stuart.yoder@arm.com>,
	linux-integrity@vger.kernel.org, jarkko@kernel.org,
	peterhuewe@gmx.de, jgg@ziepe.ca, sudeep.holla@arm.com,
	rafael@kernel.org, lenb@kernel.org
Cc: oe-kbuild-all@lists.linux.dev, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/5] tpm_crb: implement driver compliant to CRB over FF-A
Date: Sun, 16 Feb 2025 08:28:00 +0800	[thread overview]
Message-ID: <202502160801.zzYlGtHn-lkp@intel.com> (raw)
In-Reply-To: <20250212220548.400447-2-stuart.yoder@arm.com>

Hi Stuart,

kernel test robot noticed the following build warnings:

[auto build test WARNING on char-misc/char-misc-testing]
[also build test WARNING on char-misc/char-misc-next char-misc/char-misc-linus rafael-pm/linux-next rafael-pm/bleeding-edge linus/master v6.14-rc2 next-20250214]
[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/Stuart-Yoder/tpm_crb-implement-driver-compliant-to-CRB-over-FF-A/20250213-060938
base:   char-misc/char-misc-testing
patch link:    https://lore.kernel.org/r/20250212220548.400447-2-stuart.yoder%40arm.com
patch subject: [PATCH v2 1/5] tpm_crb: implement driver compliant to CRB over FF-A
config: arm64-randconfig-r073-20250214 (https://download.01.org/0day-ci/archive/20250216/202502160801.zzYlGtHn-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502160801.zzYlGtHn-lkp@intel.com/

smatch warnings:
drivers/char/tpm/tpm_ffa_crb.c:272 ffa_crb_probe() warn: unsigned 'ffa_crb->minor_version' is never less than zero.

vim +272 drivers/char/tpm/tpm_ffa_crb.c

   230	
   231	static int ffa_crb_probe(struct ffa_device *ffa_dev)
   232	{
   233		int rc;
   234		struct ffa_crb *p;
   235	
   236		/* only one instance of a TPM partition is supported */
   237		if (ffa_crb && !IS_ERR_VALUE(ffa_crb))
   238			return -EEXIST;
   239	
   240		ffa_crb = ERR_PTR(-ENODEV); // set ffa_crb so we can detect probe failure
   241	
   242		if (!ffa_partition_supports_direct_recv(ffa_dev)) {
   243			pr_err("TPM partition doesn't support direct message receive.\n");
   244			return -EINVAL;
   245		}
   246	
   247		p = kzalloc(sizeof(*ffa_crb), GFP_KERNEL);
   248		if (!p)
   249			return -ENOMEM;
   250		ffa_crb = p;
   251	
   252		mutex_init(&ffa_crb->msg_data_lock);
   253		ffa_crb->ffa_dev = ffa_dev;
   254		ffa_dev_set_drvdata(ffa_dev, ffa_crb);
   255	
   256		/* if TPM is aarch32 use 32-bit SMCs */
   257		if (!ffa_partition_check_property(ffa_dev, FFA_PARTITION_AARCH64_EXEC))
   258			ffa_dev->ops->msg_ops->mode_32bit_set(ffa_dev);
   259	
   260		/* verify compatibility of TPM service version number */
   261		rc = ffa_crb_get_interface_version(&ffa_crb->major_version,
   262				&ffa_crb->minor_version);
   263		if (rc) {
   264			pr_err("failed to get crb interface version. rc:%d", rc);
   265			goto out;
   266		}
   267	
   268		pr_info("ABI version %u.%u", ffa_crb->major_version,
   269			ffa_crb->minor_version);
   270	
   271		if ((ffa_crb->major_version != FFA_CRB_VERSION_MAJOR) ||
 > 272		    (ffa_crb->minor_version < FFA_CRB_VERSION_MINOR)) {
   273			pr_err("Incompatible ABI version");
   274			goto out;
   275		}
   276	
   277		return 0;
   278	
   279	out:
   280		kfree(ffa_crb);
   281		ffa_crb = ERR_PTR(-ENODEV);
   282		return -EINVAL;
   283	}
   284	

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

  parent reply	other threads:[~2025-02-16  0:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-12 22:05 [PATCH v2 0/5] Add support for the TPM FF-A start method Stuart Yoder
2025-02-12 22:05 ` [PATCH v2 1/5] tpm_crb: implement driver compliant to CRB over FF-A Stuart Yoder
2025-02-13 22:14   ` Jarkko Sakkinen
2025-02-13 22:22     ` Stuart Yoder
2025-02-13 23:37       ` Jarkko Sakkinen
2025-02-16  0:28   ` kernel test robot [this message]
2025-02-12 22:05 ` [PATCH v2 2/5] tpm_crb: refactor check for idle support into TPM into inline function Stuart Yoder
2025-02-13 22:13   ` Jarkko Sakkinen
2025-02-13 22:23     ` Stuart Yoder
2025-02-12 22:05 ` [PATCH v2 3/5] ACPICA: add start method for Arm FF-A Stuart Yoder
2025-02-12 22:05 ` [PATCH v2 4/5] tpm_crb: add support for the Arm FF-A start method Stuart Yoder
2025-02-12 22:05 ` [PATCH v2 5/5] Documentation: tpm: add documentation for the CRB FF-A interface Stuart Yoder
2025-02-13 22:11   ` Jarkko Sakkinen
2025-02-13 22:17     ` Stuart Yoder
2025-02-13 23:38       ` Jarkko Sakkinen

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=202502160801.zzYlGtHn-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=jarkko@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=peterhuewe@gmx.de \
    --cc=rafael@kernel.org \
    --cc=stuart.yoder@arm.com \
    --cc=sudeep.holla@arm.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

all inboxes | Powered by JetHome®