Staging: rtl8188eu: Remove NULL comparision.
v2 cover Staging: rtl8188eu: Remove NULL comparision.
Remove NULL comparision.This patch is found by checkpatch.pl script. Changes in v2:
*Correcting the heading.
Sandhya Bankar (4):
Staging: rtl8188eu: Remove NULL comparision.
Staging: rtl8188eu: Remove NULL comparision.
Staging: rtl8188eu: Use !x instead of x == NULL.
Staging: rtl8188eu: Use !x instead of x == NULL.
drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c | 2 +- drivers/staging/rtl8188eu/hal/hal_intf.c | 2 +- drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c | 2 +- drivers/staging/rtl8188eu/hal/usb_halinit.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
Signature · 1 line
1.8.3.4
PATCH v2 1/4 Staging: rtl8188eu: Hal8188ERateAdaptive: Remove NULL comparison.
Remove NULL comparison.
--- drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c +1 -1
@@ -557,7 +557,7 @@ int ODM_RAInfo_Init(struct odm_dm_struct *dm_odm, u8 macid)u8 WirelessMode =0xFF ;/* invalid value */ u8 max_rate_idx =0x13 ;/* MCS7 */ -if (dm_odm->pWirelessMode !=NULL ) +if (dm_odm->pWirelessMode) WirelessMode = *(dm_odm->pWirelessMode);if (WirelessMode !=0xFF ) {
Signature · 1 line
1.8.3.4
PATCH v2 2/4 Staging: rtl8188eu: hal_intf: Remove NULL comparision.
In reply to Sandhya BankarRemove NULL comparision.
--- drivers/staging/rtl8188eu/hal/hal_intf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8188eu/hal/hal_intf.c +1 -1
@@ -186,7 +186,7 @@ s32 rtw_hal_mgnt_xmit(struct adapter *adapt, struct xmit_frame *pmgntframe)s32 rtw_hal_init_xmit_priv (struct adapter *adapt) { -if (adapt->HalFunc.init_xmit_priv !=NULL ) +if (adapt->HalFunc.init_xmit_priv)return adapt->HalFunc.init_xmit_priv (adapt);return _FAIL; }
Signature · 1 line
1.8.3.4
Re: [Outreachy kernel] [PATCH v2 2/4] Staging: rtl8188eu: Use !x instead of x == NULL.
Quoted 1 line · Sandhya Bankar
Use !x instead of x == NULL.
There is a != test here.
julia
Quoted 32 lines
Signed-off-by Sandhya Bankar <[email protected]>---
Changes in v2:
*Correcting the heading.drivers/staging/rtl8188eu/hal/hal_intf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/rtl8188eu/hal/hal_intf.c +1
-1@@ -186,7 +186,7 @@ s32 rtw_hal_mgnt_xmit(struct adapter *adapt, struct xmit_frame *pmgntframe)s32 rtw_hal_init_xmit_priv (struct adapter *adapt) { -if (adapt->HalFunc.init_xmit_priv !=NULL ) +if (adapt->HalFunc.init_xmit_priv)return adapt->HalFunc.init_xmit_priv (adapt);return _FAIL; }Signature · 8 lines
1.8.3.4 -- You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/08dbf910fd604fdfd258b82d2ca8e53621f9c6f8.1458376695.git.bankarsandhya512%40gmail.com. For more options, visit https://groups.google.com/d/optout.
PATCH v2 3/4 Staging: rtl8188eu: rtl8188e_rxdesc: Use !x instead of x == NULL.
In reply to Sandhya BankarUse !x instead of x == NULL.
--- drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c +1 -1
@@ -45,7 +45,7 @@ static void process_link_qual(struct adapter *padapter,struct rx_pkt_attrib *pattrib;struct signal_stat *signal_stat; -if (prframe ==NULL || padapter ==NULL ) +if (!prframe || !padapter)return ; pattrib = &prframe->attrib;
Signature · 1 line
1.8.3.4
PATCH v2 4/4 Staging: rtl8188eu: usb_halinit: Use !x instead of x == NULL.
In reply to Sandhya BankarUse !x instead of x == NULL.
--- drivers/staging/rtl8188eu/hal/usb_halinit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8188eu/hal/usb_halinit.c +1 -1
@@ -2083,7 +2083,7 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt) adapt->HalData =kzalloc (sizeof (struct hal_data_8188e ),GFP_KERNEL ); -if (adapt->HalData ==NULL ) +if (!adapt->HalData)DBG_88E ("cant not alloc memory for HAL DATA\n" ); halfunc->hal_power_on = rtl8188eu_InitPowerOn;
Signature · 1 line
1.8.3.4
Quoted 9 lines · Sandhya Bankar
Remove NULL comparision.This patch is found by checkpatch.pl script. Changes in v2:
*Correcting the heading.Sandhya Bankar (4):
Staging: rtl8188eu: Remove NULL comparision.
Staging: rtl8188eu: Remove NULL comparision.
Staging: rtl8188eu: Use !x instead of x == NULL.
Staging: rtl8188eu: Use !x instead of x == NULL.
Theer are repeated subject lines here, which is going to cause problems. You could use the file name, without the .c, to differentiate between them.
julia
Quoted 17 lines
drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c | 2 +- drivers/staging/rtl8188eu/hal/hal_intf.c | 2 +- drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c | 2 +- drivers/staging/rtl8188eu/hal/usb_halinit.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)Signature · 8 lines
1.8.3.4 -- You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/cover.1458376695.git.bankarsandhya512%40gmail.com. For more options, visit https://groups.google.com/d/optout.