netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: ethernet: renesas: rcar_gen4_ptp: Remove bool conversion
@ 2025-02-23 23:36 Thorsten Blum
  2025-02-24  9:49 ` Geert Uytterhoeven
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Thorsten Blum @ 2025-02-23 23:36 UTC (permalink / raw)
  To: Yoshihiro Shimoda, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Richard Cochran
  Cc: Thorsten Blum, netdev, linux-renesas-soc, linux-kernel

Remove the unnecessary bool conversion and simplify the code.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 drivers/net/ethernet/renesas/rcar_gen4_ptp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/renesas/rcar_gen4_ptp.c b/drivers/net/ethernet/renesas/rcar_gen4_ptp.c
index 72e7fcc56693..4c3e8cc5046f 100644
--- a/drivers/net/ethernet/renesas/rcar_gen4_ptp.c
+++ b/drivers/net/ethernet/renesas/rcar_gen4_ptp.c
@@ -29,8 +29,8 @@ static const struct rcar_gen4_ptp_reg_offset gen4_offs = {
 static int rcar_gen4_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
 {
 	struct rcar_gen4_ptp_private *ptp_priv = ptp_to_priv(ptp);
-	bool neg_adj = scaled_ppm < 0 ? true : false;
 	s64 addend = ptp_priv->default_addend;
+	bool neg_adj = scaled_ppm < 0;
 	s64 diff;
 
 	if (neg_adj)
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] net: ethernet: renesas: rcar_gen4_ptp: Remove bool conversion
  2025-02-23 23:36 [PATCH net-next] net: ethernet: renesas: rcar_gen4_ptp: Remove bool conversion Thorsten Blum
@ 2025-02-24  9:49 ` Geert Uytterhoeven
  2025-02-24 11:13 ` Niklas Söderlund
  2025-02-25  2:20 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2025-02-24  9:49 UTC (permalink / raw)
  To: Thorsten Blum
  Cc: Yoshihiro Shimoda, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Richard Cochran, netdev,
	linux-renesas-soc, linux-kernel

On Mon, 24 Feb 2025 at 00:37, Thorsten Blum <thorsten.blum@linux.dev> wrote:
> Remove the unnecessary bool conversion and simplify the code.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] net: ethernet: renesas: rcar_gen4_ptp: Remove bool conversion
  2025-02-23 23:36 [PATCH net-next] net: ethernet: renesas: rcar_gen4_ptp: Remove bool conversion Thorsten Blum
  2025-02-24  9:49 ` Geert Uytterhoeven
@ 2025-02-24 11:13 ` Niklas Söderlund
  2025-02-25  2:20 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Niklas Söderlund @ 2025-02-24 11:13 UTC (permalink / raw)
  To: Thorsten Blum
  Cc: Yoshihiro Shimoda, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Richard Cochran, netdev,
	linux-renesas-soc, linux-kernel

Hi Thorsten,

Thanks for your work.

On 2025-02-24 00:36:11 +0100, Thorsten Blum wrote:
> Remove the unnecessary bool conversion and simplify the code.
> 
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>

Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

> ---
>  drivers/net/ethernet/renesas/rcar_gen4_ptp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/renesas/rcar_gen4_ptp.c b/drivers/net/ethernet/renesas/rcar_gen4_ptp.c
> index 72e7fcc56693..4c3e8cc5046f 100644
> --- a/drivers/net/ethernet/renesas/rcar_gen4_ptp.c
> +++ b/drivers/net/ethernet/renesas/rcar_gen4_ptp.c
> @@ -29,8 +29,8 @@ static const struct rcar_gen4_ptp_reg_offset gen4_offs = {
>  static int rcar_gen4_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
>  {
>  	struct rcar_gen4_ptp_private *ptp_priv = ptp_to_priv(ptp);
> -	bool neg_adj = scaled_ppm < 0 ? true : false;
>  	s64 addend = ptp_priv->default_addend;
> +	bool neg_adj = scaled_ppm < 0;
>  	s64 diff;
>  
>  	if (neg_adj)
> -- 
> 2.48.1
> 
> 

-- 
Kind Regards,
Niklas Söderlund

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] net: ethernet: renesas: rcar_gen4_ptp: Remove bool conversion
  2025-02-23 23:36 [PATCH net-next] net: ethernet: renesas: rcar_gen4_ptp: Remove bool conversion Thorsten Blum
  2025-02-24  9:49 ` Geert Uytterhoeven
  2025-02-24 11:13 ` Niklas Söderlund
@ 2025-02-25  2:20 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-02-25  2:20 UTC (permalink / raw)
  To: Thorsten Blum
  Cc: yoshihiro.shimoda.uh, andrew+netdev, davem, edumazet, kuba,
	pabeni, richardcochran, netdev, linux-renesas-soc, linux-kernel

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Mon, 24 Feb 2025 00:36:11 +0100 you wrote:
> Remove the unnecessary bool conversion and simplify the code.
> 
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---
>  drivers/net/ethernet/renesas/rcar_gen4_ptp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
  - [net-next] net: ethernet: renesas: rcar_gen4_ptp: Remove bool conversion
    https://git.kernel.org/netdev/net-next/c/6538c8ca8ee1

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-02-25  2:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-23 23:36 [PATCH net-next] net: ethernet: renesas: rcar_gen4_ptp: Remove bool conversion Thorsten Blum
2025-02-24  9:49 ` Geert Uytterhoeven
2025-02-24 11:13 ` Niklas Söderlund
2025-02-25  2:20 ` patchwork-bot+netdevbpf

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