From: "Bodo Strößer" <bostroesser@gmail.com>
To: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>,
"Martin K. Petersen" <mkp@kernel.org>
Cc: linux-kernel@vger.kernel.org, Peng Fan <peng.fan@nxp.com>,
linux-scsi@vger.kernel.org, target-devel@vger.kernel.org
Subject: Re: [PATCH] target: use assign_bit() where applicable
Date: Mon, 21 Sep 2026 12:58:44 +0200 [thread overview]
Message-ID: <82fdf997-1e9a-4d67-88d3-fbd8a795b7bc@gmail.com> (raw)
In-Reply-To: <20260919130853.3041614-1-peng.fan@oss.nxp.com>
On 19/09/2026 15:08, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
>
> Convert open-coded if/else with set_bit/clear_bit to the assign_bit API.
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
> drivers/target/target_core_user.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c
> index edc2afd5f4ee..425ad1246a75 100644
> --- a/drivers/target/target_core_user.c
> +++ b/drivers/target/target_core_user.c
> @@ -3006,10 +3006,7 @@ static ssize_t tcmu_tmr_notification_store(struct config_item *item,
> if (val > 1)
> return -EINVAL;
>
> - if (val)
> - set_bit(TCMU_DEV_BIT_TMR_NOTIFY, &udev->flags);
> - else
> - clear_bit(TCMU_DEV_BIT_TMR_NOTIFY, &udev->flags);
> + assign_bit(TCMU_DEV_BIT_TMR_NOTIFY, &udev->flags, val);
> return count;
> }
> CONFIGFS_ATTR(tcmu_, tmr_notification);
Reviewed-by: Bodo Stroesser<bostroesser@gmail.com>
Best regards,
Bodo Strößer
prev parent reply other threads:[~2026-09-21 10:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-19 13:08 Peng Fan (OSS)
2026-09-21 10:58 ` Bodo Strößer [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=82fdf997-1e9a-4d67-88d3-fbd8a795b7bc@gmail.com \
--to=bostroesser@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mkp@kernel.org \
--cc=peng.fan@nxp.com \
--cc=peng.fan@oss.nxp.com \
--cc=target-devel@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 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®