can: remove obsolete empty ioctl() handler
authorOliver Hartkopp <socketcan@hartkopp.net>
Tue, 23 Jul 2019 12:08:47 +0000 (14:08 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 24 Jul 2019 08:31:55 +0000 (10:31 +0200)
With commit c7cbdbf29f488a ("net: rework SIOCGSTAMP ioctl handling") the only
ioctl function in can_ioctl() has been removed.

As this SIOCGSTAMP ioctl command is now handled in net/socket.c we can entirely
remove the CAN specific ioctl functions.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
include/linux/can/core.h
net/can/af_can.c
net/can/bcm.c
net/can/raw.c

index 6099bc18bd0c7efa4aab18284ede65cde71a0af7..f8284a94a13d5d828780d6b4fac95fdc8919e518 100644 (file)
@@ -57,6 +57,5 @@ extern void can_rx_unregister(struct net *net, struct net_device *dev,
                              void *data);
 
 extern int can_send(struct sk_buff *skb, int loop);
-extern int can_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
 
 #endif /* !_CAN_CORE_H */
index 80281ef2ccbd227fcdb6a2f482c70c35dd1c1def..9c86de2da45e3095a848438bda941904c462a20d 100644 (file)
@@ -87,15 +87,6 @@ static atomic_t skbcounter = ATOMIC_INIT(0);
  * af_can socket functions
  */
 
-int can_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
-{
-       switch (cmd) {
-       default:
-               return -ENOIOCTLCMD;
-       }
-}
-EXPORT_SYMBOL(can_ioctl);
-
 static void can_sock_destruct(struct sock *sk)
 {
        skb_queue_purge(&sk->sk_receive_queue);
index a34ee52f19eae510a50caeb2a95f71e0b346f2c0..1eecf4d3e8d2cc8d3ec8dfceeef9a58ce751ebfc 100644 (file)
@@ -1688,7 +1688,7 @@ static const struct proto_ops bcm_ops = {
        .accept        = sock_no_accept,
        .getname       = sock_no_getname,
        .poll          = datagram_poll,
-       .ioctl         = can_ioctl,     /* use can_ioctl() from af_can.c */
+       .ioctl         = sock_no_ioctl,
        .gettstamp     = sock_gettstamp,
        .listen        = sock_no_listen,
        .shutdown      = sock_no_shutdown,
index afcbff063a67b2144f44a88856814560facc9ac7..bbbe3dd0abe9b9218e1f0467a316329282f98f9c 100644 (file)
@@ -845,7 +845,7 @@ static const struct proto_ops raw_ops = {
        .accept        = sock_no_accept,
        .getname       = raw_getname,
        .poll          = datagram_poll,
-       .ioctl         = can_ioctl,     /* use can_ioctl() from af_can.c */
+       .ioctl         = sock_no_ioctl,
        .gettstamp     = sock_gettstamp,
        .listen        = sock_no_listen,
        .shutdown      = sock_no_shutdown,