From: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Antoniu Miclaus" <antoniu.miclaus@analog.com>,
"Andrew Ijano" <andrew.ijano@gmail.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org, error27@gmail.com
Subject: Re: [PATCH v4 next 3/6] iio: sca3000: make stop_all_interrupts() return void
Date: Wed, 4 Feb 2026 17:36:30 +0530 [thread overview]
Message-ID: <046db6b8-7daf-4bad-a24b-974894e599ad@oracle.com> (raw)
In-Reply-To: <aYMY6AHtc45l4kb3@smile.fi.intel.com>
Hi Andy,
On 04/02/26 15:31, Andy Shevchenko wrote:
> On Wed, Feb 04, 2026 at 02:50:54PM +0530, Harshit Mogalapalli wrote:
>> On 04/02/26 14:33, Andy Shevchenko wrote:
>>> On Tue, Feb 03, 2026 at 10:11:58PM -0800, Harshit Mogalapalli wrote:
>
> ...
>
>>>> ret = sca3000_read_data_short(st, SCA3000_REG_INT_MASK_ADDR, 1);
>>>> if (ret)
>>>> - goto error_ret;
>>>
>>>> -error_ret:
>>>> + goto out_unlock;
>>>
>>>> +out_unlock:
>>>
>>> While this is correct change semantically, it's not needed as very soon
>>> the other patch drops this for good, hence leave the label name unmodified.
>>
>> Agree, I was doubtful on which is the preferred approach as its not really a
>> return anymore. But thanks for explaining.
>
> The common sense says that we need to avoid ping-pong coding (*) in the series.
>
> *It's when one patch in the series adds the code that's going to be deleted or
> heavily modified just later in the very same series.
>
Sure thanks for explaining, I was thinking about it from a backport
point of view(say this patch is auto selected as a prerequisite for
applying another patch, but guard patch is not selected because there is
no cleanup.h is some older kernel), in that case if this patch alone
gets backported but not the gaurd() patch, err_return label might not
look great. But I agree its not likely to happen in this case.
Thanks for sharing your thoughts.
Regards,
Harshit
next prev parent reply other threads:[~2026-02-04 12:06 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-04 6:11 [PATCH v4 next 0/6] IIO: sca3000: devm resource management Harshit Mogalapalli
2026-02-04 6:11 ` [PATCH v4 next 1/6] iio: sca3000: reuse device pointer for devm helpers Harshit Mogalapalli
2026-02-04 6:11 ` [PATCH v4 next 2/6] iio: sca3000: switch IRQ handling to " Harshit Mogalapalli
2026-02-04 6:11 ` [PATCH v4 next 3/6] iio: sca3000: make stop_all_interrupts() return void Harshit Mogalapalli
2026-02-04 9:03 ` Andy Shevchenko
2026-02-04 9:20 ` Harshit Mogalapalli
2026-02-04 10:01 ` Andy Shevchenko
2026-02-04 12:06 ` Harshit Mogalapalli [this message]
2026-02-04 6:11 ` [PATCH v4 next 4/6] iio: sca3000: use guard(mutex) to simplify return paths Harshit Mogalapalli
2026-02-04 8:57 ` Andy Shevchenko
2026-02-04 6:12 ` [PATCH v4 next 5/6] iio: sca3000: stop interrupts via devm_add_action_or_reset() Harshit Mogalapalli
2026-02-04 9:01 ` Andy Shevchenko
2026-02-04 9:22 ` Harshit Mogalapalli
2026-02-04 6:12 ` [PATCH v4 next 6/6] iio: sca3000: manage device registration with devm helper Harshit Mogalapalli
2026-02-04 9:04 ` Andy Shevchenko
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=046db6b8-7daf-4bad-a24b-974894e599ad@oracle.com \
--to=harshit.m.mogalapalli@oracle.com \
--cc=andrew.ijano@gmail.com \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=antoniu.miclaus@analog.com \
--cc=dlechner@baylibre.com \
--cc=error27@gmail.com \
--cc=jic23@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.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®