All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] phy: fsl-imx8mq-usb: Constify imx8mp_usb_phy_ops
@ 2020-09-26 20:58 ` Rikard Falkeborn
  0 siblings, 0 replies; 4+ messages in thread
From: Rikard Falkeborn @ 2020-09-26 20:58 UTC (permalink / raw)
  To: Kishon Vijay Abraham I
  Cc: Vinod Koul, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team, linux-kernel, linux-arm-kernel,
	Li Jun, Rikard Falkeborn

The only usage of imx8mp_usb_phy_ops is to assign its address to the
data field in the of_device_id struct, which is a const void pointer.
Make it const to allow the compiler to put it in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
---
 drivers/phy/freescale/phy-fsl-imx8mq-usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
index 62d6d6849ad6..47a0c09bc9fa 100644
--- a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
+++ b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
@@ -131,7 +131,7 @@ static const struct phy_ops imx8mq_usb_phy_ops = {
 	.owner		= THIS_MODULE,
 };
 
-static struct phy_ops imx8mp_usb_phy_ops = {
+static const struct phy_ops imx8mp_usb_phy_ops = {
 	.init		= imx8mp_usb_phy_init,
 	.power_on	= imx8mq_phy_power_on,
 	.power_off	= imx8mq_phy_power_off,
-- 
2.28.0


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

* [PATCH] phy: fsl-imx8mq-usb: Constify imx8mp_usb_phy_ops
@ 2020-09-26 20:58 ` Rikard Falkeborn
  0 siblings, 0 replies; 4+ messages in thread
From: Rikard Falkeborn @ 2020-09-26 20:58 UTC (permalink / raw)
  To: Kishon Vijay Abraham I
  Cc: Shawn Guo, Sascha Hauer, linux-kernel, Rikard Falkeborn,
	Vinod Koul, NXP Linux Team, Pengutronix Kernel Team,
	Fabio Estevam, linux-arm-kernel, Li Jun

The only usage of imx8mp_usb_phy_ops is to assign its address to the
data field in the of_device_id struct, which is a const void pointer.
Make it const to allow the compiler to put it in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
---
 drivers/phy/freescale/phy-fsl-imx8mq-usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
index 62d6d6849ad6..47a0c09bc9fa 100644
--- a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
+++ b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
@@ -131,7 +131,7 @@ static const struct phy_ops imx8mq_usb_phy_ops = {
 	.owner		= THIS_MODULE,
 };
 
-static struct phy_ops imx8mp_usb_phy_ops = {
+static const struct phy_ops imx8mp_usb_phy_ops = {
 	.init		= imx8mp_usb_phy_init,
 	.power_on	= imx8mq_phy_power_on,
 	.power_off	= imx8mq_phy_power_off,
-- 
2.28.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] phy: fsl-imx8mq-usb: Constify imx8mp_usb_phy_ops
  2020-09-26 20:58 ` Rikard Falkeborn
@ 2020-10-28 16:08   ` Vinod Koul
  -1 siblings, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2020-10-28 16:08 UTC (permalink / raw)
  To: Rikard Falkeborn
  Cc: Kishon Vijay Abraham I, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	linux-kernel, linux-arm-kernel, Li Jun

On 26-09-20, 22:58, Rikard Falkeborn wrote:
> The only usage of imx8mp_usb_phy_ops is to assign its address to the
> data field in the of_device_id struct, which is a const void pointer.
> Make it const to allow the compiler to put it in read-only memory.

Applied, thanks

-- 
~Vinod

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

* Re: [PATCH] phy: fsl-imx8mq-usb: Constify imx8mp_usb_phy_ops
@ 2020-10-28 16:08   ` Vinod Koul
  0 siblings, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2020-10-28 16:08 UTC (permalink / raw)
  To: Rikard Falkeborn
  Cc: Shawn Guo, Sascha Hauer, linux-kernel, Kishon Vijay Abraham I,
	NXP Linux Team, Pengutronix Kernel Team, Fabio Estevam,
	linux-arm-kernel, Li Jun

On 26-09-20, 22:58, Rikard Falkeborn wrote:
> The only usage of imx8mp_usb_phy_ops is to assign its address to the
> data field in the of_device_id struct, which is a const void pointer.
> Make it const to allow the compiler to put it in read-only memory.

Applied, thanks

-- 
~Vinod

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2020-10-28 22:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-26 20:58 [PATCH] phy: fsl-imx8mq-usb: Constify imx8mp_usb_phy_ops Rikard Falkeborn
2020-09-26 20:58 ` Rikard Falkeborn
2020-10-28 16:08 ` Vinod Koul
2020-10-28 16:08   ` Vinod Koul

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.