From: Hans de Goede <hansg@kernel.org>
To: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
"Mika Westerberg" <westeri@kernel.org>,
"Andi Shyti" <andi.shyti@kernel.org>,
"Corey Minyard" <corey@minyard.net>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Sebastian Reichel" <sre@kernel.org>
Cc: linux-i2c@vger.kernel.org, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
openipmi-developer@lists.sourceforge.net,
platform-driver-x86@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH 7/8] platform/x86: x86-android-tablets: use 4-argument i2c_smbus_read_block_data()
Date: Mon, 26 Oct 2026 12:48:26 +0100 [thread overview]
Message-ID: <c4bd90f8-cdc3-4812-8e36-e438b17c048a@kernel.org> (raw)
In-Reply-To: <20261024-i2c-smbus-read-block-data-v1-7-19bb97467982@gmail.com>
Hi
On 25-Oct-26 3:48 AM, Dmitry Torokhov wrote:
> Pass the expected response length and destination buffer directly to
> i2c_smbus_read_block_data() in atla10_ec_cmd() instead of copying
> through an intermediate buffer.
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Thanks, patch looks good to me:
Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Regards,
Hans
> ---
> drivers/platform/x86/x86-android-tablets/vexia_atla10_ec.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/platform/x86/x86-android-tablets/vexia_atla10_ec.c b/drivers/platform/x86/x86-android-tablets/vexia_atla10_ec.c
> index 67dba9aa51f6..bbfa040cd4ec 100644
> --- a/drivers/platform/x86/x86-android-tablets/vexia_atla10_ec.c
> +++ b/drivers/platform/x86/x86-android-tablets/vexia_atla10_ec.c
> @@ -65,16 +65,14 @@ struct atla10_ec_data {
> static int atla10_ec_cmd(struct atla10_ec_data *data, u8 cmd, u8 len, u8 *values)
> {
> struct device *dev = &data->client->dev;
> - u8 buf[I2C_SMBUS_BLOCK_MAX];
> int ret;
>
> - ret = i2c_smbus_read_block_data(data->client, cmd, buf);
> + ret = i2c_smbus_read_block_data(data->client, cmd, len, values);
> if (ret != len) {
> dev_err(dev, "I2C command 0x%02x error: %d\n", cmd, ret);
> return -EIO;
> }
>
> - memcpy(values, buf, len);
> return 0;
> }
>
>
next prev parent reply other threads:[~2026-10-26 11:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-25 2:48 [PATCH 0/8] i2c: convert i2c_smbus_read_block_data() users to pass buffer length Dmitry Torokhov
2026-10-25 2:48 ` [PATCH 1/8] i2c: acpi: use 4-argument i2c_smbus_read_block_data() Dmitry Torokhov
2026-10-26 8:52 ` Mika Westerberg
2026-10-25 2:48 ` [PATCH 2/8] i2c: docs: update i2c_smbus_read_block_data() prototype in writing-clients Dmitry Torokhov
2026-10-25 2:48 ` [PATCH 3/8] Input: cyapa - use 4-argument i2c_smbus_read_block_data() Dmitry Torokhov
2026-10-25 2:48 ` [PATCH 4/8] Input: elan_i2c " Dmitry Torokhov
2026-10-25 2:48 ` [PATCH 5/8] Input: synaptics-rmi4 " Dmitry Torokhov
2026-10-25 2:48 ` [PATCH 6/8] ipmi: ssif: " Dmitry Torokhov
2026-10-25 2:48 ` [PATCH 7/8] platform/x86: x86-android-tablets: " Dmitry Torokhov
2026-10-26 11:48 ` Hans de Goede [this message]
2026-10-25 2:48 ` [PATCH 8/8] power: supply: sbs-battery: " Dmitry Torokhov
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=c4bd90f8-cdc3-4812-8e36-e438b17c048a@kernel.org \
--to=hansg@kernel.org \
--cc=andi.shyti@kernel.org \
--cc=corey@minyard.net \
--cc=dmitry.torokhov@gmail.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=openipmi-developer@lists.sourceforge.net \
--cc=platform-driver-x86@vger.kernel.org \
--cc=sre@kernel.org \
--cc=westeri@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 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®