All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: dsa: make some structures const
@ 2017-08-29 16:47 Bhumika Goyal
  2017-08-29 23:05 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Bhumika Goyal @ 2017-08-29 16:47 UTC (permalink / raw)
  To: julia.lawall, andrew, vivien.didelot, f.fainelli, netdev, linux-kernel
  Cc: Bhumika Goyal

Make these const as they are not modified anywhere.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/net/dsa/bcm_sf2.c | 2 +-
 drivers/net/dsa/qca8k.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c
index bbcb405..8492c9d 100644
--- a/drivers/net/dsa/bcm_sf2.c
+++ b/drivers/net/dsa/bcm_sf2.c
@@ -983,7 +983,7 @@ static int bcm_sf2_core_write64(struct b53_device *dev, u8 page, u8 reg,
 	return 0;
 }
 
-static struct b53_io_ops bcm_sf2_io_ops = {
+static const struct b53_io_ops bcm_sf2_io_ops = {
 	.read8	= bcm_sf2_core_read8,
 	.read16	= bcm_sf2_core_read16,
 	.read32	= bcm_sf2_core_read32,
diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
index 17977f0..5ada7a41 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
@@ -250,7 +250,7 @@
 
 };
 
-static struct regmap_access_table qca8k_readable_table = {
+static const struct regmap_access_table qca8k_readable_table = {
 	.yes_ranges = qca8k_readable_ranges,
 	.n_yes_ranges = ARRAY_SIZE(qca8k_readable_ranges),
 };
-- 
1.9.1

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

* Re: [PATCH] net: dsa: make some structures const
  2017-08-29 16:47 [PATCH] net: dsa: make some structures const Bhumika Goyal
@ 2017-08-29 23:05 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-08-29 23:05 UTC (permalink / raw)
  To: bhumirks
  Cc: julia.lawall, andrew, vivien.didelot, f.fainelli, netdev, linux-kernel

From: Bhumika Goyal <bhumirks@gmail.com>
Date: Tue, 29 Aug 2017 22:17:52 +0530

> Make these const as they are not modified anywhere.
> 
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>

Applied.

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

end of thread, other threads:[~2017-08-29 23:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-29 16:47 [PATCH] net: dsa: make some structures const Bhumika Goyal
2017-08-29 23:05 ` David Miller

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.