[PATCH v5 2/2] staging: rtl8192u: remove unnecessary return in r8190_rtl8256.c
remove the unnecessary return at the end of function phy_set_rf8256_ofdm_tx_power(), reported by scripts/checkpatch.pl. Signed-off-by: Du Cheng --- drivers/staging/rtl8192u/r8190_rtl8256.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/rtl8192u/r8190_rtl8256.c b/drivers/staging/rtl8192u/r8190_rtl8256.c index 3e6bd6caf9da..54747fda552f 100644 --- a/drivers/staging/rtl8192u/r8190_rtl8256.c +++ b/drivers/staging/rtl8192u/r8190_rtl8256.c @@ -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 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v5 1/2] staging: rtl8192u: fix RT_TRACE() in r8190_rtl8256.c
use MACRO __func__ instead of the literal names for RT_TRACE() in phy_set_rf8256_bandwidth() and phy_rf8256_config_para_file(), as reported by scripts/checkpatch.pl. Signed-off-by: Du Cheng --- changes v5: * fixed subject lines to be distinct and more specific changes v4: * merge two similar patches into 1 changes v3: * break up changes into 3 patches changes v2: * improvedescription changes v1: * fix coding style drivers/staging/rtl8192u/r8190_rtl8256.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8192u/r8190_rtl8256.c b/drivers/staging/rtl8192u/r8190_rtl8256.c index fee3bfb99075..3e6bd6caf9da 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; } } -- 2.27.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v4 2/2] staging: rtl8192u: fixed coding style of r8190_rtl8256.c
remove the unnecessary return at the end of function phy_set_rf8256_ofdm_tx_power(), reported by scripts/checkpatch.pl. Signed-off-by: Du Cheng --- drivers/staging/rtl8192u/r8190_rtl8256.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/rtl8192u/r8190_rtl8256.c b/drivers/staging/rtl8192u/r8190_rtl8256.c index 3e6bd6caf9da..54747fda552f 100644 --- a/drivers/staging/rtl8192u/r8190_rtl8256.c +++ b/drivers/staging/rtl8192u/r8190_rtl8256.c @@ -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 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v4 1/2] staging: rtl8192u: fixed coding style of r8190_rtl8256.c
use MACRO __func__ instead of the literal names for RT_TRACE() in phy_set_rf8256_bandwidth() and phy_rf8256_config_para_file(), as reported by scripts/checkpatch.pl. Signed-off-by: Du Cheng --- changes v4: * merge two similar patches into 1 changes v3: * break up changes into 3 patches changes v2: * improvedescription changes v1: * fix coding style drivers/staging/rtl8192u/r8190_rtl8256.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8192u/r8190_rtl8256.c b/drivers/staging/rtl8192u/r8190_rtl8256.c index fee3bfb99075..3e6bd6caf9da 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; } } -- 2.27.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 1/3] staging: rtl8192u: fixed coding style of r8190_rtl8256.c
use MACRO __func__ instead of "phy_set_rf8256_bandwidth" for RT_TRACE() inside phy_set_rf8256_bandwidth(), reported by scripts/checkpatch.pl. Signed-off-by: Du Cheng --- changes v3: * break up changes into 3 patches changes v2: * improve description changes v1: * fix coding style drivers/staging/rtl8192u/r8190_rtl8256.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/r8190_rtl8256.c b/drivers/staging/rtl8192u/r8190_rtl8256.c index fee3bfb99075..7294a3fbe205 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; } } -- 2.27.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 3/3] staging: rtl8192u: fixed coding style of r8190_rtl8256.c
remove the unnecessary return at the end of function phy_set_rf8256_ofdm_tx_power(), reported by scripts/checkpatch.pl. Signed-off-by: Du Cheng --- drivers/staging/rtl8192u/r8190_rtl8256.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/rtl8192u/r8190_rtl8256.c b/drivers/staging/rtl8192u/r8190_rtl8256.c index 3e6bd6caf9da..54747fda552f 100644 --- a/drivers/staging/rtl8192u/r8190_rtl8256.c +++ b/drivers/staging/rtl8192u/r8190_rtl8256.c @@ -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 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 2/3] staging: rtl8192u: fixed coding style of r8190_rtl8256.c
use MACRO __func__ instead of "phy_rf8256_config_para_file" for RT_TRACE() inside phy_rf8256_config_para_file(), reported by scripts/checkpatch.pl. Signed-off-by: Du Cheng --- drivers/staging/rtl8192u/r8190_rtl8256.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192u/r8190_rtl8256.c b/drivers/staging/rtl8192u/r8190_rtl8256.c index 7294a3fbe205..3e6bd6caf9da 100644 --- a/drivers/staging/rtl8192u/r8190_rtl8256.c +++ b/drivers/staging/rtl8192u/r8190_rtl8256.c @@ -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; } } -- 2.27.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2] staging: greybus: fix coding style of greybus/loopback.c
On Tue, Feb 16, 2021 at 12:28:01PM +0100, Greg Kroah-Hartman wrote: > On Tue, Feb 16, 2021 at 07:13:53PM +0800, Du Cheng wrote: > > fix macro gb_loopback_stats_attrs by wrapping its multi-line definition > > inside a do {} while(0) block, in compliance to scripts/checkpatch.pl. > > > > Signed-off-by: Du Cheng > > --- > > changes v2: > > * relign backslashes with tabstop=8 > > * improve description and subject > > > > changes v1: > > * fix coding style of the macro > > > > drivers/staging/greybus/loopback.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/staging/greybus/loopback.c > > b/drivers/staging/greybus/loopback.c > > index 2471448ba42a..24b769688817 100644 > > --- a/drivers/staging/greybus/loopback.c > > +++ b/drivers/staging/greybus/loopback.c > > @@ -163,9 +163,11 @@ static ssize_t name##_avg_show(struct device *dev, > > \ > > static DEVICE_ATTR_RO(name##_avg) > > > > #define gb_loopback_stats_attrs(field) \ > > +do { \ > > gb_loopback_ro_stats_attr(field, min, u); \ > > gb_loopback_ro_stats_attr(field, max, u); \ > > - gb_loopback_ro_avg_attr(field) > > + gb_loopback_ro_avg_attr(field); \ > > +} while (0) > > > > #define gb_loopback_attr(field, type) > > \ > > static ssize_t field##_show(struct device *dev, > > \ > > -- > > 2.27.0 > > Did you successfully build this change? > > Please do so... > > thanks, > > greg k-h I realized I did not enable greybus subsystem in the config. after the enabling CONFIG_GREYBUS_LOOPBACK=m the make failed with compilation errors. Then I realized this macro is actually used for function definition, not as statements. I shall take back this PATCH as the proposed change in not applicable in this case. Thanks! ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2] staging: greybus: fix coding style of greybus/loopback.c
fix macro gb_loopback_stats_attrs by wrapping its multi-line definition inside a do {} while(0) block, in compliance to scripts/checkpatch.pl. Signed-off-by: Du Cheng --- changes v2: * relign backslashes with tabstop=8 * improve description and subject changes v1: * fix coding style of the macro drivers/staging/greybus/loopback.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/greybus/loopback.c b/drivers/staging/greybus/loopback.c index 2471448ba42a..24b769688817 100644 --- a/drivers/staging/greybus/loopback.c +++ b/drivers/staging/greybus/loopback.c @@ -163,9 +163,11 @@ static ssize_t name##_avg_show(struct device *dev, \ static DEVICE_ATTR_RO(name##_avg) #define gb_loopback_stats_attrs(field) \ +do { \ gb_loopback_ro_stats_attr(field, min, u); \ gb_loopback_ro_stats_attr(field, max, u); \ - gb_loopback_ro_avg_attr(field) + gb_loopback_ro_avg_attr(field); \ +} while (0) #define gb_loopback_attr(field, type) \ static ssize_t field##_show(struct device *dev, \ -- 2.27.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2] staging: rtl8192u: fix coding style in r8190_rtl8256.c
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 --- 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 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v5] staging: qlge: fix comment style in qlge_main.c
fix the closing of a one-line block comment, marked incorrect by scripts/checkpatch.pl. Signed-off-by: Du Cheng --- changes v5: - improve description changes v4: - move "changes" after triple-tiret changes v3: - add SUBSYSTEM in subject line - add explanation to past version of this patch changes v2: - move closing of comment to the same line changes v1: - align * in block comments drivers/staging/qlge/qlge_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c index 5516be3af898..2682a0e474bd 100644 --- a/drivers/staging/qlge/qlge_main.c +++ b/drivers/staging/qlge/qlge_main.c @@ -3815,8 +3815,7 @@ static int qlge_adapter_down(struct qlge_adapter *qdev) qlge_tx_ring_clean(qdev); - /* Call netif_napi_del() from common point. - */ + /* Call netif_napi_del() from common point. */ for (i = 0; i < qdev->rss_ring_count; i++) netif_napi_del(&qdev->rx_ring[i].napi); -- 2.27.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v4] staging: qlge: fix comment style in qlge_main.c
align * in block comments on each line This series of patches is for Task 10 of the Eudyptula Challenge Signed-off-by: Du Cheng --- changes v4: - move "changes" after triple-tiret changes v3: - add SUBSYSTEM in subject line - add explanation to past version of this patch changes v2: - move closing of comment to the same line changes v1: - align * in block comments drivers/staging/qlge/qlge_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c index 5516be3af898..2682a0e474bd 100644 --- a/drivers/staging/qlge/qlge_main.c +++ b/drivers/staging/qlge/qlge_main.c @@ -3815,8 +3815,7 @@ static int qlge_adapter_down(struct qlge_adapter *qdev) qlge_tx_ring_clean(qdev); - /* Call netif_napi_del() from common point. - */ + /* Call netif_napi_del() from common point. */ for (i = 0; i < qdev->rss_ring_count; i++) netif_napi_del(&qdev->rx_ring[i].napi); -- 2.27.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3] staging: fix coding style in driver/staging/qlge/qlge_main.c
align * in block comments on each line changes v3: - add SUBSYSTEM in subject line - add explanation to past version of this patch changes v2: - move closing of comment to the same line changes v1: - align * in block comments Signed-off-by: Du Cheng --- drivers/staging/qlge/qlge_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c index 5516be3af898..2682a0e474bd 100644 --- a/drivers/staging/qlge/qlge_main.c +++ b/drivers/staging/qlge/qlge_main.c @@ -3815,8 +3815,7 @@ static int qlge_adapter_down(struct qlge_adapter *qdev) qlge_tx_ring_clean(qdev); - /* Call netif_napi_del() from common point. - */ + /* Call netif_napi_del() from common point. */ for (i = 0; i < qdev->rss_ring_count; i++) netif_napi_del(&qdev->rx_ring[i].napi); -- 2.27.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] fix coding style of drivers/staging/rtl8192u/r8190_rtl8256.c
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() Signed-off-by: Du Cheng --- 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 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel