From: kbuild test robot <lkp@intel.com>
To: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Cc: kbuild-all@01.org, linux-integrity@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-security-module@vger.kernel.org, roberto.sassu@huawei.com,
zohar@linux.ibm.com,
Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>,
stable@vger.kernel.org
Subject: Re: [PATCH v2] tpm/st33zp24: Fix the name collisions in tpm_st33zp24_spi and tpm_i2c_infineon
Date: Tue, 5 Feb 2019 15:42:09 +0800 [thread overview]
Message-ID: <201902051505.HSJln4Tj%fengguang.wu@intel.com> (raw)
In-Reply-To: <20190204133749.14176-1-jarkko.sakkinen@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 3800 bytes --]
Hi Jarkko,
I love your patch! Yet something to improve:
[auto build test ERROR on jss-tpmdd/next]
[also build test ERROR on v5.0-rc4 next-20190204]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Jarkko-Sakkinen/tpm-st33zp24-Fix-the-name-collisions-in-tpm_st33zp24_spi-and-tpm_i2c_infineon/20190205-150003
base: git://git.infradead.org/users/jjs/linux-tpmdd next
config: nds32-allyesconfig (attached as .config)
compiler: nds32le-linux-gcc (GCC) 6.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=6.4.0 make.cross ARCH=nds32
All errors (new ones prefixed by >>):
drivers/char/tpm/tpm_i2c_infineon.c: In function 'tpm_tis_i2c_send':
>> drivers/char/tpm/tpm_i2c_infineon.c:531:12: error: 'TPM_I2C_INFINEON_BUFSIZE' undeclared (first use in this function)
if (len > TPM_I2C_INFINEON_BUFSIZE)
^~~~~~~~~~~~~~~~~~~~~~~~
drivers/char/tpm/tpm_i2c_infineon.c:531:12: note: each undeclared identifier is reported only once for each function it appears in
vim +/TPM_I2C_INFINEON_BUFSIZE +531 drivers/char/tpm/tpm_i2c_infineon.c
522
523 static int tpm_tis_i2c_send(struct tpm_chip *chip, u8 *buf, size_t len)
524 {
525 int rc, status;
526 ssize_t burstcnt;
527 size_t count = 0;
528 u8 retries = 0;
529 u8 sts = TPM_STS_GO;
530
> 531 if (len > TPM_I2C_INFINEON_BUFSIZE)
532 return -E2BIG;
533
534 if (request_locality(chip, 0) < 0)
535 return -EBUSY;
536
537 status = tpm_tis_i2c_status(chip);
538 if ((status & TPM_STS_COMMAND_READY) == 0) {
539 tpm_tis_i2c_ready(chip);
540 if (wait_for_stat
541 (chip, TPM_STS_COMMAND_READY,
542 chip->timeout_b, &status) < 0) {
543 rc = -ETIME;
544 goto out_err;
545 }
546 }
547
548 while (count < len - 1) {
549 burstcnt = get_burstcount(chip);
550
551 /* burstcnt < 0 = TPM is busy */
552 if (burstcnt < 0)
553 return burstcnt;
554
555 if (burstcnt > (len - 1 - count))
556 burstcnt = len - 1 - count;
557
558 rc = iic_tpm_write(TPM_DATA_FIFO(tpm_dev.locality),
559 &(buf[count]), burstcnt);
560 if (rc == 0)
561 count += burstcnt;
562 else if (rc < 0)
563 retries++;
564
565 /* avoid endless loop in case of broken HW */
566 if (retries > MAX_COUNT_LONG) {
567 rc = -EIO;
568 goto out_err;
569 }
570
571 wait_for_stat(chip, TPM_STS_VALID,
572 chip->timeout_c, &status);
573
574 if ((status & TPM_STS_DATA_EXPECT) == 0) {
575 rc = -EIO;
576 goto out_err;
577 }
578 }
579
580 /* write last byte */
581 iic_tpm_write(TPM_DATA_FIFO(tpm_dev.locality), &(buf[count]), 1);
582 wait_for_stat(chip, TPM_STS_VALID, chip->timeout_c, &status);
583 if ((status & TPM_STS_DATA_EXPECT) != 0) {
584 rc = -EIO;
585 goto out_err;
586 }
587
588 /* go and do it */
589 iic_tpm_write(TPM_STS(tpm_dev.locality), &sts, 1);
590
591 return len;
592 out_err:
593 tpm_tis_i2c_ready(chip);
594 /* The TPM needs some time to clean up here,
595 * so we sleep rather than keeping the bus busy
596 */
597 usleep_range(SLEEP_DURATION_RESET_LOW, SLEEP_DURATION_RESET_HI);
598 release_locality(chip, tpm_dev.locality, 0);
599 return rc;
600 }
601
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 49943 bytes --]
next prev parent reply other threads:[~2019-02-05 7:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-04 13:37 Jarkko Sakkinen
2019-02-04 13:49 ` Roberto Sassu
2019-02-04 23:31 ` Jarkko Sakkinen
2019-02-04 23:40 ` Jarkko Sakkinen
2019-02-05 8:08 ` Roberto Sassu
2019-02-05 8:36 ` Jarkko Sakkinen
2019-02-05 7:42 ` kbuild test robot [this message]
2019-02-05 8:10 ` kbuild test robot
2019-02-05 19:40 ` James Bottomley
2019-02-05 20:59 ` 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=201902051505.HSJln4Tj%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=jarkko.sakkinen@linux.intel.com \
--cc=kbuild-all@01.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=roberto.sassu@huawei.com \
--cc=stable@vger.kernel.org \
--cc=zohar@linux.ibm.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®