mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sanjay Chitroda <sanjayembeddedse@gmail.com>
To: Joshua Crofts <crofts@kernel.org>,
	Sanjay Chitroda via B4 Relay
	<devnull+sanjayembeddedse.gmail.com@kernel.org>
Cc: "Jiri Kosina" <jikos@kernel.org>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"Srinivas Pandruvada" <srinivas.pandruvada@linux.intel.com>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	linux-input@vger.kernel.org, linux-iio@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/5] iio: Remove redundant probe error messages for HID device drivers
Date: Mon, 16 Nov 2026 12:12:02 +0530	[thread overview]
Message-ID: <0CDD7FDE-6E03-473F-8910-2C33973F23E0@gmail.com> (raw)
In-Reply-To: <20261105165254.00000896@kernel.org>



On 5 November 2026 9:22:54 pm IST, Joshua Crofts <crofts@kernel.org> wrote:
>On Thu, 5 Nov 2026 14:40:36 +0100
>Joshua Crofts <crofts@kernel.org> wrote:
>
>> On Thu, 05 Nov 2026 18:11:43 +0530
>> Sanjay Chitroda via B4 Relay <devnull+sanjayembeddedse.gmail.com@kernel.org> wrote:
>> 
>> ...
>> 
>> > @@ -377,20 +377,16 @@ static int hid_accel_3d_probe(struct platform_device *pdev)
>> >  
>> >  	ret = devm_hid_sensor_setup_trigger(dev, indio_dev, name,
>> >  					    &accel_state->common_attributes);
>> > -	if (ret < 0) {
>> > -		dev_err(&pdev->dev, "trigger setup failed\n");
>> > +	if (ret < 0)
>> 
>> You could also remove the comparison and just change the checks to `if (ret)`,
>> as devm_hid_sensor_setup_trigger() always returns zero on success.
>
>I suppose you could also add a precursor patch that changes `return ret` to
>`return 0` in devm_hid_sensor_setup_trigger() on success.
Hi Joshua,

Thank you the review and input.

I agree with your point to replace (ret < 0) with (ret) as devm API returns zero on success.

Do we find value to add new check and have `return 0` ?
devm_add_action_or_reset() is last operation in devm_hid_sensor_setup_trigger() API which makes direct return as simple to follow.

Based on your suggestion will send v2 with additional changes as trailing in the series.
>

  reply	other threads:[~2026-11-16  6:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-05 12:41 [PATCH 0/5] HID: iio: Unify probe-path logging Sanjay Chitroda via B4 Relay
2026-11-05 12:41 ` [PATCH 1/5] iio: Remove redundant probe error messages for HID device drivers Sanjay Chitroda via B4 Relay
2026-11-05 13:40   ` Joshua Crofts
2026-11-05 15:52     ` Joshua Crofts
2026-11-16  6:42       ` Sanjay Chitroda [this message]
2026-11-05 12:41 ` [PATCH 2/5] iio: Remove redundant devm_kmemdup() allocation failure messages Sanjay Chitroda via B4 Relay
2026-11-05 12:41 ` [PATCH 3/5] iio: magnetometer: hid-sensor-magn-3d: drop redundant probe error messages Sanjay Chitroda via B4 Relay
2026-11-05 12:41 ` [PATCH 4/5] iio: Use dev_err_probe() in HID IIO device drivers Sanjay Chitroda via B4 Relay
2026-11-05 12:41 ` [PATCH 5/5] iio: add probe error messages to hid humidity and temperature drivers Sanjay Chitroda via B4 Relay
2026-11-07  4:03 ` [PATCH 0/5] HID: iio: Unify probe-path logging Jonathan Cameron

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=0CDD7FDE-6E03-473F-8910-2C33973F23E0@gmail.com \
    --to=sanjayembeddedse@gmail.com \
    --cc=andy@kernel.org \
    --cc=crofts@kernel.org \
    --cc=devnull+sanjayembeddedse.gmail.com@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=jikos@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=srinivas.pandruvada@linux.intel.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 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®