From f5c67070cca8e18c93a7ac1e60f56943656edaa3 Mon Sep 17 00:00:00 2001 From: Michael Blizek Date: Sat, 2 Jul 2022 08:22:55 +0200 Subject: [PATCH] formatting --- net/cor/conn.c | 3 ++- net/cor/dev.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/net/cor/conn.c b/net/cor/conn.c index 7e64cb632227..ee79c0d1f876 100644 --- a/net/cor/conn.c +++ b/net/cor/conn.c @@ -587,7 +587,7 @@ cont: void cor_set_publish_service(struct cor_sock *cs, __u8 value) { - BUG_ON (value != 0 && value != 1); + BUG_ON(value != 0 && value != 1); mutex_lock(&(cs->lock)); @@ -906,6 +906,7 @@ static int __init cor_init(void) printk(KERN_ERR "sizeof mutex: %u\n", (__u32) sizeof(struct mutex)); printk(KERN_ERR "sizeof spinlock: %u\n", (__u32) sizeof(spinlock_t)); + printk(KERN_ERR "sizeof spinlock: %u\n", (__u32) sizeof(struct timer_list)); printk(KERN_ERR "sizeof kref: %u\n", (__u32) sizeof(struct kref)); printk(KERN_ERR "sizeof list_head: %u\n", (__u32) sizeof(struct list_head)); diff --git a/net/cor/dev.c b/net/cor/dev.c index 7776b22d4d31..cb10fdeefd20 100644 --- a/net/cor/dev.c +++ b/net/cor/dev.c @@ -1551,12 +1551,13 @@ int cor_netdev_notify_func(struct notifier_block *not, unsigned long event, struct net_device *dev = netdev_notifier_info_to_dev(ptr); int rc; + BUG_ON(dev == 0); + switch(event) { case NETDEV_UP: if (dev->flags & IFF_LOOPBACK) break; - BUG_ON(dev == 0); rc = cor_create_queue(dev); if (rc == 1) return 1; @@ -1567,7 +1568,6 @@ int cor_netdev_notify_func(struct notifier_block *not, unsigned long event, case NETDEV_DOWN: printk(KERN_ERR "down 1\n"); udelay(100); - BUG_ON(dev == 0); printk(KERN_ERR "down 2\n"); udelay(100); cor_announce_send_stop(dev, 0, ANNOUNCE_TYPE_BROADCAST); -- 2.11.4.GIT