U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] usb: dwc3: am62: Staticize and constify driver ops
@ 2026-05-10 17:16 Marek Vasut
  2026-05-10 17:16 ` [PATCH 2/3] usb: dwc3: sti: " Marek Vasut
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Marek Vasut @ 2026-05-10 17:16 UTC (permalink / raw)
  To: u-boot; +Cc: Marek Vasut, Tom Rini

Set the ops structure as static const. The structure is not accessible
from outside of this driver and is not going to be modified at runtime.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
---
Cc: Tom Rini <trini@konsulko.com>
Cc: u-boot@lists.denx.de
---
 drivers/usb/dwc3/dwc3-am62.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/dwc3/dwc3-am62.c b/drivers/usb/dwc3/dwc3-am62.c
index 99519602eb2..8cb5796b6ad 100644
--- a/drivers/usb/dwc3/dwc3-am62.c
+++ b/drivers/usb/dwc3/dwc3-am62.c
@@ -105,7 +105,7 @@ static void dwc3_ti_am62_glue_configure(struct udevice *dev, int index,
 	writel(reg, usbss + USBSS_MODE_CONTROL);
 }
 
-struct dwc3_glue_ops ti_am62_ops = {
+static const struct dwc3_glue_ops ti_am62_ops = {
 	.glue_configure = dwc3_ti_am62_glue_configure,
 };
 
-- 
2.53.0


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

* [PATCH 2/3] usb: dwc3: sti: Staticize and constify driver ops
  2026-05-10 17:16 [PATCH 1/3] usb: dwc3: am62: Staticize and constify driver ops Marek Vasut
@ 2026-05-10 17:16 ` Marek Vasut
  2026-05-11  9:07   ` Mattijs Korpershoek
  2026-05-10 17:16 ` [PATCH 3/3] usb: dwc3: generic: " Marek Vasut
  2026-05-11  9:07 ` [PATCH 1/3] usb: dwc3: am62: " Mattijs Korpershoek
  2 siblings, 1 reply; 6+ messages in thread
From: Marek Vasut @ 2026-05-10 17:16 UTC (permalink / raw)
  To: u-boot; +Cc: Marek Vasut, Tom Rini

Set the ops structure as static const. The structure is not accessible
from outside of this driver and is not going to be modified at runtime.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
---
Cc: Tom Rini <trini@konsulko.com>
Cc: u-boot@lists.denx.de
---
 drivers/usb/dwc3/dwc3-generic-sti.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/dwc3/dwc3-generic-sti.c b/drivers/usb/dwc3/dwc3-generic-sti.c
index b34f5ceceac..ce195b2553b 100644
--- a/drivers/usb/dwc3/dwc3-generic-sti.c
+++ b/drivers/usb/dwc3/dwc3-generic-sti.c
@@ -114,7 +114,7 @@ static void dwc3_stih407_glue_configure(struct udevice *dev, int index,
 	setbits_le32(glue_base + CLKRST_CTRL, SW_PIPEW_RESET_N);
 };
 
-struct dwc3_glue_ops stih407_ops = {
+static const struct dwc3_glue_ops stih407_ops = {
 	.glue_configure = dwc3_stih407_glue_configure,
 };
 
-- 
2.53.0


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

* [PATCH 3/3] usb: dwc3: generic: Staticize and constify driver ops
  2026-05-10 17:16 [PATCH 1/3] usb: dwc3: am62: Staticize and constify driver ops Marek Vasut
  2026-05-10 17:16 ` [PATCH 2/3] usb: dwc3: sti: " Marek Vasut
@ 2026-05-10 17:16 ` Marek Vasut
  2026-05-11  9:08   ` Mattijs Korpershoek
  2026-05-11  9:07 ` [PATCH 1/3] usb: dwc3: am62: " Mattijs Korpershoek
  2 siblings, 1 reply; 6+ messages in thread
From: Marek Vasut @ 2026-05-10 17:16 UTC (permalink / raw)
  To: u-boot
  Cc: Marek Vasut, Balaji Selvanathan, Casey Connolly, Jonas Karlman,
	Kaustabh Chakraborty, Kever Yang, Mattijs Korpershoek,
	Sam Protsenko, Tom Rini

Set the ops structure as static const. The structure is not accessible
from outside of this driver and is not going to be modified at runtime.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
---
Cc: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
Cc: Casey Connolly <casey.connolly@linaro.org>
Cc: Jonas Karlman <jonas@kwiboo.se>
Cc: Kaustabh Chakraborty <kauschluss@disroot.org>
Cc: Kever Yang <kever.yang@rock-chips.com>
Cc: Mattijs Korpershoek <mkorpershoek@kernel.org>
Cc: Sam Protsenko <semen.protsenko@linaro.org>
Cc: Tom Rini <trini@konsulko.com>
Cc: u-boot@lists.denx.de
---
 drivers/usb/dwc3/dwc3-generic.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c
index 22b9ef0b24e..2356b3bc0aa 100644
--- a/drivers/usb/dwc3/dwc3-generic.c
+++ b/drivers/usb/dwc3/dwc3-generic.c
@@ -330,7 +330,7 @@ void dwc3_imx8mp_glue_configure(struct udevice *dev, int index,
 	unmap_physmem(base, MAP_NOCACHE);
 }
 
-struct dwc3_glue_ops imx8mp_ops = {
+static const struct dwc3_glue_ops imx8mp_ops = {
 	.glue_configure = dwc3_imx8mp_glue_configure,
 };
 
@@ -414,7 +414,7 @@ enum dwc3_omap_utmi_mode {
 	unmap_physmem(base, MAP_NOCACHE);
 }
 
-struct dwc3_glue_ops ti_ops = {
+static const struct dwc3_glue_ops ti_ops = {
 	.glue_configure = dwc3_ti_glue_configure,
 };
 
@@ -506,16 +506,16 @@ static int dwc3_flat_dt_get_ctrl_dev(struct udevice *dev, ofnode *node)
 	return 0;
 }
 
-struct dwc3_glue_ops qcom_ops = {
+static const struct dwc3_glue_ops qcom_ops = {
 	.glue_configure = dwc3_qcom_glue_configure,
 };
 
-struct dwc3_glue_ops qcom_flat_dt_ops = {
+static const struct dwc3_glue_ops qcom_flat_dt_ops = {
 	.glue_configure = dwc3_qcom_glue_configure,
 	.glue_get_ctrl_dev = dwc3_flat_dt_get_ctrl_dev,
 };
 
-struct dwc3_glue_ops rk_ops = {
+static const struct dwc3_glue_ops rk_ops = {
 	.glue_get_ctrl_dev = dwc3_flat_dt_get_ctrl_dev,
 };
 
-- 
2.53.0


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

* Re: [PATCH 1/3] usb: dwc3: am62: Staticize and constify driver ops
  2026-05-10 17:16 [PATCH 1/3] usb: dwc3: am62: Staticize and constify driver ops Marek Vasut
  2026-05-10 17:16 ` [PATCH 2/3] usb: dwc3: sti: " Marek Vasut
  2026-05-10 17:16 ` [PATCH 3/3] usb: dwc3: generic: " Marek Vasut
@ 2026-05-11  9:07 ` Mattijs Korpershoek
  2 siblings, 0 replies; 6+ messages in thread
From: Mattijs Korpershoek @ 2026-05-11  9:07 UTC (permalink / raw)
  To: Marek Vasut, u-boot; +Cc: Marek Vasut, Tom Rini

Hi Marek,

Thank you for the patch.

On Sun, May 10, 2026 at 19:16, Marek Vasut <marek.vasut+renesas@mailbox.org> wrote:

> Set the ops structure as static const. The structure is not accessible
> from outside of this driver and is not going to be modified at runtime.
>
> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>

Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>


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

* Re: [PATCH 2/3] usb: dwc3: sti: Staticize and constify driver ops
  2026-05-10 17:16 ` [PATCH 2/3] usb: dwc3: sti: " Marek Vasut
@ 2026-05-11  9:07   ` Mattijs Korpershoek
  0 siblings, 0 replies; 6+ messages in thread
From: Mattijs Korpershoek @ 2026-05-11  9:07 UTC (permalink / raw)
  To: Marek Vasut, u-boot; +Cc: Marek Vasut, Tom Rini

Hi Marek,

Thank you for the patch.

On Sun, May 10, 2026 at 19:16, Marek Vasut <marek.vasut+renesas@mailbox.org> wrote:

> Set the ops structure as static const. The structure is not accessible
> from outside of this driver and is not going to be modified at runtime.
>
> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>

Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>


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

* Re: [PATCH 3/3] usb: dwc3: generic: Staticize and constify driver ops
  2026-05-10 17:16 ` [PATCH 3/3] usb: dwc3: generic: " Marek Vasut
@ 2026-05-11  9:08   ` Mattijs Korpershoek
  0 siblings, 0 replies; 6+ messages in thread
From: Mattijs Korpershoek @ 2026-05-11  9:08 UTC (permalink / raw)
  To: Marek Vasut, u-boot
  Cc: Marek Vasut, Balaji Selvanathan, Casey Connolly, Jonas Karlman,
	Kaustabh Chakraborty, Kever Yang, Mattijs Korpershoek,
	Sam Protsenko, Tom Rini

Hi Marek,

Thank you for the patch.

On Sun, May 10, 2026 at 19:16, Marek Vasut <marek.vasut+renesas@mailbox.org> wrote:

> Set the ops structure as static const. The structure is not accessible
> from outside of this driver and is not going to be modified at runtime.
>
> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>

Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>


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

end of thread, other threads:[~2026-05-11  9:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-10 17:16 [PATCH 1/3] usb: dwc3: am62: Staticize and constify driver ops Marek Vasut
2026-05-10 17:16 ` [PATCH 2/3] usb: dwc3: sti: " Marek Vasut
2026-05-11  9:07   ` Mattijs Korpershoek
2026-05-10 17:16 ` [PATCH 3/3] usb: dwc3: generic: " Marek Vasut
2026-05-11  9:08   ` Mattijs Korpershoek
2026-05-11  9:07 ` [PATCH 1/3] usb: dwc3: am62: " Mattijs Korpershoek

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