Re: [PATCH 3/3] staging: rtlwifi: remove unused functions

2017-09-07 Thread Greg Kroah-Hartman
On Tue, Sep 05, 2017 at 09:46:55AM -0500, Larry Finger wrote:
> On 09/05/2017 01:53 AM, Tobin C. Harding wrote:
> > Functions rtl_rfreg_delay() and rtl_bb_delay() are unused within the
> > driver. Both functions call rtl_addr_delay(), this function is unused
> > outside of these call sites.The driver (and kernel) code base is cleaner
> > if unused functions are removed.
> > 
> > Remove unused functions.
> 
> While it is true that those routines are unused in the staging instance of
> rtlwifi, they are needed in the copy in drivers/net/wireless/... I would
> prefer to keep the differences between these two versions as small as
> possible; therefore, NACK

Huh?  No, you are not going to be able to keep those two trees in sync,
people are about to start to massivly attack drivers/staging/rtlwifi/
with coding style fixes and other such cleanups like this.  If you want
these to stay in "sync" then the driver should be using the in-kernel
versions of these "library" functions instead.

You aren't going to be able to NACK valid code cleanups here, sorry,
otherwise it's going to be a total mess...

So I'm going to take this patch in a few days...

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 3/3] staging: rtlwifi: remove unused functions

2017-09-05 Thread Tobin C. Harding
On Tue, Sep 05, 2017 at 09:46:55AM -0500, Larry Finger wrote:
> On 09/05/2017 01:53 AM, Tobin C. Harding wrote:
> >Functions rtl_rfreg_delay() and rtl_bb_delay() are unused within the
> >driver. Both functions call rtl_addr_delay(), this function is unused
> >outside of these call sites.The driver (and kernel) code base is cleaner
> >if unused functions are removed.
> >
> >Remove unused functions.
> 
> While it is true that those routines are unused in the staging instance of
> rtlwifi, they are needed in the copy in drivers/net/wireless/... I would
> prefer to keep the differences between these two versions as small as
> possible; therefore, NACK
> 
> Larry

No worries Larry, thanks for the response. Sorry to waste your time.

thanks,
Tobin.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 3/3] staging: rtlwifi: remove unused functions

2017-09-05 Thread Larry Finger

On 09/05/2017 01:53 AM, Tobin C. Harding wrote:

Functions rtl_rfreg_delay() and rtl_bb_delay() are unused within the
driver. Both functions call rtl_addr_delay(), this function is unused
outside of these call sites.The driver (and kernel) code base is cleaner
if unused functions are removed.

Remove unused functions.


While it is true that those routines are unused in the staging instance of 
rtlwifi, they are needed in the copy in drivers/net/wireless/... I would prefer 
to keep the differences between these two versions as small as possible; 
therefore, NACK


Larry
.

---
  drivers/staging/rtlwifi/core.c | 37 -
  drivers/staging/rtlwifi/core.h |  4 
  2 files changed, 41 deletions(-)

diff --git a/drivers/staging/rtlwifi/core.c b/drivers/staging/rtlwifi/core.c
index 6ddf7e8..43b8b9ef 100644
--- a/drivers/staging/rtlwifi/core.c
+++ b/drivers/staging/rtlwifi/core.c
@@ -49,43 +49,6 @@ u8 channel5g_80m[CHANNEL_MAX_NUMBER_5G_80M] = {
42, 58, 106, 122, 138, 155, 171
  };
  
-void rtl_addr_delay(u32 addr)

-{
-   if (addr == 0xfe)
-   mdelay(50);
-   else if (addr == 0xfd)
-   msleep(5);
-   else if (addr == 0xfc)
-   msleep(1);
-   else if (addr == 0xfb)
-   usleep_range(50, 100);
-   else if (addr == 0xfa)
-   usleep_range(5, 10);
-   else if (addr == 0xf9)
-   usleep_range(1, 2);
-}
-
-void rtl_rfreg_delay(struct ieee80211_hw *hw, enum radio_path rfpath, u32 addr,
-u32 mask, u32 data)
-{
-   if (addr >= 0xf9 && addr <= 0xfe) {
-   rtl_addr_delay(addr);
-   } else {
-   rtl_set_rfreg(hw, rfpath, addr, mask, data);
-   udelay(1);
-   }
-}
-
-void rtl_bb_delay(struct ieee80211_hw *hw, u32 addr, u32 data)
-{
-   if (addr >= 0xf9 && addr <= 0xfe) {
-   rtl_addr_delay(addr);
-   } else {
-   rtl_set_bbreg(hw, addr, MASKDWORD, data);
-   udelay(1);
-   }
-}
-
  static void rtl_fw_do_work(const struct firmware *firmware, void *context,
   bool is_wow)
  {
diff --git a/drivers/staging/rtlwifi/core.h b/drivers/staging/rtlwifi/core.h
index 782ac2f..4c2b694 100644
--- a/drivers/staging/rtlwifi/core.h
+++ b/drivers/staging/rtlwifi/core.h
@@ -75,10 +75,6 @@ enum dm_dig_connect_e {
  extern const struct ieee80211_ops rtl_ops;
  void rtl_fw_cb(const struct firmware *firmware, void *context);
  void rtl_wowlan_fw_cb(const struct firmware *firmware, void *context);
-void rtl_addr_delay(u32 addr);
-void rtl_rfreg_delay(struct ieee80211_hw *hw, enum radio_path rfpath, u32 addr,
-u32 mask, u32 data);
-void rtl_bb_delay(struct ieee80211_hw *hw, u32 addr, u32 data);
  bool rtl_cmd_send_packet(struct ieee80211_hw *hw, struct sk_buff *skb);
  bool rtl_btc_status_false(void);
  void rtl_dm_diginit(struct ieee80211_hw *hw, u32 cur_igval);



___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 3/3] staging: rtlwifi: remove unused functions

2017-09-05 Thread Tobin C. Harding
Functions rtl_rfreg_delay() and rtl_bb_delay() are unused within the
driver. Both functions call rtl_addr_delay(), this function is unused
outside of these call sites.The driver (and kernel) code base is cleaner
if unused functions are removed.

Remove unused functions.
---
 drivers/staging/rtlwifi/core.c | 37 -
 drivers/staging/rtlwifi/core.h |  4 
 2 files changed, 41 deletions(-)

diff --git a/drivers/staging/rtlwifi/core.c b/drivers/staging/rtlwifi/core.c
index 6ddf7e8..43b8b9ef 100644
--- a/drivers/staging/rtlwifi/core.c
+++ b/drivers/staging/rtlwifi/core.c
@@ -49,43 +49,6 @@ u8 channel5g_80m[CHANNEL_MAX_NUMBER_5G_80M] = {
42, 58, 106, 122, 138, 155, 171
 };
 
-void rtl_addr_delay(u32 addr)
-{
-   if (addr == 0xfe)
-   mdelay(50);
-   else if (addr == 0xfd)
-   msleep(5);
-   else if (addr == 0xfc)
-   msleep(1);
-   else if (addr == 0xfb)
-   usleep_range(50, 100);
-   else if (addr == 0xfa)
-   usleep_range(5, 10);
-   else if (addr == 0xf9)
-   usleep_range(1, 2);
-}
-
-void rtl_rfreg_delay(struct ieee80211_hw *hw, enum radio_path rfpath, u32 addr,
-u32 mask, u32 data)
-{
-   if (addr >= 0xf9 && addr <= 0xfe) {
-   rtl_addr_delay(addr);
-   } else {
-   rtl_set_rfreg(hw, rfpath, addr, mask, data);
-   udelay(1);
-   }
-}
-
-void rtl_bb_delay(struct ieee80211_hw *hw, u32 addr, u32 data)
-{
-   if (addr >= 0xf9 && addr <= 0xfe) {
-   rtl_addr_delay(addr);
-   } else {
-   rtl_set_bbreg(hw, addr, MASKDWORD, data);
-   udelay(1);
-   }
-}
-
 static void rtl_fw_do_work(const struct firmware *firmware, void *context,
   bool is_wow)
 {
diff --git a/drivers/staging/rtlwifi/core.h b/drivers/staging/rtlwifi/core.h
index 782ac2f..4c2b694 100644
--- a/drivers/staging/rtlwifi/core.h
+++ b/drivers/staging/rtlwifi/core.h
@@ -75,10 +75,6 @@ enum dm_dig_connect_e {
 extern const struct ieee80211_ops rtl_ops;
 void rtl_fw_cb(const struct firmware *firmware, void *context);
 void rtl_wowlan_fw_cb(const struct firmware *firmware, void *context);
-void rtl_addr_delay(u32 addr);
-void rtl_rfreg_delay(struct ieee80211_hw *hw, enum radio_path rfpath, u32 addr,
-u32 mask, u32 data);
-void rtl_bb_delay(struct ieee80211_hw *hw, u32 addr, u32 data);
 bool rtl_cmd_send_packet(struct ieee80211_hw *hw, struct sk_buff *skb);
 bool rtl_btc_status_false(void);
 void rtl_dm_diginit(struct ieee80211_hw *hw, u32 cur_igval);
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel