linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] net: atm: Replace kmalloc with kzalloc in the error message
@ 2020-05-29 17:54 Markus Elfring
  0 siblings, 0 replies; 3+ messages in thread
From: Markus Elfring @ 2020-05-29 17:54 UTC (permalink / raw)
  To: Andy Shevchenko, Liao Pingfang, netdev
  Cc: linux-kernel, kernel-janitors, Cong Wang, David S. Miller,
	Heiner Kallweit, Jakub Kicinski, Michael S. Tsirkin,
	Shannon Nelson, Wang Liang, Yi Wang, Xue Zhihong

> Looking into the context (atomic!) and error message itself I would rather drop
> message completely.

How do you think about to take another look at a previous update suggestion
like the following?

net/atm: Delete an error message for a failed memory allocation in five functions
https://patchwork.ozlabs.org/project/netdev/patch/5270f15b-5e97-0c3e-3e55-fbded48ae07d@users.sourceforge.net/
https://lore.kernel.org/lkml/5270f15b-5e97-0c3e-3e55-fbded48ae07d@users.sourceforge.net/
https://lore.kernel.org/patchwork/patch/838867/
https://lkml.org/lkml/2017/10/9/1009

Regards,
Markus

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

* Re: [PATCH] net: atm: Replace kmalloc with kzalloc in the error message
  2020-05-29  1:01 Yi Wang
@ 2020-05-29  9:22 ` Andy Shevchenko
  0 siblings, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2020-05-29  9:22 UTC (permalink / raw)
  To: Yi Wang
  Cc: davem, kuba, mst, hkallweit1, snelson, xiyou.wangcong, netdev,
	linux-kernel, xue.zhihong, wang.liang82, Liao Pingfang

On Fri, May 29, 2020 at 09:01:42AM +0800, Yi Wang wrote:
> From: Liao Pingfang <liao.pingfang@zte.com.cn>
> 
> Use kzalloc instead of kmalloc in the error message according to
> the previous kzalloc() call.

Looking into the context (atomic!) and error message itself I would rather drop
message completely.

> Signed-off-by: Liao Pingfang <liao.pingfang@zte.com.cn>
> ---
>  net/atm/lec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/atm/lec.c b/net/atm/lec.c
> index ca37f5a..33033d7 100644
> --- a/net/atm/lec.c
> +++ b/net/atm/lec.c
> @@ -1537,7 +1537,7 @@ static struct lec_arp_table *make_entry(struct lec_priv *priv,
>  
>  	to_return = kzalloc(sizeof(struct lec_arp_table), GFP_ATOMIC);
>  	if (!to_return) {
> -		pr_info("LEC: Arp entry kmalloc failed\n");
> +		pr_info("LEC: Arp entry kzalloc failed\n");
>  		return NULL;
>  	}
>  	ether_addr_copy(to_return->mac_addr, mac_addr);
> -- 
> 2.9.5
> 

-- 
With Best Regards,
Andy Shevchenko



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

* [PATCH] net: atm: Replace kmalloc with kzalloc in the error message
@ 2020-05-29  1:01 Yi Wang
  2020-05-29  9:22 ` Andy Shevchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Yi Wang @ 2020-05-29  1:01 UTC (permalink / raw)
  To: davem
  Cc: kuba, mst, hkallweit1, snelson, andriy.shevchenko,
	xiyou.wangcong, netdev, linux-kernel, xue.zhihong, wang.yi59,
	wang.liang82, Liao Pingfang

From: Liao Pingfang <liao.pingfang@zte.com.cn>

Use kzalloc instead of kmalloc in the error message according to
the previous kzalloc() call.

Signed-off-by: Liao Pingfang <liao.pingfang@zte.com.cn>
---
 net/atm/lec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/atm/lec.c b/net/atm/lec.c
index ca37f5a..33033d7 100644
--- a/net/atm/lec.c
+++ b/net/atm/lec.c
@@ -1537,7 +1537,7 @@ static struct lec_arp_table *make_entry(struct lec_priv *priv,
 
 	to_return = kzalloc(sizeof(struct lec_arp_table), GFP_ATOMIC);
 	if (!to_return) {
-		pr_info("LEC: Arp entry kmalloc failed\n");
+		pr_info("LEC: Arp entry kzalloc failed\n");
 		return NULL;
 	}
 	ether_addr_copy(to_return->mac_addr, mac_addr);
-- 
2.9.5


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

end of thread, other threads:[~2020-05-29 17:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-29 17:54 [PATCH] net: atm: Replace kmalloc with kzalloc in the error message Markus Elfring
  -- strict thread matches above, loose matches on Subject: below --
2020-05-29  1:01 Yi Wang
2020-05-29  9:22 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).