From: Yuanhan Liu <yuanhan.liu@intel.com>
To: kernel-janitors@vger.kernel.org
Subject: [balbi-usb:i2c-transferred-bytes-on-NACK 7/8] drivers/char/tpm/tpm_i2c_infineon.c:93:9: warning: ini
Date: Thu, 18 Oct 2012 11:25:47 +0000 [thread overview]
Message-ID: <20121018112547.GS21995@yliu-dev.sh.intel.com> (raw)
Hi Shubhrajyoti,
FYI, there are new compile warnings show up in
tree: git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git i2c-transferred-bytes-on-NACK
head: 84461dba998a10909ba197fdbb4497e66d331edf
commit: ad5b920b31d68c5970b285136f4dff96612c7a4b [7/8] i2c: add 'transferred' field to struct i2c_msg
config: m68k-allmodconfig # make ARCH=m68k allmodconfig
All warnings:
drivers/char/tpm/tpm_i2c_infineon.c: In function 'iic_tpm_read':
drivers/char/tpm/tpm_i2c_infineon.c:93:9: warning: initialization makes integer from pointer without a cast [enabled by default]
drivers/char/tpm/tpm_i2c_infineon.c:93:9: warning: (near initialization for 'msg1.transferred') [enabled by default]
drivers/char/tpm/tpm_i2c_infineon.c:94:9: warning: initialization makes integer from pointer without a cast [enabled by default]
drivers/char/tpm/tpm_i2c_infineon.c:94:9: warning: (near initialization for 'msg2.transferred') [enabled by default]
drivers/char/tpm/tpm_i2c_infineon.c: In function 'iic_tpm_write_generic':
drivers/char/tpm/tpm_i2c_infineon.c:141:9: warning: initialization makes integer from pointer without a cast [enabled by default]
drivers/char/tpm/tpm_i2c_infineon.c:141:9: warning: (near initialization for 'msg1.transferred') [enabled by default]
vim +93 drivers/char/tpm/tpm_i2c_infineon.c
aad628c1 Peter Huewe 2012-08-07 77 * Read len bytes from TPM register and put them into
aad628c1 Peter Huewe 2012-08-07 78 * buffer (little-endian format, i.e. first byte is put into buffer[0]).
aad628c1 Peter Huewe 2012-08-07 79 *
aad628c1 Peter Huewe 2012-08-07 80 * NOTE: TPM is big-endian for multi-byte values. Multi-byte
aad628c1 Peter Huewe 2012-08-07 81 * values have to be swapped.
aad628c1 Peter Huewe 2012-08-07 82 *
aad628c1 Peter Huewe 2012-08-07 83 * NOTE: We can't unfortunately use the combined read/write functions
aad628c1 Peter Huewe 2012-08-07 84 * provided by the i2c core as the TPM currently does not support the
aad628c1 Peter Huewe 2012-08-07 85 * repeated start condition and due to it's special requirements.
aad628c1 Peter Huewe 2012-08-07 86 * The i2c_smbus* functions do not work for this chip.
aad628c1 Peter Huewe 2012-08-07 87 *
aad628c1 Peter Huewe 2012-08-07 88 * Return -EIO on error, 0 on success.
aad628c1 Peter Huewe 2012-08-07 89 */
aad628c1 Peter Huewe 2012-08-07 90 static int iic_tpm_read(u8 addr, u8 *buffer, size_t len)
aad628c1 Peter Huewe 2012-08-07 91 {
aad628c1 Peter Huewe 2012-08-07 92
aad628c1 Peter Huewe 2012-08-07 @93 struct i2c_msg msg1 = { tpm_dev.client->addr, 0, 1, &addr };
aad628c1 Peter Huewe 2012-08-07 94 struct i2c_msg msg2 = { tpm_dev.client->addr, I2C_M_RD, len, buffer };
aad628c1 Peter Huewe 2012-08-07 95
aad628c1 Peter Huewe 2012-08-07 96 int rc;
aad628c1 Peter Huewe 2012-08-07 97 int count;
aad628c1 Peter Huewe 2012-08-07 98
aad628c1 Peter Huewe 2012-08-07 99 /* Lock the adapter for the duration of the whole sequence. */
aad628c1 Peter Huewe 2012-08-07 100 if (!tpm_dev.client->adapter->algo->master_xfer)
aad628c1 Peter Huewe 2012-08-07 101 return -EOPNOTSUPP;
The code at line 93 was first introduced by commit:
aad628c char/tpm: Add new driver for Infineon I2C TIS TPM
---
0-DAY kernel build testing backend Open Source Technology Center
Fengguang Wu, Yuanhan Liu Intel Corporation
next reply other threads:[~2012-10-18 11:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-18 11:25 Yuanhan Liu [this message]
2012-10-18 11:28 ` [balbi-usb:i2c-transferred-bytes-on-NACK 7/8] drivers/input/joystick/as5011.c:89:2: warning: initial Yuanhan Liu
2012-10-18 13:44 ` [balbi-usb:i2c-transferred-bytes-on-NACK 7/8] drivers/char/tpm/tpm_i2c_infineon.c:93:9: warning: Felipe Balbi
2012-10-18 18:01 ` Datta, Shubhrajyoti
2012-10-18 18:03 ` Felipe Balbi
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=20121018112547.GS21995@yliu-dev.sh.intel.com \
--to=yuanhan.liu@intel.com \
--cc=kernel-janitors@vger.kernel.org \
/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.