]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
staging: wilc1000: remove 'flag' argument from wilc_mac_indicate()
authorAjay Singh <ajay.kathat@microchip.com>
Fri, 11 May 2018 08:13:27 +0000 (13:43 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 May 2018 12:04:49 +0000 (14:04 +0200)
Remove 'flag' function parameter in wilc_mac_indicate() as only one
condition was handled using that parameter. Also removed unnecessary
call to wilc_mac_indicate() as no operation was performed in that
function call.
After above changes below macros are not required anymore.
WILC_MAC_INDICATE_STATUS 0x1
WILC_MAC_INDICATE_SCAN 0x2

This changes also helped in resolving the line over 80 chars issue
found by checkatpch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/linux_wlan.c
drivers/staging/wilc1000/wilc_wfi_netdevice.h
drivers/staging/wilc1000/wilc_wlan.c
drivers/staging/wilc1000/wilc_wlan_if.h

index 7b883c0b60d769871d7a0fec55287b9a8942b0bb..02e6b1338440b7b90a6747d89293c82e7697a4ee 100644 (file)
@@ -176,19 +176,16 @@ static void deinit_irq(struct net_device *dev)
        }
 }
 
-void wilc_mac_indicate(struct wilc *wilc, int flag)
+void wilc_mac_indicate(struct wilc *wilc)
 {
        int status;
 
-       if (flag == WILC_MAC_INDICATE_STATUS) {
-               wilc_wlan_cfg_get_val(WID_STATUS,
-                                     (unsigned char *)&status, 4);
-               if (wilc->mac_status == MAC_STATUS_INIT) {
-                       wilc->mac_status = status;
-                       complete(&wilc->sync_event);
-               } else {
-                       wilc->mac_status = status;
-               }
+       wilc_wlan_cfg_get_val(WID_STATUS, (unsigned char *)&status, 4);
+       if (wilc->mac_status == MAC_STATUS_INIT) {
+               wilc->mac_status = status;
+               complete(&wilc->sync_event);
+       } else {
+               wilc->mac_status = status;
        }
 }
 
index 884992483180126bbe5e5c9f13c06880360de8bd..607dae037267a7c54faab77fac5ab875dc9ee427 100644 (file)
@@ -182,7 +182,7 @@ struct wilc_wfi_mon_priv {
 };
 
 void wilc_frmw_to_linux(struct wilc *wilc, u8 *buff, u32 size, u32 pkt_offset);
-void wilc_mac_indicate(struct wilc *wilc, int flag);
+void wilc_mac_indicate(struct wilc *wilc);
 void wilc_netdev_cleanup(struct wilc *wilc);
 int wilc_netdev_init(struct wilc **wilc, struct device *dev, int io_type,
                     int gpio, const struct wilc_hif_func *ops);
index 7147e0c6a048ac6035892897cea264d22ae87ba5..d4ebbf67e50beebe32a75912f7631d84ec6a8fad 100644 (file)
@@ -816,12 +816,7 @@ static void wilc_wlan_handle_rx_buff(struct wilc *wilc, u8 *buffer, int size)
                                        if (wilc->cfg_seq_no == rsp.seq_no)
                                                complete(&wilc->cfg_event);
                                } else if (rsp.type == WILC_CFG_RSP_STATUS) {
-                                       wilc_mac_indicate(wilc,
-                                                         WILC_MAC_INDICATE_STATUS);
-
-                               } else if (rsp.type == WILC_CFG_RSP_SCAN) {
-                                       wilc_mac_indicate(wilc,
-                                                         WILC_MAC_INDICATE_SCAN);
+                                       wilc_mac_indicate(wilc);
                                }
                        }
                }
index aa0731e9ddf08836ce8ef289c2e0e59fcd22fa62..e4a7bf5df65b05fd3b289d2c4dcfaae79515bd7a 100644 (file)
@@ -47,9 +47,6 @@ struct sdio_cmd53 {
        u32 block_size;
 };
 
-#define WILC_MAC_INDICATE_STATUS       0x1
-#define WILC_MAC_INDICATE_SCAN         0x2
-
 #define MAC_STATUS_INIT                        -1
 #define MAC_STATUS_CONNECTED           1
 #define MAC_STATUS_DISCONNECTED                0