From: kernel test robot <lkp@intel.com>
To: Jarkko Sakkinen <jarkko@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [jarkko-tpmdd:master 12/12] drivers/char/tpm/tpm_tis_i2c.c:243:12: error: 'TPM_I2C_BUFSIZE' undeclared; did you mean 'TPM_BUFSIZE'?
Date: Sat, 31 Oct 2026 06:36:59 +0800 [thread overview]
Message-ID: <202610310538.MBJWSwIt-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git master
head: 7e8d0278a462f604dd884db39b76d0ac3c1ad652
commit: 7e8d0278a462f604dd884db39b76d0ac3c1ad652 [12/12] tpm: tis_i2c: Add reset delays for ST33KTPM2XI2C
config: arc-randconfig-1000-20261031 (https://download.01.org/0day-ci/archive/20261031/202610310538.MBJWSwIt-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 9.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261031/202610310538.MBJWSwIt-lkp@intel.com/reproduce)
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/202610310538.MBJWSwIt-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/char/tpm/tpm_tis_i2c.c: In function 'tpm_tis_i2c_write_bytes':
>> drivers/char/tpm/tpm_tis_i2c.c:243:12: error: 'TPM_I2C_BUFSIZE' undeclared (first use in this function); did you mean 'TPM_BUFSIZE'?
243 | if (len > TPM_I2C_BUFSIZE - 1)
| ^~~~~~~~~~~~~~~
| TPM_BUFSIZE
drivers/char/tpm/tpm_tis_i2c.c:243:12: note: each undeclared identifier is reported only once for each function it appears in
drivers/char/tpm/tpm_tis_i2c.c: In function 'tpm_tis_i2c_probe':
drivers/char/tpm/tpm_tis_i2c.c:352:40: error: 'TPM_I2C_BUFSIZE' undeclared (first use in this function); did you mean 'TPM_BUFSIZE'?
352 | phy->io_buf = devm_kzalloc(&dev->dev, TPM_I2C_BUFSIZE, GFP_KERNEL);
| ^~~~~~~~~~~~~~~
| TPM_BUFSIZE
vim +243 drivers/char/tpm/tpm_tis_i2c.c
bbc23a07b0728c8 Alexander Steffen 2022-06-08 232
bbc23a07b0728c8 Alexander Steffen 2022-06-08 233 static int tpm_tis_i2c_write_bytes(struct tpm_tis_data *data, u32 addr, u16 len,
bbc23a07b0728c8 Alexander Steffen 2022-06-08 234 const u8 *value,
bbc23a07b0728c8 Alexander Steffen 2022-06-08 235 enum tpm_tis_io_mode io_mode)
bbc23a07b0728c8 Alexander Steffen 2022-06-08 236 {
bbc23a07b0728c8 Alexander Steffen 2022-06-08 237 struct tpm_tis_i2c_phy *phy = to_tpm_tis_i2c_phy(data);
bbc23a07b0728c8 Alexander Steffen 2022-06-08 238 struct i2c_msg msg = { .addr = phy->i2c_client->addr };
bbc23a07b0728c8 Alexander Steffen 2022-06-08 239 u8 reg = tpm_tis_i2c_address_to_register(addr);
bbc23a07b0728c8 Alexander Steffen 2022-06-08 240 int ret;
83e7e5d89f04d1c Alexander Sverdlin 2023-05-24 241 u16 wrote = 0;
bbc23a07b0728c8 Alexander Steffen 2022-06-08 242
4d6830bf773cec0 Arun Menon 2026-10-29 @243 if (len > TPM_I2C_BUFSIZE - 1)
bbc23a07b0728c8 Alexander Steffen 2022-06-08 244 return -EIO;
bbc23a07b0728c8 Alexander Steffen 2022-06-08 245
bbc23a07b0728c8 Alexander Steffen 2022-06-08 246 phy->io_buf[0] = reg;
bbc23a07b0728c8 Alexander Steffen 2022-06-08 247 msg.buf = phy->io_buf;
83e7e5d89f04d1c Alexander Sverdlin 2023-05-24 248 while (wrote < len) {
83e7e5d89f04d1c Alexander Sverdlin 2023-05-24 249 /* write register and data in one go */
83e7e5d89f04d1c Alexander Sverdlin 2023-05-24 250 msg.len = sizeof(reg) + len - wrote;
83e7e5d89f04d1c Alexander Sverdlin 2023-05-24 251 if (msg.len > I2C_SMBUS_BLOCK_MAX)
83e7e5d89f04d1c Alexander Sverdlin 2023-05-24 252 msg.len = I2C_SMBUS_BLOCK_MAX;
83e7e5d89f04d1c Alexander Sverdlin 2023-05-24 253
83e7e5d89f04d1c Alexander Sverdlin 2023-05-24 254 memcpy(phy->io_buf + sizeof(reg), value + wrote,
83e7e5d89f04d1c Alexander Sverdlin 2023-05-24 255 msg.len - sizeof(reg));
83e7e5d89f04d1c Alexander Sverdlin 2023-05-24 256
bbc23a07b0728c8 Alexander Steffen 2022-06-08 257 ret = tpm_tis_i2c_retry_transfer_until_ack(data, &msg);
bbc23a07b0728c8 Alexander Steffen 2022-06-08 258 if (ret < 0)
bbc23a07b0728c8 Alexander Steffen 2022-06-08 259 return ret;
83e7e5d89f04d1c Alexander Sverdlin 2023-05-24 260 wrote += msg.len - sizeof(reg);
83e7e5d89f04d1c Alexander Sverdlin 2023-05-24 261 }
bbc23a07b0728c8 Alexander Steffen 2022-06-08 262
bbc23a07b0728c8 Alexander Steffen 2022-06-08 263 return 0;
bbc23a07b0728c8 Alexander Steffen 2022-06-08 264 }
bbc23a07b0728c8 Alexander Steffen 2022-06-08 265
:::::: The code at line 243 was first introduced by commit
:::::: 4d6830bf773cec0a8d18d54fc5d1f58eb3846d6f tpm: tis_i2c: Use local 4KB buffer to limit memory usage
:::::: TO: Arun Menon <armenon@redhat.com>
:::::: CC: Jarkko Sakkinen <jarkko@kernel.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2026-10-30 22:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-30 22:36 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-10-30 4:23 [jarkko-tpmdd:master 12/12] drivers/char/tpm/tpm_tis_i2c.c:243:12: error: 'TPM_I2C_BUFSIZE' undeclared; did you mean 'TPM_BUFSIZE'? kernel test robot
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=202610310538.MBJWSwIt-lkp@intel.com \
--to=lkp@intel.com \
--cc=jarkko@kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
/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.