linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ravb: make mdiobb_ops const
@ 2017-08-22  8:08 Bhumika Goyal
  2017-08-22 12:03 ` Sergei Shtylyov
  0 siblings, 1 reply; 3+ messages in thread
From: Bhumika Goyal @ 2017-08-22  8:08 UTC (permalink / raw)
  To: julia.lawall, sergei.shtylyov, netdev, linux-renesas-soc, linux-kernel
  Cc: Bhumika Goyal

Make these const as they are only stored in a const field of a
mdiobb_ctrl structure.

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

diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
index fdf30bf..6ffd9e4 100644
--- a/drivers/net/ethernet/renesas/ravb_main.c
+++ b/drivers/net/ethernet/renesas/ravb_main.c
@@ -172,7 +172,7 @@ static int ravb_get_mdio_data(struct mdiobb_ctrl *ctrl)
 }
 
 /* MDIO bus control struct */
-static struct mdiobb_ops bb_ops = {
+static const struct mdiobb_ops bb_ops = {
 	.owner = THIS_MODULE,
 	.set_mdc = ravb_set_mdc,
 	.set_mdio_dir = ravb_set_mdio_dir,
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
index d2e88a3..8af353f 100644
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
@@ -1119,7 +1119,7 @@ static void sh_mdc_ctrl(struct mdiobb_ctrl *ctrl, int bit)
 }
 
 /* mdio bus control struct */
-static struct mdiobb_ops bb_ops = {
+static const struct mdiobb_ops bb_ops = {
 	.owner = THIS_MODULE,
 	.set_mdc = sh_mdc_ctrl,
 	.set_mdio_dir = sh_mmd_ctrl,
-- 
1.9.1

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

* Re: [PATCH] ravb: make mdiobb_ops const
  2017-08-22  8:08 [PATCH] ravb: make mdiobb_ops const Bhumika Goyal
@ 2017-08-22 12:03 ` Sergei Shtylyov
  2017-08-22 12:06   ` Geert Uytterhoeven
  0 siblings, 1 reply; 3+ messages in thread
From: Sergei Shtylyov @ 2017-08-22 12:03 UTC (permalink / raw)
  To: Bhumika Goyal, julia.lawall, netdev, linux-renesas-soc, linux-kernel

Hello!

On 08/22/2017 11:08 AM, Bhumika Goyal wrote:

> Make these const as they are only stored in a const field of a
> mdiobb_ctrl structure.

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

    If you're fixing both Renesas drivers at once, your subject should be 
"renesas: make mdiobb_ops const". With that fixed, you have my:

Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

MBR, Sergei

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

* Re: [PATCH] ravb: make mdiobb_ops const
  2017-08-22 12:03 ` Sergei Shtylyov
@ 2017-08-22 12:06   ` Geert Uytterhoeven
  0 siblings, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2017-08-22 12:06 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: Bhumika Goyal, Julia Lawall, netdev, Linux-Renesas, linux-kernel

On Tue, Aug 22, 2017 at 2:03 PM, Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
> On 08/22/2017 11:08 AM, Bhumika Goyal wrote:
>> Make these const as they are only stored in a const field of a
>> mdiobb_ctrl structure.
>
>> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
>> ---
>>   drivers/net/ethernet/renesas/ravb_main.c | 2 +-
>>   drivers/net/ethernet/renesas/sh_eth.c    | 2 +-
>>   2 files changed, 2 insertions(+), 2 deletions(-)
>
>    If you're fixing both Renesas drivers at once, your subject should be
> "renesas: make mdiobb_ops const". With that fixed, you have my:

"net: renesas: make mdiobb_ops const"?
There are plenty of other Renesas-specific drivers spread all over the tree.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

end of thread, other threads:[~2017-08-22 12:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-22  8:08 [PATCH] ravb: make mdiobb_ops const Bhumika Goyal
2017-08-22 12:03 ` Sergei Shtylyov
2017-08-22 12:06   ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).