mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vivien Didelot <vivien.didelot@gmail.com>
To: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	Vivien Didelot <vivien.didelot@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	f.fainelli@gmail.com, andrew@lunn.ch
Subject: [PATCH net-next 3/4] net: dsa: make dsa_slave_dev_check use const
Date: Tue, 11 Jun 2019 17:47:46 -0400	[thread overview]
Message-ID: <20190611214747.22285-4-vivien.didelot@gmail.com> (raw)
In-Reply-To: <20190611214747.22285-1-vivien.didelot@gmail.com>

The switchdev handle helpers make use of a device checking helper
requiring a const net_device. Make dsa_slave_dev_check compliant
to this.

Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com>
---
 net/dsa/slave.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 289a6aa4b51c..cb436a05c9a8 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -22,7 +22,7 @@
 
 #include "dsa_priv.h"
 
-static bool dsa_slave_dev_check(struct net_device *dev);
+static bool dsa_slave_dev_check(const struct net_device *dev);
 
 /* slave mii_bus handling ***************************************************/
 static int dsa_slave_phy_read(struct mii_bus *bus, int addr, int reg)
@@ -1408,7 +1408,7 @@ void dsa_slave_destroy(struct net_device *slave_dev)
 	free_netdev(slave_dev);
 }
 
-static bool dsa_slave_dev_check(struct net_device *dev)
+static bool dsa_slave_dev_check(const struct net_device *dev)
 {
 	return dev->netdev_ops == &dsa_slave_netdev_ops;
 }
-- 
2.21.0


  parent reply	other threads:[~2019-06-11 21:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-11 21:47 [PATCH net-next 0/4] net: dsa: use switchdev attr and obj handlers Vivien Didelot
2019-06-11 21:47 ` [PATCH net-next 1/4] net: dsa: do not check orig_dev in vlan del Vivien Didelot
2019-06-11 23:07   ` Florian Fainelli
2019-06-11 21:47 ` [PATCH net-next 2/4] net: dsa: make cpu_dp non const Vivien Didelot
2019-06-11 23:07   ` Florian Fainelli
2019-06-11 21:47 ` Vivien Didelot [this message]
2019-06-11 23:07   ` [PATCH net-next 3/4] net: dsa: make dsa_slave_dev_check use const Florian Fainelli
2019-06-11 21:47 ` [PATCH net-next 4/4] net: dsa: use switchdev handle helpers Vivien Didelot
2019-06-11 23:10   ` Florian Fainelli
2019-06-13 17:28 ` [PATCH net-next 0/4] net: dsa: use switchdev attr and obj handlers Vivien Didelot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190611214747.22285-4-vivien.didelot@gmail.com \
    --to=vivien.didelot@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome