net: usb: usbnet: coding style for functions
Subsystems (5)
Oliver Neukum
maintainerPATCH 1/1 net: usb: usbnet: coding style for functions
Functions are not to have blanks between names
and parameter lists. Remove them.
Signed-off-by Oliver Neukum <[email protected]>
--- drivers/net/usb/usbnet.c | 49 ++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 25 deletions(-)
drivers/net/usb/usbnet.c +24 -25
@@ -189,7 +189,7 @@ static bool usbnet_needs_usb_name_format(struct usbnet *dev, struct net_device * is_local_ether_addr(net->dev_addr)); } -static void intr_complete (struct urb *urb) +static void intr_complete (struct urb *urb) {struct usbnet *dev = urb->context;int status = urb->status;
@@ -221,7 +221,7 @@ static void intr_complete (struct urb *urb) "intr resubmit --> %d\n", status); } -static int init_status (struct usbnet *dev,struct usb_interface *intf) +static int init_status (struct usbnet *dev,struct usb_interface *intf) {char *buf =NULL ;unsigned pipe =0 ;
@@ -326,7 +326,7 @@ static void __usbnet_status_stop_force(struct usbnet *dev)* Some link protocols batch packets, so their rx_fixup paths * can return clones as well as just modify the original skb. */ -void usbnet_skb_return (struct usbnet *dev,struct sk_buff *skb) +void usbnet_skb_return (struct usbnet *dev,struct sk_buff *skb) {struct pcpu_sw_netstats *stats64 =this_cpu_ptr (dev->net->tstats);unsigned long flags;
@@ -396,7 +396,7 @@ EXPORT_SYMBOL_GPL(usbnet_update_max_qlen);* *-------------------------------------------------------------------------*/ -int usbnet_change_mtu (struct net_device *net,int new_mtu) +int usbnet_change_mtu (struct net_device *net,int new_mtu) {struct usbnet *dev =netdev_priv (net);int ll_mtu = new_mtu + net->hard_header_len;
@@ -472,7 +472,7 @@ static enum skb_state defer_bh(struct usbnet *dev, struct sk_buff *skb,* NOTE: annoying asymmetry: if it's active, schedule_work() fails, * but tasklet_schedule() doesn't. hope the failure is rare. */ -void usbnet_defer_kevent (struct usbnet *dev,int work) +void usbnet_defer_kevent (struct usbnet *dev,int work) {set_bit (work, &dev->flags);if (!usbnet_going_away (dev)) {
@@ -489,9 +489,9 @@ EXPORT_SYMBOL_GPL(usbnet_defer_kevent);/*-------------------------------------------------------------------------*/ -static void rx_complete (struct urb *urb); +static void rx_complete (struct urb *urb); -static int rx_submit (struct usbnet *dev,struct urb *urb,gfp_t flags) +static int rx_submit (struct usbnet *dev,struct urb *urb,gfp_t flags) {struct sk_buff *skb;struct skb_data *entry;
@@ -597,7 +597,7 @@ static inline int rx_process(struct usbnet *dev, struct sk_buff *skb)/*-------------------------------------------------------------------------*/ -static void rx_complete (struct urb *urb) +static void rx_complete (struct urb *urb) {struct sk_buff *skb = (struct sk_buff *) urb->context;struct skb_data *entry = (struct skb_data *) skb->cb;
@@ -728,7 +728,7 @@ EXPORT_SYMBOL_GPL(usbnet_purge_paused_rxq);// unlink pending rx/tx; completion handlers do all other cleanup -static int unlink_urbs (struct usbnet *dev,struct sk_buff_head *q) +static int unlink_urbs (struct usbnet *dev,struct sk_buff_head *q) {unsigned long flags;struct sk_buff *skb;
@@ -823,7 +823,7 @@ static void usbnet_terminate_urbs(struct usbnet *dev)remove_wait_queue (&dev->wait, &wait); } -int usbnet_stop (struct net_device *net) +int usbnet_stop (struct net_device *net) {struct usbnet *dev =netdev_priv (net);const struct driver_info *info = dev->driver_info;
@@ -892,7 +892,7 @@ EXPORT_SYMBOL_GPL(usbnet_stop);// precondition: never called in_interrupt -int usbnet_open (struct net_device *net) +int usbnet_open (struct net_device *net) {struct usbnet *dev =netdev_priv (net);int retval;
@@ -1048,7 +1048,7 @@ int usbnet_set_link_ksettings_mii(struct net_device *net, }EXPORT_SYMBOL_GPL (usbnet_set_link_ksettings_mii); -u32 usbnet_get_link (struct net_device *net) +u32 usbnet_get_link (struct net_device *net) {struct usbnet *dev =netdev_priv (net);
@@ -1076,7 +1076,7 @@ int usbnet_nway_reset(struct net_device *net) }EXPORT_SYMBOL_GPL (usbnet_nway_reset); -void usbnet_get_drvinfo (struct net_device *net,struct ethtool_drvinfo *info) +void usbnet_get_drvinfo (struct net_device *net,struct ethtool_drvinfo *info) {struct usbnet *dev =netdev_priv (net);
@@ -1087,7 +1087,7 @@ void usbnet_get_drvinfo (struct net_device *net, struct ethtool_drvinfo *info) }EXPORT_SYMBOL_GPL (usbnet_get_drvinfo); -u32 usbnet_get_msglevel (struct net_device *net) +u32 usbnet_get_msglevel (struct net_device *net) {struct usbnet *dev =netdev_priv (net);
@@ -1095,7 +1095,7 @@ u32 usbnet_get_msglevel (struct net_device *net) }EXPORT_SYMBOL_GPL (usbnet_get_msglevel); -void usbnet_set_msglevel (struct net_device *net,u32 level) +void usbnet_set_msglevel (struct net_device *net,u32 level) {struct usbnet *dev =netdev_priv (net);
@@ -1166,7 +1166,7 @@ static void __handle_set_rx_mode(struct usbnet *dev)* especially now that control transfers can be queued. */ static void -usbnet_deferred_kevent (struct work_struct *work) +usbnet_deferred_kevent (struct work_struct *work) {struct usbnet *dev = container_of(work, struct usbnet, kevent);
@@ -1277,7 +1277,7 @@ usbnet_deferred_kevent (struct work_struct *work)/*-------------------------------------------------------------------------*/ -static void tx_complete (struct urb *urb) +static void tx_complete (struct urb *urb) {struct sk_buff *skb = (struct sk_buff *) urb->context;struct skb_data *entry = (struct skb_data *) skb->cb;
@@ -1332,7 +1332,7 @@ static void tx_complete (struct urb *urb)/*-------------------------------------------------------------------------*/ -void usbnet_tx_timeout (struct net_device *net,unsigned int txqueue) +void usbnet_tx_timeout (struct net_device *net,unsigned int txqueue) {struct usbnet *dev =netdev_priv (net);
@@ -1382,8 +1382,7 @@ static int build_dma_sg(const struct sk_buff *skb, struct urb *urb)return 1 ; } -netdev_tx_t usbnet_start_xmit (struct sk_buff *skb, -struct net_device *net) +netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,struct net_device *net) {struct usbnet *dev =netdev_priv (net);unsigned int length;
@@ -1561,7 +1560,7 @@ static inline void usb_free_skb(struct sk_buff *skb)// work (work deferred from completions, in_irq) or timer -static void usbnet_bh (struct timer_list *t) +static void usbnet_bh (struct timer_list *t) {struct usbnet *dev =timer_container_of (dev, t, delay);struct sk_buff *skb;
@@ -1636,7 +1635,7 @@ static void usbnet_bh_work(struct work_struct *work)// precondition: never called in_interrupt -void usbnet_disconnect (struct usb_interface *intf) +void usbnet_disconnect (struct usb_interface *intf) {struct usbnet *dev;struct usb_device *xdev;
@@ -1700,7 +1699,7 @@ static const struct device_type wwan_type = { };int -usbnet_probe (struct usb_interface *udev,const struct usb_device_id *prod) +usbnet_probe (struct usb_interface *udev,const struct usb_device_id *prod) {struct usbnet *dev;struct net_device *net;
@@ -1907,7 +1906,7 @@ EXPORT_SYMBOL_GPL(usbnet_probe);* resume only when the last interface is resumed */ -int usbnet_suspend (struct usb_interface *intf,pm_message_t message) +int usbnet_suspend (struct usb_interface *intf,pm_message_t message) {struct usbnet *dev =usb_get_intfdata (intf);
@@ -1940,7 +1939,7 @@ int usbnet_suspend (struct usb_interface *intf, pm_message_t message) }EXPORT_SYMBOL_GPL (usbnet_suspend); -int usbnet_resume (struct usb_interface *intf) +int usbnet_resume (struct usb_interface *intf) {struct usbnet *dev =usb_get_intfdata (intf);struct sk_buff *skb;
Signature · 1 line
2.51.1
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 7 lines · On Thu, 23 Oct 2025 12:00:19 +0200 you wrote:
Functions are not to have blanks between names
and parameter lists. Remove them.Signed-off-by Oliver Neukum <[email protected]>--- drivers/net/usb/usbnet.c | 49 ++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 25 deletions(-)
Here is the summary with links:
- [net-next,1/1] net: usb: usbnet: coding style for functions
https://git.kernel.org/netdev/net-next/c/c09b183dc14e
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html