mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gregory CLEMENT <gregory.clement@bootlin.com>
To: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Russell King <linux@armlinux.org.uk>
Cc: linux-kernel@vger.kernel.org, Peng Fan <peng.fan@nxp.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] ARM: orion/gpio: use __assign_bit() where applicable
Date: Wed, 30 Sep 2026 21:57:31 +0200	[thread overview]
Message-ID: <871paa8qc4.fsf@BLaptop.bootlin.com> (raw)
In-Reply-To: <20260920022551.3145595-1-peng.fan@oss.nxp.com>

Hello Peng Fan,

> 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>

this file is now removed by the series "soc: deprecated platform
removal"
https://lore.kernel.org/all/20260701212353.2196041-1-arnd@kernel.org/

Gregory

> ---
>  arch/arm/plat-orion/gpio.c | 10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/plat-orion/gpio.c
> index 49e29b7894a3..a8412dba97f0 100644
> --- a/arch/arm/plat-orion/gpio.c
> +++ b/arch/arm/plat-orion/gpio.c
> @@ -275,15 +275,9 @@ void __init orion_gpio_set_valid(unsigned pin, int mode)
>  	if (mode == 1)
>  		mode = GPIO_INPUT_OK | GPIO_OUTPUT_OK;
>  
> -	if (mode & GPIO_INPUT_OK)
> -		__set_bit(pin, &ochip->valid_input);
> -	else
> -		__clear_bit(pin, &ochip->valid_input);
> +	__assign_bit(pin, &ochip->valid_input, mode & GPIO_INPUT_OK);
>  
> -	if (mode & GPIO_OUTPUT_OK)
> -		__set_bit(pin, &ochip->valid_output);
> -	else
> -		__clear_bit(pin, &ochip->valid_output);
> +	__assign_bit(pin, &ochip->valid_output, mode & GPIO_OUTPUT_OK);
>  }
>  
>  void orion_gpio_set_blink(unsigned pin, int blink)
> -- 
> 2.51.0
>

-- 
Grégory CLEMENT, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

      reply	other threads:[~2026-09-30 19:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-20  2:25 Peng Fan (OSS)
2026-09-30 19:57 ` Gregory CLEMENT [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=871paa8qc4.fsf@BLaptop.bootlin.com \
    --to=gregory.clement@bootlin.com \
    --cc=andrew@lunn.ch \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=peng.fan@nxp.com \
    --cc=peng.fan@oss.nxp.com \
    --cc=sebastian.hesselbarth@gmail.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®