From: kernel test robot <lkp@intel.com>
To: wanghongzhe <wanghongzhe@huawei.com>,
peterhuewe@gmx.de, jarkko@kernel.org, jgg@ziepe.ca
Cc: kbuild-all@lists.01.org, linux-integrity@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] tpm_tis_spi_main: set cs_change = 0 when timesout
Date: Fri, 5 Feb 2021 15:50:13 +0800 [thread overview]
Message-ID: <202102051542.EcRomjfb-lkp@intel.com> (raw)
In-Reply-To: <1612507325-2621-1-git-send-email-wanghongzhe@huawei.com>
[-- Attachment #1: Type: text/plain, Size: 3584 bytes --]
Hi wanghongzhe,
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.11-rc6 next-20210125]
[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/wanghongzhe/tpm_tis_spi_main-set-cs_change-0-when-timesout/20210205-140104
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git 3a11b0b5d8d2b3f7d4b44945ef9226a3115bb15f
config: nios2-allyesconfig (attached as .config)
compiler: nios2-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://github.com/0day-ci/linux/commit/42343d4238cfd18831ed331b153cc6d2c0a7bc33
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review wanghongzhe/tpm_tis_spi_main-set-cs_change-0-when-timesout/20210205-140104
git checkout 42343d4238cfd18831ed331b153cc6d2c0a7bc33
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2
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_spi_main.c: In function 'tpm_tis_spi_flow_control':
>> drivers/char/tpm/tpm_tis_spi_main.c:72:12: error: 'spi_xfer' is a pointer; did you mean to use '->'?
72 | spi_xfer.cs_change = 0;
| ^
| ->
At top level:
drivers/char/tpm/tpm_tis_spi_main.c:288:36: warning: 'acpi_tis_spi_match' defined but not used [-Wunused-const-variable=]
288 | static const struct acpi_device_id acpi_tis_spi_match[] = {
| ^~~~~~~~~~~~~~~~~~
vim +72 drivers/char/tpm/tpm_tis_spi_main.c
40
41 /*
42 * TCG SPI flow control is documented in section 6.4 of the spec[1]. In short,
43 * keep trying to read from the device until MISO goes high indicating the
44 * wait state has ended.
45 *
46 * [1] https://trustedcomputinggroup.org/resource/pc-client-platform-tpm-profile-ptp-specification/
47 */
48 static int tpm_tis_spi_flow_control(struct tpm_tis_spi_phy *phy,
49 struct spi_transfer *spi_xfer)
50 {
51 struct spi_message m;
52 int ret, i;
53
54 if ((phy->iobuf[3] & 0x01) == 0) {
55 // handle SPI wait states
56 for (i = 0; i < TPM_RETRY; i++) {
57 spi_xfer->len = 1;
58 spi_message_init(&m);
59 spi_message_add_tail(spi_xfer, &m);
60 ret = spi_sync_locked(phy->spi_device, &m);
61 if (ret < 0)
62 return ret;
63 if (phy->iobuf[0] & 0x01)
64 break;
65 }
66
67 if (i == TPM_RETRY) {
68 /* change back to 'high',
69 * So the TPM chips thinks the last communication
70 * is done.
71 */
> 72 spi_xfer.cs_change = 0;
73 spi_xfer->len = 1;
74 spi_message_init(&m);
75 spi_message_add_tail(spi_xfer, &m);
76 ret = spi_sync_locked(phy->spi_device, &m);
77 return -ETIMEDOUT;
78 }
79 }
80
81 return 0;
82 }
83
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 58793 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v1] tpm_tis_spi_main: set cs_change = 0 when timesout
Date: Fri, 05 Feb 2021 15:50:13 +0800 [thread overview]
Message-ID: <202102051542.EcRomjfb-lkp@intel.com> (raw)
In-Reply-To: <1612507325-2621-1-git-send-email-wanghongzhe@huawei.com>
[-- Attachment #1: Type: text/plain, Size: 3676 bytes --]
Hi wanghongzhe,
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.11-rc6 next-20210125]
[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/wanghongzhe/tpm_tis_spi_main-set-cs_change-0-when-timesout/20210205-140104
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git 3a11b0b5d8d2b3f7d4b44945ef9226a3115bb15f
config: nios2-allyesconfig (attached as .config)
compiler: nios2-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://github.com/0day-ci/linux/commit/42343d4238cfd18831ed331b153cc6d2c0a7bc33
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review wanghongzhe/tpm_tis_spi_main-set-cs_change-0-when-timesout/20210205-140104
git checkout 42343d4238cfd18831ed331b153cc6d2c0a7bc33
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2
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_spi_main.c: In function 'tpm_tis_spi_flow_control':
>> drivers/char/tpm/tpm_tis_spi_main.c:72:12: error: 'spi_xfer' is a pointer; did you mean to use '->'?
72 | spi_xfer.cs_change = 0;
| ^
| ->
At top level:
drivers/char/tpm/tpm_tis_spi_main.c:288:36: warning: 'acpi_tis_spi_match' defined but not used [-Wunused-const-variable=]
288 | static const struct acpi_device_id acpi_tis_spi_match[] = {
| ^~~~~~~~~~~~~~~~~~
vim +72 drivers/char/tpm/tpm_tis_spi_main.c
40
41 /*
42 * TCG SPI flow control is documented in section 6.4 of the spec[1]. In short,
43 * keep trying to read from the device until MISO goes high indicating the
44 * wait state has ended.
45 *
46 * [1] https://trustedcomputinggroup.org/resource/pc-client-platform-tpm-profile-ptp-specification/
47 */
48 static int tpm_tis_spi_flow_control(struct tpm_tis_spi_phy *phy,
49 struct spi_transfer *spi_xfer)
50 {
51 struct spi_message m;
52 int ret, i;
53
54 if ((phy->iobuf[3] & 0x01) == 0) {
55 // handle SPI wait states
56 for (i = 0; i < TPM_RETRY; i++) {
57 spi_xfer->len = 1;
58 spi_message_init(&m);
59 spi_message_add_tail(spi_xfer, &m);
60 ret = spi_sync_locked(phy->spi_device, &m);
61 if (ret < 0)
62 return ret;
63 if (phy->iobuf[0] & 0x01)
64 break;
65 }
66
67 if (i == TPM_RETRY) {
68 /* change back to 'high',
69 * So the TPM chips thinks the last communication
70 * is done.
71 */
> 72 spi_xfer.cs_change = 0;
73 spi_xfer->len = 1;
74 spi_message_init(&m);
75 spi_message_add_tail(spi_xfer, &m);
76 ret = spi_sync_locked(phy->spi_device, &m);
77 return -ETIMEDOUT;
78 }
79 }
80
81 return 0;
82 }
83
---
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: 58793 bytes --]
next prev parent reply other threads:[~2021-02-05 7:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-05 6:42 [PATCH v1] tpm_tis_spi_main: set cs_change = 0 when timesout wanghongzhe
2021-02-05 7:50 ` kernel test robot [this message]
2021-02-05 7:50 ` kernel test robot
2021-02-07 23:42 ` Jarkko Sakkinen
2021-02-08 2:43 ` [PATCH v2] " wanghongzhe
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=202102051542.EcRomjfb-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=peterhuewe@gmx.de \
--cc=wanghongzhe@huawei.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 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.