public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Mohammed Rushad <mohammedrushad@gmail.com>
Cc: john.oldman@polehill.co.uk, kai.heng.feng@canonical.com,
	luk@wybcz.pl, vkor@vkten.in, nachukannan@gmail.com,
	hdegoede@redhat.com, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8723bs: os_dep: fix function-name print using __func__
Date: Tue, 18 Aug 2020 16:06:45 +0200	[thread overview]
Message-ID: <20200818140645.GC547677@kroah.com> (raw)
In-Reply-To: <20200812160745.7215-1-mohammedrushad@gmail.com>

On Wed, Aug 12, 2020 at 09:37:45PM +0530, Mohammed Rushad wrote:
> This patch to the os_intfs.c fixes the printing of function names using
> the preferred '"%s...", __func__' and alignment issues as pointed out by
> the checkpatch.pl tool.
> 
> Signed-off-by: Mohammed Rushad <mohammedrushad@gmail.com>
> ---
>  drivers/staging/rtl8723bs/os_dep/os_intfs.c | 56 +++++++++++----------
>  1 file changed, 29 insertions(+), 27 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
> index 27f990a01a23..0460db4ae660 100644
> --- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
> +++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
> @@ -400,17 +400,17 @@ u16 rtw_recv_select_queue(struct sk_buff *skb)
>  	memcpy(&eth_type, pdata + (ETH_ALEN << 1), 2);
>  
>  	switch (be16_to_cpu(eth_type)) {
> -		case ETH_P_IP:
> +	case ETH_P_IP:
>  
> -			piphdr = (struct iphdr *)(pdata + ETH_HLEN);
> +		piphdr = (struct iphdr *)(pdata + ETH_HLEN);
>  
> -			dscp = piphdr->tos & 0xfc;
> +		dscp = piphdr->tos & 0xfc;
>  
> -			priority = dscp >> 5;
> +		priority = dscp >> 5;
>  
> -			break;
> -		default:
> -			priority = 0;
> +		break;
> +	default:
> +		priority = 0;
>  	}
>  
>  	return rtw_1d_to_queue[priority];
> @@ -539,7 +539,7 @@ u32 rtw_start_drv_threads(struct adapter *padapter)
>  {
>  	u32 _status = _SUCCESS;
>  
> -	RT_TRACE(_module_os_intfs_c_, _drv_info_, ("+rtw_start_drv_threads\n"));
> +	RT_TRACE(_module_os_intfs_c_, _drv_info_, ("+%s\n", __func__));
>  	padapter->xmitThread = kthread_run(rtw_xmit_thread, padapter, "RTW_XMIT_THREAD");
>  	if (IS_ERR(padapter->xmitThread))
>  		_status = _FAIL;
> @@ -556,7 +556,7 @@ u32 rtw_start_drv_threads(struct adapter *padapter)
>  
>  void rtw_stop_drv_threads(struct adapter *padapter)
>  {
> -	RT_TRACE(_module_os_intfs_c_, _drv_info_, ("+rtw_stop_drv_threads\n"));
> +	RT_TRACE(_module_os_intfs_c_, _drv_info_, ("+%s\n", __func__));
>  
>  	rtw_stop_cmd_thread(padapter);
>  
> @@ -710,7 +710,7 @@ u8 rtw_init_drv_sw(struct adapter *padapter)
>  {
>  	u8 ret8 = _SUCCESS;
>  
> -	RT_TRACE(_module_os_intfs_c_, _drv_info_, ("+rtw_init_drv_sw\n"));
> +	RT_TRACE(_module_os_intfs_c_, _drv_info_, ("+%s\n", __func__));
>  
>  	rtw_init_default_value(padapter);
>  
> @@ -773,29 +773,29 @@ u8 rtw_init_drv_sw(struct adapter *padapter)
>  
>  exit:
>  
> -	RT_TRACE(_module_os_intfs_c_, _drv_info_, ("-rtw_init_drv_sw\n"));
> +	RT_TRACE(_module_os_intfs_c_, _drv_info_, ("-%s\n", __func__));
>  
>  	return ret8;
>  }
>  
>  void rtw_cancel_all_timer(struct adapter *padapter)
>  {
> -	RT_TRACE(_module_os_intfs_c_, _drv_info_, ("+rtw_cancel_all_timer\n"));
> +	RT_TRACE(_module_os_intfs_c_, _drv_info_, ("+%s\n", __func__));
>  
>  	del_timer_sync(&padapter->mlmepriv.assoc_timer);
> -	RT_TRACE(_module_os_intfs_c_, _drv_info_, ("rtw_cancel_all_timer:cancel association timer complete!\n"));
> +	RT_TRACE(_module_os_intfs_c_, _drv_info_, ("%s:cancel association timer complete!\n", __func__));
>  
>  	del_timer_sync(&padapter->mlmepriv.scan_to_timer);
> -	RT_TRACE(_module_os_intfs_c_, _drv_info_, ("rtw_cancel_all_timer:cancel scan_to_timer!\n"));
> +	RT_TRACE(_module_os_intfs_c_, _drv_info_, ("%s:cancel scan_to_timer!\n", __func__));
>  
>  	del_timer_sync(&padapter->mlmepriv.dynamic_chk_timer);
> -	RT_TRACE(_module_os_intfs_c_, _drv_info_, ("rtw_cancel_all_timer:cancel dynamic_chk_timer!\n"));
> +	RT_TRACE(_module_os_intfs_c_, _drv_info_, ("%s:cancel dynamic_chk_timer!\n", __func__));
>  
>  	del_timer_sync(&(adapter_to_pwrctl(padapter)->pwr_state_check_timer));
>  
>  	del_timer_sync(&padapter->mlmepriv.set_scan_deny_timer);
>  	rtw_clear_scan_deny(padapter);
> -	RT_TRACE(_module_os_intfs_c_, _drv_info_, ("rtw_cancel_all_timer:cancel set_scan_deny_timer!\n"));
> +	RT_TRACE(_module_os_intfs_c_, _drv_info_, ("%s:cancel set_scan_deny_timer!\n", __func__));
>  
>  	del_timer_sync(&padapter->recvpriv.signal_stat_timer);
>  
> @@ -805,7 +805,7 @@ void rtw_cancel_all_timer(struct adapter *padapter)
>  
>  u8 rtw_free_drv_sw(struct adapter *padapter)
>  {
> -	RT_TRACE(_module_os_intfs_c_, _drv_info_, ("==>rtw_free_drv_sw"));
> +	RT_TRACE(_module_os_intfs_c_, _drv_info_, ("==>%s", __func__));
>  
>  	free_mlme_ext_priv(&padapter->mlmeextpriv);
>  
> @@ -829,7 +829,7 @@ u8 rtw_free_drv_sw(struct adapter *padapter)
>  
>  	rtw_hal_free_data(padapter);
>  
> -	RT_TRACE(_module_os_intfs_c_, _drv_info_, ("<==rtw_free_drv_sw\n"));
> +	RT_TRACE(_module_os_intfs_c_, _drv_info_, ("<==%s\n", __func__));
>  
>  	/* free the old_pnetdev */
>  	if (padapter->rereg_nd_name_priv.old_pnetdev) {
> @@ -841,7 +841,7 @@ u8 rtw_free_drv_sw(struct adapter *padapter)
>  	if (padapter->pbuddy_adapter != NULL)
>  		padapter->pbuddy_adapter->pbuddy_adapter = NULL;
>  
> -	RT_TRACE(_module_os_intfs_c_, _drv_info_, ("-rtw_free_drv_sw\n"));
> +	RT_TRACE(_module_os_intfs_c_, _drv_info_, ("-%s\n", __func__));
>  
>  	return _SUCCESS;
>  }
> @@ -994,7 +994,7 @@ static int  ips_netdrv_open(struct adapter *padapter)
>  
>  	status = rtw_hal_init(padapter);
>  	if (status == _FAIL) {
> -		RT_TRACE(_module_os_intfs_c_, _drv_err_, ("ips_netdrv_open(): Can't init h/w!\n"));
> +		RT_TRACE(_module_os_intfs_c_, _drv_err_, ("%s(): Can't init h/w!\n", __func__));
>  		goto netdev_open_error;
>  	}
>  
> @@ -1007,7 +1007,7 @@ static int  ips_netdrv_open(struct adapter *padapter)
>  
>  netdev_open_error:
>  	/* padapter->bup = false; */
> -	DBG_871X("-ips_netdrv_open - drv_open failure, bup =%d\n", padapter->bup);
> +	DBG_871X("-%s - drv_open failure, bup =%d\n", __func__, padapter->bup);
>  
>  	return _FAIL;
>  }
> @@ -1016,24 +1016,25 @@ static int  ips_netdrv_open(struct adapter *padapter)
>  int rtw_ips_pwr_up(struct adapter *padapter)
>  {
>  	int result;
> -	DBG_871X("===>  rtw_ips_pwr_up..............\n");
> +
> +	DBG_871X("===>  %s..............\n", __func__);
>  
>  	result = ips_netdrv_open(padapter);
>  
> -	DBG_871X("<===  rtw_ips_pwr_up..............\n");
> +	DBG_871X("<===  %s..............\n", __func__);
>  	return result;
>  }
>  
>  void rtw_ips_pwr_down(struct adapter *padapter)
>  {
> -	DBG_871X("===> rtw_ips_pwr_down...................\n");
> +	DBG_871X("===> %s...................\n", __func__);
>  
>  	padapter->bCardDisableWOHSM = true;
>  	padapter->net_closed = true;
>  
>  	rtw_ips_dev_unload(padapter);
>  	padapter->bCardDisableWOHSM = false;
> -	DBG_871X("<=== rtw_ips_pwr_down.....................\n");
> +	DBG_871X("<=== %s.....................\n", __func__);
>  }
>  
>  void rtw_ips_dev_unload(struct adapter *padapter)
> @@ -1087,7 +1088,8 @@ static int netdev_close(struct net_device *pnetdev)
>  
>  		rtw_dev_unload(padapter);
>  	}
> -	else*/
> +	else
> +*/
>  	if (pwrctl->rf_pwrstate == rf_on) {
>  		DBG_871X("(2)871x_drv - drv_close, bup =%d, hw_init_completed =%d\n", padapter->bup, padapter->hw_init_completed);
>  
> @@ -1144,7 +1146,7 @@ void rtw_dev_unload(struct adapter *padapter)
>  		if (padapter->intf_stop)
>  			padapter->intf_stop(padapter);
>  
> -		RT_TRACE(_module_hci_intfs_c_, _drv_notice_, ("@ rtw_dev_unload: stop intf complete!\n"));
> +		RT_TRACE(_module_hci_intfs_c_, _drv_notice_, ("@ %s: stop intf complete!\n", __func__));
>  
>  		if (!pwrctl->bInternalAutoSuspend)
>  			rtw_stop_drv_threads(padapter);
> -- 
> 2.17.1
> 
> _______________________________________________
> devel mailing list
> devel@linuxdriverproject.org
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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.

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

      reply	other threads:[~2020-08-18 14:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-12 16:07 [PATCH] staging: rtl8723bs: os_dep: fix function-name print using __func__ Mohammed Rushad
2020-08-18 14:06 ` Greg KH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200818140645.GC547677@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=hdegoede@redhat.com \
    --cc=john.oldman@polehill.co.uk \
    --cc=kai.heng.feng@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luk@wybcz.pl \
    --cc=mohammedrushad@gmail.com \
    --cc=nachukannan@gmail.com \
    --cc=vkor@vkten.in \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox