Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1718218 > unrolled thread
| Started by | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| First post | 2017-08-23 12:20 +0200 |
| Last post | 2017-08-24 07:40 +0200 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH 0/3] constify dsa_switch_ops Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-23 12:20 +0200
[PATCH 1/3] net: dsa: loop: constify dsa_switch_ops Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-23 12:20 +0200
Re: [PATCH 0/3] constify dsa_switch_ops Andrew Lunn <andrew@lunn.ch> - 2017-08-23 14:50 +0200
Re: [PATCH 0/3] constify dsa_switch_ops David Miller <davem@davemloft.net> - 2017-08-24 07:40 +0200
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Date | 2017-08-23 12:20 +0200 |
| Subject | [PATCH 0/3] constify dsa_switch_ops |
| Message-ID | <uhAVr-7G7-5@gated-at.bofh.it> |
dsa_switch_ops are not supposed to change at runtime. All functions working with dsa_switch_ops provided by <net/dsa.h> work with const dsa_switch_ops. So mark the non-const structs as const. Arvind Yadav (3): [PATCH 1/3] net: dsa: loop: constify dsa_switch_ops [PATCH 2/3] net: dsa: lan9303: constify dsa_switch_ops [PATCH 3/3] net: dsa: mt7530: constify dsa_switch_ops drivers/net/dsa/dsa_loop.c | 2 +- drivers/net/dsa/lan9303-core.c | 2 +- drivers/net/dsa/mt7530.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) -- 1.9.1
[toc] | [next] | [standalone]
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Date | 2017-08-23 12:20 +0200 |
| Subject | [PATCH 1/3] net: dsa: loop: constify dsa_switch_ops |
| Message-ID | <uhAVt-7G7-33@gated-at.bofh.it> |
| In reply to | #1718218 |
dsa_switch_ops are not supposed to change at runtime. All functions
working with dsa_switch_ops provided by <net/dsa.h> work with
const dsa_switch_ops. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/net/dsa/dsa_loop.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/dsa/dsa_loop.c b/drivers/net/dsa/dsa_loop.c
index fdd8f38..2418172 100644
--- a/drivers/net/dsa/dsa_loop.c
+++ b/drivers/net/dsa/dsa_loop.c
@@ -294,7 +294,7 @@ static int dsa_loop_port_vlan_dump(struct dsa_switch *ds, int port,
return err;
}
-static struct dsa_switch_ops dsa_loop_driver = {
+static const struct dsa_switch_ops dsa_loop_driver = {
.get_tag_protocol = dsa_loop_get_protocol,
.setup = dsa_loop_setup,
.get_strings = dsa_loop_get_strings,
--
1.9.1
[toc] | [prev] | [next] | [standalone]
| From | Andrew Lunn <andrew@lunn.ch> |
|---|---|
| Date | 2017-08-23 14:50 +0200 |
| Message-ID | <uhDgB-Aw-11@gated-at.bofh.it> |
| In reply to | #1718218 |
On Wed, Aug 23, 2017 at 03:46:56PM +0530, Arvind Yadav wrote:
> dsa_switch_ops are not supposed to change at runtime. All functions
> working with dsa_switch_ops provided by <net/dsa.h> work with
> const dsa_switch_ops. So mark the non-const structs as const.
>
> Arvind Yadav (3):
> [PATCH 1/3] net: dsa: loop: constify dsa_switch_ops
> [PATCH 2/3] net: dsa: lan9303: constify dsa_switch_ops
> [PATCH 3/3] net: dsa: mt7530: constify dsa_switch_ops
For the whole series:
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
[toc] | [prev] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2017-08-24 07:40 +0200 |
| Message-ID | <uhT22-2ii-5@gated-at.bofh.it> |
| In reply to | #1718327 |
From: Andrew Lunn <andrew@lunn.ch> Date: Wed, 23 Aug 2017 14:45:56 +0200 > On Wed, Aug 23, 2017 at 03:46:56PM +0530, Arvind Yadav wrote: >> dsa_switch_ops are not supposed to change at runtime. All functions >> working with dsa_switch_ops provided by <net/dsa.h> work with >> const dsa_switch_ops. So mark the non-const structs as const. >> >> Arvind Yadav (3): >> [PATCH 1/3] net: dsa: loop: constify dsa_switch_ops >> [PATCH 2/3] net: dsa: lan9303: constify dsa_switch_ops >> [PATCH 3/3] net: dsa: mt7530: constify dsa_switch_ops > > For the whole series: > > Reviewed-by: Andrew Lunn <andrew@lunn.ch> None of these patches apply to net-next, things are const there already.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web