Re: [PATCH 1/2] staging: rtl8192e: Remove empty Array Rtl8192PciERadioC_Array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Mar 05, 2023 at 11:33:05PM +0100, Philipp Hortmann wrote:
> Remove empty array Rtl8192PciERadioC_Array and the code where it is used
> because it is dead code.
> 
> Signed-off-by: Philipp Hortmann <philipp.g.hortmann@xxxxxxxxx>
> ---
>  drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 12 ------------
>  drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h |  2 --
>  drivers/staging/rtl8192e/rtl8192e/table.c      |  3 ---
>  drivers/staging/rtl8192e/rtl8192e/table.h      |  2 --
>  4 files changed, 19 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
> index 35ca01ab65ff..fe0ef52c163a 100644
> --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
> +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
> @@ -649,18 +649,6 @@ u8 rtl92e_config_rf_path(struct net_device *dev, enum rf90_radio_path eRFPath)
>  					  bMask12Bits,
>  					  Rtl819XRadioB_Array[i+1]);
>  
> -		}
> -		break;
> -	case RF90_PATH_C:
> -		for (i = 0; i < RadioC_ArrayLength; i += 2) {
> -			if (Rtl819XRadioC_Array[i] == 0xfe) {
> -				msleep(100);
> -				continue;
> -			}
> -			rtl92e_set_rf_reg(dev, eRFPath, Rtl819XRadioC_Array[i],
> -					  bMask12Bits,
> -					  Rtl819XRadioC_Array[i+1]);
> -

Why is this dead code?  So far as I can see "== 0xfe" is always false
so this calls rtl92e_set_rf_reg() on every iteration through the loop.
It only does one iteration through the loop.

Is it dead code because case RF90_PATH_C is always false?  If so then
that needs to be explained in the commit message.

regards,
dan carpenter





[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux