CIP-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 6.1.y-cip 0/3] Remove duplicate field_get()
@ 2026-10-13 22:35 Nobuhiro Iwamatsu
  2026-10-13 22:35 ` [PATCH 6.1.y-cip 1/3] irqchip/renesas-rzv2h: " Nobuhiro Iwamatsu
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Nobuhiro Iwamatsu @ 2026-10-13 22:35 UTC (permalink / raw)
  To: cip-dev; +Cc: pavel, uli, john.madieu.xa, biju.das.jz

Hi,


This series fixes the duplication of field_get() introduced by the LTS commit
94cad2c26306 ("bitfield: Add non-constant field_{prep,get}() helpers").

Geert Uytterhoeven (1):
  soc: renesas: rz-sysc: Convert to common field_get() helper

Nobuhiro Iwamatsu (2):
  irqchip/renesas-rzv2h: Remove duplicate field_get()
  PCI: rzg3s-host: Remove duplicate field_get()

 drivers/irqchip/irq-renesas-rzv2h.c      | 2 --
 drivers/pci/controller/pcie-rzg3s-host.c | 2 --
 drivers/soc/renesas/rz-sysc.c            | 3 +--
 3 files changed, 1 insertion(+), 6 deletions(-)

-- 
2.55.0




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

* [PATCH 6.1.y-cip 1/3] irqchip/renesas-rzv2h: Remove duplicate field_get()
  2026-10-13 22:35 [PATCH 6.1.y-cip 0/3] Remove duplicate field_get() Nobuhiro Iwamatsu
@ 2026-10-13 22:35 ` Nobuhiro Iwamatsu
  2026-10-14 15:20   ` [cip-dev] " claudiu beznea
  2026-10-13 22:35 ` [PATCH 6.1.y-cip 2/3] PCI: rzg3s-host: " Nobuhiro Iwamatsu
  2026-10-13 22:35 ` [PATCH 6.1.y-cip 3/3] soc: renesas: rz-sysc: Convert to common field_get() helper Nobuhiro Iwamatsu
  2 siblings, 1 reply; 7+ messages in thread
From: Nobuhiro Iwamatsu @ 2026-10-13 22:35 UTC (permalink / raw)
  To: cip-dev; +Cc: pavel, uli, john.madieu.xa, biju.das.jz, Nobuhiro Iwamatsu

The LTS commit 94cad2c26306 ("bitfield: Add non-constant field_{prep,get}()
helpers") causes a duplicate definition of field_get().
This removes field_get() from irq-renesas-rzv2h.c, where the modification
was made.

```
  HDRTEST usr/include/asm/resource.h
drivers/irqchip/irq-renesas-rzv2h.c:115:9: error: ‘field_get’ redefined [-Werror]
  115 | #define field_get(_mask, _reg) (((_reg) & (_mask)) >> (ffs(_mask) - 1))
      |         ^~~~~~~~~
In file included from drivers/irqchip/irq-renesas-rzv2h.c:12:
./include/linux/bitfield.h:297:9: note: this is the location of the previous definition
  297 | #define field_get(mask, reg)                                            \
      |         ^~~~~~~~~
```

Fixes: e4b95469c6a1 ("irqchip/renesas-rzv2h: Prevent TINT spurious interrupt during resume")
Cc: Biju Das <biju.das.jz@bp.renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.x90@mail.toshiba>
---
 drivers/irqchip/irq-renesas-rzv2h.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/irqchip/irq-renesas-rzv2h.c b/drivers/irqchip/irq-renesas-rzv2h.c
index 0e0c3b3e85bd28..b7a41479950593 100644
--- a/drivers/irqchip/irq-renesas-rzv2h.c
+++ b/drivers/irqchip/irq-renesas-rzv2h.c
@@ -112,8 +112,6 @@
 #define ICU_NUM_BE				4
 #define ICU_NUM_A55ERR				4
 
-#define field_get(_mask, _reg) (((_reg) & (_mask)) >> (ffs(_mask) - 1))
-
 /**
  * struct rzv2h_irqc_reg_cache - registers cache (necessary for suspend/resume)
  * @nitsr: ICU_NITSR register
-- 
2.55.0




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

* [PATCH 6.1.y-cip 2/3] PCI: rzg3s-host: Remove duplicate field_get()
  2026-10-13 22:35 [PATCH 6.1.y-cip 0/3] Remove duplicate field_get() Nobuhiro Iwamatsu
  2026-10-13 22:35 ` [PATCH 6.1.y-cip 1/3] irqchip/renesas-rzv2h: " Nobuhiro Iwamatsu
@ 2026-10-13 22:35 ` Nobuhiro Iwamatsu
  2026-10-14 15:20   ` [cip-dev] " claudiu beznea
  2026-10-13 22:35 ` [PATCH 6.1.y-cip 3/3] soc: renesas: rz-sysc: Convert to common field_get() helper Nobuhiro Iwamatsu
  2 siblings, 1 reply; 7+ messages in thread
From: Nobuhiro Iwamatsu @ 2026-10-13 22:35 UTC (permalink / raw)
  To: cip-dev; +Cc: pavel, uli, john.madieu.xa, biju.das.jz, Nobuhiro Iwamatsu

The LTS commit 94cad2c26306 ("bitfield: Add non-constant field_{prep,get}()
helpers") causes a duplicate definition of field_get().
This removes field_get() from pcie-rzg3s-host.c, where the modification
was made.

```
drivers/pci/controller/pcie-rzg3s-host.c:181:9: error: ‘field_prep’ redefined [-Werror]
  181 | #define field_prep(_mask, _val) (((_val) << (ffs(_mask) - 1)) & (_mask))
      |         ^~~~~~~~~~
In file included from drivers/pci/controller/pcie-rzg3s-host.c:12:
./include/linux/bitfield.h:277:9: note: this is the location of the previous definition
  277 | #define field_prep(mask, val)                                           \
      |         ^~~~~~~~~~
```

Fixes: d71d7aba7486 ("PCI: rzg3s-host: Revert generic field helpers, use a local field_prep()")
Cc: John Madieu <john.madieu.xa@bp.renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.x90@mail.toshiba>
---
 drivers/pci/controller/pcie-rzg3s-host.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/pci/controller/pcie-rzg3s-host.c b/drivers/pci/controller/pcie-rzg3s-host.c
index 45cc2f3782aba3..1b92371292ddeb 100644
--- a/drivers/pci/controller/pcie-rzg3s-host.c
+++ b/drivers/pci/controller/pcie-rzg3s-host.c
@@ -178,8 +178,6 @@
 /* Timeouts experimentally determined */
 #define RZG3S_REQ_ISSUE_TIMEOUT_US		2500
 
-#define field_prep(_mask, _val) (((_val) << (ffs(_mask) - 1)) & (_mask))
-
 /**
  * struct rzg3s_sysc_function - System Controller function descriptor
  * @offset: Register offset from the System Controller base address
-- 
2.55.0




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

* [PATCH 6.1.y-cip 3/3] soc: renesas: rz-sysc: Convert to common field_get() helper
  2026-10-13 22:35 [PATCH 6.1.y-cip 0/3] Remove duplicate field_get() Nobuhiro Iwamatsu
  2026-10-13 22:35 ` [PATCH 6.1.y-cip 1/3] irqchip/renesas-rzv2h: " Nobuhiro Iwamatsu
  2026-10-13 22:35 ` [PATCH 6.1.y-cip 2/3] PCI: rzg3s-host: " Nobuhiro Iwamatsu
@ 2026-10-13 22:35 ` Nobuhiro Iwamatsu
  2026-10-14 15:21   ` [cip-dev] " claudiu beznea
  2 siblings, 1 reply; 7+ messages in thread
From: Nobuhiro Iwamatsu @ 2026-10-13 22:35 UTC (permalink / raw)
  To: cip-dev; +Cc: pavel, uli, john.madieu.xa, biju.das.jz, Nobuhiro Iwamatsu

From: Geert Uytterhoeven <geert+renesas@glider.be>

commit 610c4408a2f7a09a00f656459e762ee1e21bbd7b upstream.

Drop the driver-specific field_get() macro, in favor of the globally
available variant from <linux/bitfield.h>.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
[iwamatsu: Drop '#undef field_get']
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.x90@mail.toshiba>
---
 drivers/soc/renesas/rz-sysc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/soc/renesas/rz-sysc.c b/drivers/soc/renesas/rz-sysc.c
index 19c1e666279b75..ae727d9c8cc523 100644
--- a/drivers/soc/renesas/rz-sysc.c
+++ b/drivers/soc/renesas/rz-sysc.c
@@ -5,6 +5,7 @@
  * Copyright (C) 2024 Renesas Electronics Corp.
  */
 
+#include <linux/bitfield.h>
 #include <linux/cleanup.h>
 #include <linux/io.h>
 #include <linux/mfd/syscon.h>
@@ -16,8 +17,6 @@
 
 #include "rz-sysc.h"
 
-#define field_get(_mask, _reg) (((_reg) & (_mask)) >> (ffs(_mask) - 1))
-
 /**
  * struct rz_sysc - RZ SYSC private data structure
  * @base: SYSC base address
-- 
2.55.0




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

* Re: [cip-dev] [PATCH 6.1.y-cip 2/3] PCI: rzg3s-host: Remove duplicate field_get()
  2026-10-13 22:35 ` [PATCH 6.1.y-cip 2/3] PCI: rzg3s-host: " Nobuhiro Iwamatsu
@ 2026-10-14 15:20   ` claudiu beznea
  0 siblings, 0 replies; 7+ messages in thread
From: claudiu beznea @ 2026-10-14 15:20 UTC (permalink / raw)
  To: nobuhiro.iwamatsu.x90, cip-dev; +Cc: pavel, uli, john.madieu.xa, biju.das.jz



On 10/14/26 01:35, Nobuhiro Iwamatsu via lists.cip-project.org wrote:
> The LTS commit 94cad2c26306 ("bitfield: Add non-constant field_{prep,get}()
> helpers") causes a duplicate definition of field_get().
> This removes field_get() from pcie-rzg3s-host.c, where the modification
> was made.
> 
> ```
> drivers/pci/controller/pcie-rzg3s-host.c:181:9: error: ‘field_prep’ redefined [-Werror]
>    181 | #define field_prep(_mask, _val) (((_val) << (ffs(_mask) - 1)) & (_mask))
>        |         ^~~~~~~~~~
> In file included from drivers/pci/controller/pcie-rzg3s-host.c:12:
> ./include/linux/bitfield.h:277:9: note: this is the location of the previous definition
>    277 | #define field_prep(mask, val)                                           \
>        |         ^~~~~~~~~~
> ```
> 
> Fixes: d71d7aba7486 ("PCI: rzg3s-host: Revert generic field helpers, use a local field_prep()")
> Cc: John Madieu<john.madieu.xa@bp.renesas.com>
> Signed-off-by: Nobuhiro Iwamatsu<nobuhiro.iwamatsu.x90@mail.toshiba>

Reviewed-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>




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

* Re: [cip-dev] [PATCH 6.1.y-cip 1/3] irqchip/renesas-rzv2h: Remove duplicate field_get()
  2026-10-13 22:35 ` [PATCH 6.1.y-cip 1/3] irqchip/renesas-rzv2h: " Nobuhiro Iwamatsu
@ 2026-10-14 15:20   ` claudiu beznea
  0 siblings, 0 replies; 7+ messages in thread
From: claudiu beznea @ 2026-10-14 15:20 UTC (permalink / raw)
  To: nobuhiro.iwamatsu.x90, cip-dev; +Cc: pavel, uli, john.madieu.xa, biju.das.jz



On 10/14/26 01:35, Nobuhiro Iwamatsu via lists.cip-project.org wrote:
> The LTS commit 94cad2c26306 ("bitfield: Add non-constant field_{prep,get}()
> helpers") causes a duplicate definition of field_get().
> This removes field_get() from irq-renesas-rzv2h.c, where the modification
> was made.
> 
> ```
>    HDRTEST usr/include/asm/resource.h
> drivers/irqchip/irq-renesas-rzv2h.c:115:9: error: ‘field_get’ redefined [-Werror]
>    115 | #define field_get(_mask, _reg) (((_reg) & (_mask)) >> (ffs(_mask) - 1))
>        |         ^~~~~~~~~
> In file included from drivers/irqchip/irq-renesas-rzv2h.c:12:
> ./include/linux/bitfield.h:297:9: note: this is the location of the previous definition
>    297 | #define field_get(mask, reg)                                            \
>        |         ^~~~~~~~~
> ```
> 
> Fixes: e4b95469c6a1 ("irqchip/renesas-rzv2h: Prevent TINT spurious interrupt during resume")
> Cc: Biju Das <biju.das.jz@bp.renesas.com>
> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.x90@mail.toshiba>
Reviewed-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>



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

* Re: [cip-dev] [PATCH 6.1.y-cip 3/3] soc: renesas: rz-sysc: Convert to common field_get() helper
  2026-10-13 22:35 ` [PATCH 6.1.y-cip 3/3] soc: renesas: rz-sysc: Convert to common field_get() helper Nobuhiro Iwamatsu
@ 2026-10-14 15:21   ` claudiu beznea
  0 siblings, 0 replies; 7+ messages in thread
From: claudiu beznea @ 2026-10-14 15:21 UTC (permalink / raw)
  To: nobuhiro.iwamatsu.x90, cip-dev; +Cc: pavel, uli, john.madieu.xa, biju.das.jz



On 10/14/26 01:35, Nobuhiro Iwamatsu via lists.cip-project.org wrote:
> From: Geert Uytterhoeven<geert+renesas@glider.be>
> 
> commit 610c4408a2f7a09a00f656459e762ee1e21bbd7b upstream.
> 
> Drop the driver-specific field_get() macro, in favor of the globally
> available variant from <linux/bitfield.h>.
> 
> Signed-off-by: Geert Uytterhoeven<geert+renesas@glider.be>
> Reviewed-by: Claudiu Beznea<claudiu.beznea.uj@bp.renesas.com>
> Signed-off-by: Yury Norov (NVIDIA)<yury.norov@gmail.com>
> [iwamatsu: Drop '#undef field_get']
> Signed-off-by: Nobuhiro Iwamatsu<nobuhiro.iwamatsu.x90@mail.toshiba>

Reviewed-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>


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

end of thread, other threads:[~2026-10-14 15:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-13 22:35 [PATCH 6.1.y-cip 0/3] Remove duplicate field_get() Nobuhiro Iwamatsu
2026-10-13 22:35 ` [PATCH 6.1.y-cip 1/3] irqchip/renesas-rzv2h: " Nobuhiro Iwamatsu
2026-10-14 15:20   ` [cip-dev] " claudiu beznea
2026-10-13 22:35 ` [PATCH 6.1.y-cip 2/3] PCI: rzg3s-host: " Nobuhiro Iwamatsu
2026-10-14 15:20   ` [cip-dev] " claudiu beznea
2026-10-13 22:35 ` [PATCH 6.1.y-cip 3/3] soc: renesas: rz-sysc: Convert to common field_get() helper Nobuhiro Iwamatsu
2026-10-14 15:21   ` [cip-dev] " claudiu beznea

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox