[PATCH v2] staging: rtl8192u: fix coding style in r8190_rtl8256.c

Greg Kroah-Hartman gregkh at linuxfoundation.org
Fri Feb 19 08:12:19 UTC 2021


On Tue, Feb 16, 2021 at 06:28:06PM +0800, Du Cheng wrote:
> use __func__ macro instead of literal function name in RT_TRACE() in
>  * phy_set_rf8256_bandwidth()
>  * phy_rf8256_config_para_file()
> 
> remove unnecessary return at the end of phy_set_rf8256_ofdm_tx_power()
> 
> these coding style issues are flagged as warnings by scripts/checkpatch.pl.
> 
> 
> Signed-off-by: Du Cheng <ducheng2 at gmail.com>
> ---
> changes v2:
> * improve description and subject
> 
> changes v1:
> * fix coding style
> 
>  drivers/staging/rtl8192u/r8190_rtl8256.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192u/r8190_rtl8256.c b/drivers/staging/rtl8192u/r8190_rtl8256.c
> index fee3bfb99075..54747fda552f 100644
> --- a/drivers/staging/rtl8192u/r8190_rtl8256.c
> +++ b/drivers/staging/rtl8192u/r8190_rtl8256.c
> @@ -73,11 +73,11 @@ void phy_set_rf8256_bandwidth(struct net_device *dev, enum ht_channel_width Band
>  					else
>  						rtl8192_phy_SetRFReg(dev, (enum rf90_radio_path_e)eRFPath, 0x14, bMask12Bits, 0x5ab);
>  				} else {
> -					RT_TRACE(COMP_ERR, "phy_set_rf8256_bandwidth(): unknown hardware version\n");
> +					RT_TRACE(COMP_ERR, "%s(): unknown hardware version\n", __func__);
>  					}
>  				break;
>  		default:
> -				RT_TRACE(COMP_ERR, "phy_set_rf8256_bandwidth(): unknown Bandwidth: %#X\n", Bandwidth);
> +				RT_TRACE(COMP_ERR, "%s(): unknown Bandwidth: %#X\n", __func__, Bandwidth);
>  				break;
>  		}
>  	}
> @@ -213,7 +213,7 @@ static void phy_rf8256_config_para_file(struct net_device *dev)
>  		}
>  
>  		if (ret) {
> -			RT_TRACE(COMP_ERR, "phy_rf8256_config_para_file():Radio[%d] Fail!!", eRFPath);
> +			RT_TRACE(COMP_ERR, "%s():Radio[%d] Fail!!", __func__, eRFPath);
>  			goto phy_RF8256_Config_ParaFile_Fail;
>  		}
>  	}
> @@ -291,5 +291,4 @@ void phy_set_rf8256_ofdm_tx_power(struct net_device *dev, u8 powerlevel)
>  		}
>  		rtl8192_setBBreg(dev, RegOffset[index], 0x7f7f7f7f, writeVal);
>  	}
> -	return;
>  }
> -- 
> 2.27.0

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch did many different things all at once, making it difficult
  to review.  All Linux kernel patches need to only do one thing at a
  time.  If you need to do multiple things (such as clean up all coding
  style issues in a file/driver), do it in a sequence of patches, each
  one doing only one thing.  This will make it easier to review the
  patches to ensure that they are correct, and to help alleviate any
  merge issues that larger patches can cause.

- You did not write a descriptive Subject: for the patch, allowing Greg,
  and everyone else, to know what this patch is all about.  Please read
  the section entitled "The canonical patch format" in the kernel file,
  Documentation/SubmittingPatches for what a proper Subject: line should
  look like.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot


More information about the devel mailing list