staging: cleanup: Fix incompatible type comparison in wilc1000/host_interface.c
PATCH 1/1 staging: cleanup: Fix incompatible type comparison in wilc1000/host_interface.c
This patch replaces an "if (ptr > 0)" comparison that seems to be a confusing way to check for null by a simpler "if (ptr)" check.
--- drivers/staging/wilc1000/host_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wilc1000/host_interface.c +1 -1
@@ -2270,7 +2270,7 @@ static void Handle_AddBeacon(struct host_if_drv *hif_drv, *pu8CurrByte++ = ((pstrSetBeaconParam->tail_len >>16 ) &0xFF ); *pu8CurrByte++ = ((pstrSetBeaconParam->tail_len >>24 ) &0xFF ); -if (pstrSetBeaconParam->tail >0 ) +if (pstrSetBeaconParam->tail)memcpy (pu8CurrByte, pstrSetBeaconParam->tail, pstrSetBeaconParam->tail_len); pu8CurrByte += pstrSetBeaconParam->tail_len;
Signature · 1 line
2.6.2
Put v2 in the subject. Also the subsystem prefix is:
[PATCH v3] staging: wilc1000: ...
Quoted 5 lines · Mario J. Rugiero
This patch replaces an "if (ptr > 0)" comparison that seems to be a confusing way to check for null by a simpler "if (ptr)" check.
Signed-off-by Mario J. Rugiero <[email protected]>---
v2: Remove the != NULL because checkpatch complains.
drivers/staging/wilc1000/host_interface.c static void Handle_AddBeacon(struct host_if_drv *hif_drv, · line 2273
Quoted 13 lines
drivers/staging/wilc1000/host_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/wilc1000/host_interface.c +1
-1@@ -2270,7 +2270,7 @@ static void Handle_AddBeacon(struct host_if_drv *hif_drv, *pu8CurrByte++ = ((pstrSetBeaconParam->tail_len >>16 ) &0xFF ); *pu8CurrByte++ = ((pstrSetBeaconParam->tail_len >>24 ) &0xFF ); -if (pstrSetBeaconParam->tail >0 ) +if (pstrSetBeaconParam->tail)
Probably the intention was to check if "pstrSetBeaconParam->tail_len > 0" but I'm not sure. The wilc1000 maintainers are very responsive though so maybe they will know for sure.
regards,
dan carpenter
OK. Since the maintainers are CC'd, I guess I should wait for a clarification about this?
Quoted 33 lines · Dan Carpenter
Put v2 in the subject. Also the subsystem prefix is:
[PATCH v3] staging: wilc1000: ...
Quoted 5 lines · Mario J. Rugiero
This patch replaces an "if (ptr > 0)" comparison that seems to be a confusing way to check for null by a simpler "if (ptr)" check.
Signed-off-by Mario J. Rugiero <[email protected]>---
v2: Remove the != NULL because checkpatch complains.
drivers/staging/wilc1000/host_interface.c static void Handle_AddBeacon(struct host_if_drv *hif_drv, · line 2273
Quoted 13 lines
drivers/staging/wilc1000/host_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/wilc1000/host_interface.c +1
-1@@ -2270,7 +2270,7 @@ static void Handle_AddBeacon(struct host_if_drv *hif_drv, *pu8CurrByte++ = ((pstrSetBeaconParam->tail_len >>16 ) &0xFF ); *pu8CurrByte++ = ((pstrSetBeaconParam->tail_len >>24 ) &0xFF ); -if (pstrSetBeaconParam->tail >0 ) +if (pstrSetBeaconParam->tail)Probably the intention was to check if "
pstrSetBeaconParam->tail_len> 0" but I'm not sure. The wilc1000 maintainers are very responsive though so maybe they will know for sure.regards,
dan carpenter
Quoted 1 line · Mario J. Rugiero
OK. Since the maintainers are CC'd, I guess I should wait for a clarification about this?
Hi Mario,
The purpose of that is to check if tail is null or not. if it is not null, there is tail to send, so copy to buff.
regards,
glen lee.
Quoted 41 lines · Dan Carpenter
Quoted 26 lines
Put v2 in the subject. Also the subsystem prefix is:
[PATCH v3] staging: wilc1000: ...
Quoted 5 lines · Mario J. Rugiero
This patch replaces an "if (ptr > 0)" comparison that seems to be a confusing way to check for null by a simpler "if (ptr)" check.
Signed-off-by Mario J. Rugiero <[email protected]>---
v2: Remove the != NULL because checkpatch complains.
drivers/staging/wilc1000/host_interface.c static void Handle_AddBeacon(struct · line 2274
Quoted 13 lines
drivers/staging/wilc1000/host_interface.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/wilc1000/host_interface.c +1
-0@@ -2270,7 +2270,7 @@ static void Handle_AddBeacon(struct host_if_drv *hif_drv, *pu8CurrByte++ = ((pstrSetBeaconParam->tail_len >>16 ) &0xFF ); *pu8CurrByte++ = ((pstrSetBeaconParam->tail_len >>24 ) &0xFF ); - if (pstrSetBeaconParam->tail > 0) + if (pstrSetBeaconParam->tail)Probably the intention was to check if "
pstrSetBeaconParam->tail_lenQuoted 8 lines
Quoted 1 line
0"
but I'm not sure. The wilc1000 maintainers are very responsive though so maybe they will know for sure.
regards,
dan carpenter_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Thank you. Then the patch itself should see no changes as of now, am I right? Should I submit a new one anyway to fix the subject line?
Regards,
Mario.
Quoted 3 lines · Mario J. Rugiero
Thank you. Then the patch itself should see no changes as of now, am I right?
Should I submit a new one anyway to fix the subject line?
Yes, please.
regards,
dan carpenter
Would be v3, or remains v2 because of the lack of further changes afterwards?
Regards,
Mario.
Quoted 9 lines · Dan Carpenter
Quoted 3 lines · Mario J. Rugiero
Thank you. Then the patch itself should see no changes as of now, am I right?
Should I submit a new one anyway to fix the subject line?Yes, please.
regards,
dan carpenter
Quoted 2 lines · Mario J. Rugiero
Would be v3, or remains v2 because of the lack of further changes afterwards?
Bump the version number.
regards,
dan carpenter