Staging: rtlwifi: halmac: Remove unnecessary 'out of memory' messages
PATCH 1/1 Staging: rtlwifi: halmac: Remove unnecessary 'out of memory' messages
Remove unnecessary messages because OOM (Out Of Memory Manager) reports memory allocation fail messages.
Fix issue found by by checkpatch.pl.
WARNING: Possible unnecessary 'out of memory' message.
--- drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c +5 -5
@@ -277,7 +277,7 @@ halmac_dump_efuse_drv_88xx(struct halmac_adapter *halmac_adapter)if (!halmac_adapter->hal_efuse_map) { halmac_adapter->hal_efuse_map =kzalloc (efuse_size,GFP_KERNEL );if (!halmac_adapter->hal_efuse_map) { -pr_err ("[ERR]halmac allocate efuse map Fail!!\n" ); +/* out of memory */ return HALMAC_RET_MALLOC_FAIL ; } }
@@ -538,7 +538,7 @@ halmac_read_logical_efuse_map_88xx(struct halmac_adapter *halmac_adapter,if (!halmac_adapter->hal_efuse_map_valid) { efuse_map =kzalloc (efuse_size,GFP_KERNEL );if (!efuse_map) { -pr_err ("[ERR]halmac allocate local efuse map Fail!!\n" ); +/* out of memory */ return HALMAC_RET_MALLOC_FAIL ; }
@@ -554,7 +554,7 @@ halmac_read_logical_efuse_map_88xx(struct halmac_adapter *halmac_adapter, halmac_adapter->hal_efuse_map =kzalloc (efuse_size,GFP_KERNEL );if (!halmac_adapter->hal_efuse_map) { -pr_err ("[ERR]halmac allocate efuse map Fail!!\n" ); +/* out of memory */ kfree (efuse_map);return HALMAC_RET_MALLOC_FAIL ; }
@@ -3579,7 +3579,7 @@ halmac_verify_send_rsvd_page_88xx(struct halmac_adapter *halmac_adapter) rsvd_buf =kzalloc (h2c_pkt_verify_size,GFP_KERNEL );if (!rsvd_buf) { -/*pr_err("[ERR]rsvd buffer malloc fail!!\n");*/ +/* out of memory */ return HALMAC_RET_MALLOC_FAIL ; }
@@ -3598,7 +3598,7 @@ halmac_verify_send_rsvd_page_88xx(struct halmac_adapter *halmac_adapter) GFP_KERNEL);if (!rsvd_page) { -pr_err ("[ERR]rsvd page malloc fail!!\n" ); +/* out of memory */ kfree (rsvd_buf);return HALMAC_RET_MALLOC_FAIL ; }
Signature · 1 line
2.11.0
Quoted 5 lines · Georgiana Chelu
Remove unnecessary messages because OOM (Out Of Memory Manager) reports memory allocation fail messages.
Fix issue found by by checkpatch.pl.
WARNING: Possible unnecessary 'out of memory' message.
Do you need to add the comments? Looking at the code, it seems pretty obvious from the few lines above what the problem is.
julia
Quoted 65 lines
Signed-off-by Georgiana Chelu <[email protected]>--- drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c +5
-6@@ -277,7 +277,7 @@ halmac_dump_efuse_drv_88xx(struct halmac_adapter *halmac_adapter)if (!halmac_adapter->hal_efuse_map) { halmac_adapter->hal_efuse_map =kzalloc (efuse_size,GFP_KERNEL );if (!halmac_adapter->hal_efuse_map) { -pr_err ("[ERR]halmac allocate efuse map Fail!!\n" ); +/* out of memory */ return HALMAC_RET_MALLOC_FAIL ; } }@@ -538,7 +538,7 @@ halmac_read_logical_efuse_map_88xx(struct halmac_adapter *halmac_adapter,if (!halmac_adapter->hal_efuse_map_valid) { efuse_map =kzalloc (efuse_size,GFP_KERNEL );if (!efuse_map) { -pr_err ("[ERR]halmac allocate local efuse map Fail!!\n" ); +/* out of memory */ return HALMAC_RET_MALLOC_FAIL ; }@@ -554,7 +554,7 @@ halmac_read_logical_efuse_map_88xx(struct halmac_adapter *halmac_adapter, halmac_adapter->hal_efuse_map =kzalloc (efuse_size,GFP_KERNEL );if (!halmac_adapter->hal_efuse_map) { -pr_err ("[ERR]halmac allocate efuse map Fail!!\n" ); +/* out of memory */ kfree (efuse_map);return HALMAC_RET_MALLOC_FAIL ; }@@ -3579,7 +3579,7 @@ halmac_verify_send_rsvd_page_88xx(struct halmac_adapter *halmac_adapter) rsvd_buf =kzalloc (h2c_pkt_verify_size,GFP_KERNEL );if (!rsvd_buf) { -/*pr_err("[ERR]rsvd buffer malloc fail!!\n");*/ +/* out of memory */ return HALMAC_RET_MALLOC_FAIL ; }@@ -3598,7 +3598,7 @@ halmac_verify_send_rsvd_page_88xx(struct halmac_adapter *halmac_adapter) GFP_KERNEL);if (!rsvd_page) { -pr_err ("[ERR]rsvd page malloc fail!!\n" ); +/* out of memory */ kfree (rsvd_buf);return HALMAC_RET_MALLOC_FAIL ; } --2.11.0
--
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/20170919210157.44uf4sm27tjshxn6%40fireworks.
For more options, visit https://groups.google.com/d/optout.
Quoted 7 lines · Julia Lawall
Quoted 3 lines · Georgiana Chelu
Remove unnecessary messages because OOM (Out Of Memory Manager) reports memory allocation fail messages.
Quoted 9 lines
Quoted 2 lines
Fix issue found by by checkpatch.pl.
WARNING: Possible unnecessary 'out of memory' message.Do you need to add the comments? Looking at the code, it seems pretty obvious from the few lines above what the problem is.
julia
I saw similar comments in this file, so I thought it would be nice to have uniformity in the code. But, as you say, the return error is obvious. So, I will send a second version of the patch without the 'out of memory' comments.
Quoted 65 lines
Quoted 65 lines
Signed-off-by Georgiana Chelu <[email protected]>--- drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c +5
-6@@ -277,7 +277,7 @@ halmac_dump_efuse_drv_88xx(struct halmac_adapter *halmac_adapter)if (!halmac_adapter->hal_efuse_map) { halmac_adapter->hal_efuse_map =kzalloc (efuse_size,GFP_KERNEL );if (!halmac_adapter->hal_efuse_map) { -pr_err ("[ERR]halmac allocate efuse map Fail!!\n" ); +/* out of memory */ return HALMAC_RET_MALLOC_FAIL ; } }@@ -538,7 +538,7 @@ halmac_read_logical_efuse_map_88xx(struct halmac_adapter *halmac_adapter,if (!halmac_adapter->hal_efuse_map_valid) { efuse_map =kzalloc (efuse_size,GFP_KERNEL );if (!efuse_map) { -pr_err ("[ERR]halmac allocate local efuse map Fail!!\n" ); +/* out of memory */ return HALMAC_RET_MALLOC_FAIL ; }@@ -554,7 +554,7 @@ halmac_read_logical_efuse_map_88xx(struct halmac_adapter *halmac_adapter, halmac_adapter->hal_efuse_map =kzalloc (efuse_size,GFP_KERNEL );if (!halmac_adapter->hal_efuse_map) { -pr_err ("[ERR]halmac allocate efuse map Fail!!\n" ); +/* out of memory */ kfree (efuse_map);return HALMAC_RET_MALLOC_FAIL ; }@@ -3579,7 +3579,7 @@ halmac_verify_send_rsvd_page_88xx(struct halmac_adapter *halmac_adapter) rsvd_buf =kzalloc (h2c_pkt_verify_size,GFP_KERNEL );if (!rsvd_buf) { -/*pr_err("[ERR]rsvd buffer malloc fail!!\n");*/ +/* out of memory */ return HALMAC_RET_MALLOC_FAIL ; }@@ -3598,7 +3598,7 @@ halmac_verify_send_rsvd_page_88xx(struct halmac_adapter *halmac_adapter) GFP_KERNEL);if (!rsvd_page) { -pr_err ("[ERR]rsvd page malloc fail!!\n" ); +/* out of memory */ kfree (rsvd_buf);return HALMAC_RET_MALLOC_FAIL ; } --2.11.0
--
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/20170919210157.44uf4sm27tjshxn6%40fireworks.
For more options, visit https://groups.google.com/d/optout.
Quoted 14 lines · Georgiana Chelu
Quoted 13 lines · Julia Lawall
Quoted 5 lines · Georgiana Chelu
Remove unnecessary messages because OOM (Out Of Memory Manager) reports memory allocation fail messages.
Fix issue found by by checkpatch.pl.
WARNING: Possible unnecessary 'out of memory' message.Do you need to add the comments? Looking at the code, it seems pretty obvious from the few lines above what the problem is.
Quoted 8 lines
Quoted 3 lines
julia
I saw similar comments in this file, so I thought it would be nice to have uniformity in the code. But, as you say, the return error is obvious. So, I will send a second version of the patch without the 'out of memory' comments.
If the other ones are similarly obvious, perhaps they could go too :)
julia
Quoted 67 lines
Quoted 66 lines
Quoted 66 lines
Signed-off-by Georgiana Chelu <[email protected]>--- drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c +5
-6@@ -277,7 +277,7 @@ halmac_dump_efuse_drv_88xx(struct halmac_adapter *halmac_adapter)if (!halmac_adapter->hal_efuse_map) { halmac_adapter->hal_efuse_map =kzalloc (efuse_size,GFP_KERNEL );if (!halmac_adapter->hal_efuse_map) { -pr_err ("[ERR]halmac allocate efuse map Fail!!\n" ); +/* out of memory */ return HALMAC_RET_MALLOC_FAIL ; } }@@ -538,7 +538,7 @@ halmac_read_logical_efuse_map_88xx(struct halmac_adapter *halmac_adapter,if (!halmac_adapter->hal_efuse_map_valid) { efuse_map =kzalloc (efuse_size,GFP_KERNEL );if (!efuse_map) { -pr_err ("[ERR]halmac allocate local efuse map Fail!!\n" ); +/* out of memory */ return HALMAC_RET_MALLOC_FAIL ; }@@ -554,7 +554,7 @@ halmac_read_logical_efuse_map_88xx(struct halmac_adapter *halmac_adapter, halmac_adapter->hal_efuse_map =kzalloc (efuse_size,GFP_KERNEL );if (!halmac_adapter->hal_efuse_map) { -pr_err ("[ERR]halmac allocate efuse map Fail!!\n" ); +/* out of memory */ kfree (efuse_map);return HALMAC_RET_MALLOC_FAIL ; }@@ -3579,7 +3579,7 @@ halmac_verify_send_rsvd_page_88xx(struct halmac_adapter *halmac_adapter) rsvd_buf =kzalloc (h2c_pkt_verify_size,GFP_KERNEL );if (!rsvd_buf) { -/*pr_err("[ERR]rsvd buffer malloc fail!!\n");*/ +/* out of memory */ return HALMAC_RET_MALLOC_FAIL ; }@@ -3598,7 +3598,7 @@ halmac_verify_send_rsvd_page_88xx(struct halmac_adapter *halmac_adapter) GFP_KERNEL);if (!rsvd_page) { -pr_err ("[ERR]rsvd page malloc fail!!\n" ); +/* out of memory */ kfree (rsvd_buf);return HALMAC_RET_MALLOC_FAIL ; } --2.11.0
--
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/20170919210157.44uf4sm27tjshxn6%40fireworks.
For more options, visit https://groups.google.com/d/optout.
Quoted 22 lines · Julia Lawall
Quoted 18 lines · Georgiana Chelu
Quoted 16 lines · Julia Lawall
Quoted 5 lines · Georgiana Chelu
Remove unnecessary messages because OOM (Out Of Memory Manager) reports memory allocation fail messages.
Fix issue found by by checkpatch.pl.
WARNING: Possible unnecessary 'out of memory' message.Do you need to add the comments? Looking at the code, it seems pretty obvious from the few lines above what the problem is.
julia
Quoted 6 lines
Quoted 4 lines
I saw similar comments in this file, so I thought it would be nice to have uniformity in the code. But, as you say, the return error is obvious. So, I will send a second version of the patch without the 'out of memory' comments.
If the other ones are similarly obvious, perhaps they could go too :)
Agree with Julia. The comments are superfluous here.