linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Heidelberg <david@ixit.cz>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Petr Hodina <petr.hodina@protonmail.com>,
	Javier Martinez Canillas <javier@osg.samsung.com>,
	Rob Herring <robh@kernel.org>, Andi Shyti <andi@etezian.org>,
	linux-input@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/4] Input: stmfts - use client to make future code cleaner
Date: Tue, 16 Dec 2025 10:13:18 +0100	[thread overview]
Message-ID: <f240f2d4-c691-4166-bd5a-4bd2fbe4d736@ixit.cz> (raw)
In-Reply-To: <hpmm5fhs74swrhkneaif4s5dquqeclujdlua7ygmkvcmtf6n4t@rsahxu23xwfp>

On 16/12/2025 07:13, Dmitry Torokhov wrote:
> Hi David,
> 
> On Mon, Dec 15, 2025 at 03:30:04PM +0100, David Heidelberg via B4 Relay wrote:
>> From: Petr Hodina <petr.hodina@protonmail.com>
>>
>> Make code cleaner, compiler will optimize it away anyway.
>>
>> Preparation for FTM5 support, where more steps are needed.
>>
>> Signed-off-by: Petr Hodina <petr.hodina@protonmail.com>
>> Signed-off-by: David Heidelberg <david@ixit.cz>
>> ---
>>   drivers/input/touchscreen/stmfts.c | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/input/touchscreen/stmfts.c b/drivers/input/touchscreen/stmfts.c
>> index 4b166b0a9a5a6..06845a00348cc 100644
>> --- a/drivers/input/touchscreen/stmfts.c
>> +++ b/drivers/input/touchscreen/stmfts.c
>> @@ -747,9 +747,10 @@ static int stmfts_runtime_suspend(struct device *dev)
>>   static int stmfts_runtime_resume(struct device *dev)
>>   {
>>   	struct stmfts_data *sdata = dev_get_drvdata(dev);
>> +	struct i2c_client *client = sdata->client;
>>   	int ret;
>>   
>> -	ret = i2c_smbus_write_byte(sdata->client, STMFTS_SLEEP_OUT);
>> +	ret = i2c_smbus_write_byte(client, STMFTS_SLEEP_OUT);
> 
> Sorry but I do not see how using a temporary cleans things up compared
> to a simple structure member access, given that it happens only once
> here.

Thank you for applying rest of patchset.

This one can be postponed together with introducing fts5 support (where 
we need do more steps here).

David

> 
>>   	if (ret)
>>   		dev_err(dev, "failed to resume device: %d\n", ret);
>>   
>>
> 
> Thanks.
> 

-- 
David Heidelberg


      reply	other threads:[~2025-12-16  9:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-15 14:30 [PATCH 0/4] Input: small nitpick fixes David Heidelberg via B4 Relay
2025-12-15 14:30 ` [PATCH 1/4] Input: stmfts - correct wording for the warning message David Heidelberg via B4 Relay
2025-12-16  6:10   ` Dmitry Torokhov
2025-12-15 14:30 ` [PATCH 2/4] Input: stmfts - Make comments correct David Heidelberg via B4 Relay
2025-12-16  6:11   ` Dmitry Torokhov
2025-12-15 14:30 ` [PATCH 3/4] Input: stmfts - use sysfs_emit() instead of sprintf() David Heidelberg via B4 Relay
2025-12-16  6:11   ` Dmitry Torokhov
2025-12-15 14:30 ` [PATCH 4/4] Input: stmfts - use client to make future code cleaner David Heidelberg via B4 Relay
2025-12-16  6:13   ` Dmitry Torokhov
2025-12-16  9:13     ` David Heidelberg [this message]

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=f240f2d4-c691-4166-bd5a-4bd2fbe4d736@ixit.cz \
    --to=david@ixit.cz \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andi@etezian.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=javier@osg.samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=petr.hodina@protonmail.com \
    --cc=robh@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;
as well as URLs for NNTP newsgroup(s).