From: Mohammed Rushad <mohammedrushad@gmail.com> To: gregkh@linuxfoundation.org, john.oldman@polehill.co.uk, kai.heng.feng@canonical.com, luk@wybcz.pl, vkor@vkten.in, nachukannan@gmail.com, mohammedrushad@gmail.com, hdegoede@redhat.com Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging: rtl8723bs: os_dep: fix function-name print using __func__ Date: Wed, 12 Aug 2020 21:37:45 +0530 [thread overview] Message-ID: <20200812160745.7215-1-mohammedrushad@gmail.com> (raw) 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(ð_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
WARNING: multiple messages have this Message-ID (diff)
From: Mohammed Rushad <mohammedrushad@gmail.com> To: gregkh@linuxfoundation.org, john.oldman@polehill.co.uk, kai.heng.feng@canonical.com, luk@wybcz.pl, vkor@vkten.in, nachukannan@gmail.com, mohammedrushad@gmail.com, hdegoede@redhat.com Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging: rtl8723bs: os_dep: fix function-name print using __func__ Date: Wed, 12 Aug 2020 21:37:45 +0530 [thread overview] Message-ID: <20200812160745.7215-1-mohammedrushad@gmail.com> (raw) 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(ð_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
next reply other threads:[~2020-08-12 16:07 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-08-12 16:07 Mohammed Rushad [this message] 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 2020-08-18 14:06 ` Greg KH
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=20200812160745.7215-1-mohammedrushad@gmail.com \ --to=mohammedrushad@gmail.com \ --cc=devel@driverdev.osuosl.org \ --cc=gregkh@linuxfoundation.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=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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.