All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Staging: Do not print message if kzalloc() failed.
@ 2016-03-01  9:07 Sandhya Bankar
  2016-03-01  9:09 ` [PATCH 1/4] Staging: lustre: " Sandhya Bankar
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Sandhya Bankar @ 2016-03-01  9:07 UTC (permalink / raw)
  To: outreachy-kernel

Do not print message if kzalloc() failed.
kzalloc() has its own messages. So no need to add extra one.

Sandhya Bankar (4):
  Staging: lustre: Do not print message if kzalloc() failed.
  Staging: rtl8188eu: Do not print message if kzalloc() failed.
  Staging: rtl8188eu: rtw_efuse: Do not print message if kzalloc() failed.
  Staging: wlan-ng: Do not print message if kzalloc() failed.

 drivers/staging/lustre/lustre/llite/llite_lib.c | 4 ----
 drivers/staging/rtl8188eu/core/rtw_cmd.c        | 3 +--
 drivers/staging/rtl8188eu/core/rtw_efuse.c      | 3 +--
 drivers/staging/wlan-ng/prism2sta.c             | 1 -
 4 files changed, 2 insertions(+), 9 deletions(-)

-- 
1.8.3.4



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/4] Staging: lustre: Do not print message if kzalloc() failed.
  2016-03-01  9:07 [PATCH 0/4] Staging: Do not print message if kzalloc() failed Sandhya Bankar
@ 2016-03-01  9:09 ` Sandhya Bankar
  2016-03-01 17:16   ` [Outreachy kernel] " Julia Lawall
  2016-03-01  9:12 ` [PATCH 2/4] Staging: rtl8188eu: " Sandhya Bankar
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Sandhya Bankar @ 2016-03-01  9:09 UTC (permalink / raw)
  To: outreachy-kernel

Do not print message if kzalloc() failed.
kzalloc() has its own messages. So no need to add extra one.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
---
 drivers/staging/lustre/lustre/llite/llite_lib.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c
index 1f3e8e8..c7b0729 100644
--- a/drivers/staging/lustre/lustre/llite/llite_lib.c
+++ b/drivers/staging/lustre/lustre/llite/llite_lib.c
@@ -1938,10 +1938,6 @@ void ll_open_cleanup(struct super_block *sb, struct ptlrpc_request *open_req)
 	body = req_capsule_server_get(&open_req->rq_pill, &RMF_MDT_BODY);
 	op_data = kzalloc(sizeof(*op_data), GFP_NOFS);
 	if (!op_data) {
-		CWARN("%s: cannot allocate op_data to release open handle for "
-		      DFID "\n",
-		      ll_get_fsname(sb, NULL, 0), PFID(&body->fid1));
-
 		return;
 	}
 
-- 
1.8.3.4



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/4] Staging: rtl8188eu: Do not print message if kzalloc() failed.
  2016-03-01  9:07 [PATCH 0/4] Staging: Do not print message if kzalloc() failed Sandhya Bankar
  2016-03-01  9:09 ` [PATCH 1/4] Staging: lustre: " Sandhya Bankar
@ 2016-03-01  9:12 ` Sandhya Bankar
  2016-03-01  9:14 ` [PATCH 3/4] Staging: rtl8188eu: rtw_efuse: " Sandhya Bankar
  2016-03-01  9:15 ` [PATCH 4/4] Staging: wlan-ng: " Sandhya Bankar
  3 siblings, 0 replies; 7+ messages in thread
From: Sandhya Bankar @ 2016-03-01  9:12 UTC (permalink / raw)
  To: outreachy-kernel

Do not print message if kzalloc() failed.
kzalloc() has its own messages. So no need to add extra one.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
---
 drivers/staging/rtl8188eu/core/rtw_cmd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c
index 1de7929..e5a6b7a 100644
--- a/drivers/staging/rtl8188eu/core/rtw_cmd.c
+++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c
@@ -394,9 +394,8 @@ u8 rtw_joinbss_cmd(struct adapter  *padapter, struct wlan_network *pnetwork)
 		RT_TRACE(_module_rtl871x_cmd_c_, _drv_notice_, ("+Join cmd: SSid =[%s]\n", pmlmepriv->assoc_ssid.Ssid));
 
 	pcmd = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
-	if (pcmd == NULL) {
+	if (!pcmd) {
 		res = _FAIL;
-		RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, ("rtw_joinbss_cmd: memory allocate for cmd_obj fail!!!\n"));
 		goto exit;
 	}
 	/* for IEs is fix buf size */
-- 
1.8.3.4



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/4] Staging: rtl8188eu: rtw_efuse: Do not print message if kzalloc() failed.
  2016-03-01  9:07 [PATCH 0/4] Staging: Do not print message if kzalloc() failed Sandhya Bankar
  2016-03-01  9:09 ` [PATCH 1/4] Staging: lustre: " Sandhya Bankar
  2016-03-01  9:12 ` [PATCH 2/4] Staging: rtl8188eu: " Sandhya Bankar
@ 2016-03-01  9:14 ` Sandhya Bankar
  2016-03-01 17:15   ` [Outreachy kernel] " Julia Lawall
  2016-03-01  9:15 ` [PATCH 4/4] Staging: wlan-ng: " Sandhya Bankar
  3 siblings, 1 reply; 7+ messages in thread
From: Sandhya Bankar @ 2016-03-01  9:14 UTC (permalink / raw)
  To: outreachy-kernel

Do not print message if kzalloc() failed.
kzalloc() has its own messages. So no need to add extra one.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
---
 drivers/staging/rtl8188eu/core/rtw_efuse.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efuse.c
index fd8cf47..34d789c 100644
--- a/drivers/staging/rtl8188eu/core/rtw_efuse.c
+++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c
@@ -104,8 +104,7 @@ efuse_phymap_to_logical(u8 *phymap, u16 _offset, u16 _size_byte, u8  *pbuf)
 	u8 u1temp = 0;
 
 	efuseTbl = kzalloc(EFUSE_MAP_LEN_88E, GFP_KERNEL);
-	if (efuseTbl == NULL) {
-		DBG_88E("%s: alloc efuseTbl fail!\n", __func__);
+	if (!efuseTbl) {
 		return;
 	}
 
-- 
1.8.3.4



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/4] Staging: wlan-ng: Do not print message if kzalloc() failed.
  2016-03-01  9:07 [PATCH 0/4] Staging: Do not print message if kzalloc() failed Sandhya Bankar
                   ` (2 preceding siblings ...)
  2016-03-01  9:14 ` [PATCH 3/4] Staging: rtl8188eu: rtw_efuse: " Sandhya Bankar
@ 2016-03-01  9:15 ` Sandhya Bankar
  3 siblings, 0 replies; 7+ messages in thread
From: Sandhya Bankar @ 2016-03-01  9:15 UTC (permalink / raw)
  To: outreachy-kernel

Do not print message if kzalloc() failed.
kzalloc() has its own messages. So no need to add extra one.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
---
 drivers/staging/wlan-ng/prism2sta.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c
index 131223a..e245732 100644
--- a/drivers/staging/wlan-ng/prism2sta.c
+++ b/drivers/staging/wlan-ng/prism2sta.c
@@ -1886,7 +1886,6 @@ static wlandevice_t *create_wlan(void)
 	hw = kzalloc(sizeof(hfa384x_t), GFP_KERNEL);
 
 	if (!wlandev || !hw) {
-		pr_err("%s: Memory allocation failure.\n", dev_info);
 		kfree(wlandev);
 		kfree(hw);
 		return NULL;
-- 
1.8.3.4



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [Outreachy kernel] [PATCH 3/4] Staging: rtl8188eu: rtw_efuse: Do not print message if kzalloc() failed.
  2016-03-01  9:14 ` [PATCH 3/4] Staging: rtl8188eu: rtw_efuse: " Sandhya Bankar
@ 2016-03-01 17:15   ` Julia Lawall
  0 siblings, 0 replies; 7+ messages in thread
From: Julia Lawall @ 2016-03-01 17:15 UTC (permalink / raw)
  To: Sandhya Bankar; +Cc: outreachy-kernel



On Tue, 1 Mar 2016, Sandhya Bankar wrote:

> Do not print message if kzalloc() failed.
> kzalloc() has its own messages. So no need to add extra one.
>
> Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
> ---
>  drivers/staging/rtl8188eu/core/rtw_efuse.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efuse.c
> index fd8cf47..34d789c 100644
> --- a/drivers/staging/rtl8188eu/core/rtw_efuse.c
> +++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c
> @@ -104,8 +104,7 @@ efuse_phymap_to_logical(u8 *phymap, u16 _offset, u16 _size_byte, u8  *pbuf)
>  	u8 u1temp = 0;
>
>  	efuseTbl = kzalloc(EFUSE_MAP_LEN_88E, GFP_KERNEL);
> -	if (efuseTbl == NULL) {
> -		DBG_88E("%s: alloc efuseTbl fail!\n", __func__);
> +	if (!efuseTbl) {
>  		return;
>  	}

Now there is only one statement in the branch and the braces are not
needed.

julia


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Outreachy kernel] [PATCH 1/4] Staging: lustre: Do not print message if kzalloc() failed.
  2016-03-01  9:09 ` [PATCH 1/4] Staging: lustre: " Sandhya Bankar
@ 2016-03-01 17:16   ` Julia Lawall
  0 siblings, 0 replies; 7+ messages in thread
From: Julia Lawall @ 2016-03-01 17:16 UTC (permalink / raw)
  To: Sandhya Bankar; +Cc: outreachy-kernel

On Tue, 1 Mar 2016, Sandhya Bankar wrote:

> Do not print message if kzalloc() failed.
> kzalloc() has its own messages. So no need to add extra one.
>
> Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
> ---
>  drivers/staging/lustre/lustre/llite/llite_lib.c | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c
> index 1f3e8e8..c7b0729 100644
> --- a/drivers/staging/lustre/lustre/llite/llite_lib.c
> +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c
> @@ -1938,10 +1938,6 @@ void ll_open_cleanup(struct super_block *sb, struct ptlrpc_request *open_req)
>  	body = req_capsule_server_get(&open_req->rq_pill, &RMF_MDT_BODY);
>  	op_data = kzalloc(sizeof(*op_data), GFP_NOFS);
>  	if (!op_data) {
> -		CWARN("%s: cannot allocate op_data to release open handle for "
> -		      DFID "\n",
> -		      ll_get_fsname(sb, NULL, 0), PFID(&body->fid1));
> -
>  		return;

Same problem.

julia

>  	}
>
> --
> 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 outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/a9225769650e278d513f73c69521c9a52d20808f.1456822984.git.bankarsandhya512%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-03-01 17:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-01  9:07 [PATCH 0/4] Staging: Do not print message if kzalloc() failed Sandhya Bankar
2016-03-01  9:09 ` [PATCH 1/4] Staging: lustre: " Sandhya Bankar
2016-03-01 17:16   ` [Outreachy kernel] " Julia Lawall
2016-03-01  9:12 ` [PATCH 2/4] Staging: rtl8188eu: " Sandhya Bankar
2016-03-01  9:14 ` [PATCH 3/4] Staging: rtl8188eu: rtw_efuse: " Sandhya Bankar
2016-03-01 17:15   ` [Outreachy kernel] " Julia Lawall
2016-03-01  9:15 ` [PATCH 4/4] Staging: wlan-ng: " Sandhya Bankar

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.