* [PATCH] IB/usnic: Delete an error message for a failed memory allocation in usnic_transport_init()
@ 2018-01-27 19:15 SF Markus Elfring
2018-02-28 21:13 ` Jason Gunthorpe
0 siblings, 1 reply; 3+ messages in thread
From: SF Markus Elfring @ 2018-01-27 19:15 UTC (permalink / raw)
To: linux-rdma, Christian Benvenuti, Dave Goodell, Doug Ledford,
Jason Gunthorpe, Roland Dreier, Upinder Malhi
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 27 Jan 2018 20:06:59 +0100
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/infiniband/hw/usnic/usnic_transport.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/infiniband/hw/usnic/usnic_transport.c b/drivers/infiniband/hw/usnic/usnic_transport.c
index de318389a301..2e9bba52a686 100644
--- a/drivers/infiniband/hw/usnic/usnic_transport.c
+++ b/drivers/infiniband/hw/usnic/usnic_transport.c
@@ -201,10 +201,8 @@ int usnic_transport_sock_get_addr(struct socket *sock, int *proto,
int usnic_transport_init(void)
{
roce_bitmap = kzalloc(ROCE_BITMAP_SZ, GFP_KERNEL);
- if (!roce_bitmap) {
- usnic_err("Failed to allocate bit map");
+ if (!roce_bitmap)
return -ENOMEM;
- }
/* Do not ever allocate bit 0, hence set it here */
bitmap_set(roce_bitmap, 0, 1);
--
2.16.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] IB/usnic: Delete an error message for a failed memory allocation in usnic_transport_init()
2018-01-27 19:15 [PATCH] IB/usnic: Delete an error message for a failed memory allocation in usnic_transport_init() SF Markus Elfring
@ 2018-02-28 21:13 ` Jason Gunthorpe
0 siblings, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2018-02-28 21:13 UTC (permalink / raw)
To: SF Markus Elfring
Cc: linux-rdma, Christian Benvenuti, Dave Goodell, Doug Ledford,
Roland Dreier, Upinder Malhi, LKML, kernel-janitors
On Sat, Jan 27, 2018 at 08:15:17PM +0100, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sat, 27 Jan 2018 20:06:59 +0100
>
> Omit an extra message for a memory allocation failure in this function.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> drivers/infiniband/hw/usnic/usnic_transport.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
Applied to for-next
Jason
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] IB/usnic: Delete an error message for a failed memory allocation in usnic_transport_init()
@ 2017-05-12 20:00 SF Markus Elfring
0 siblings, 0 replies; 3+ messages in thread
From: SF Markus Elfring @ 2017-05-12 20:00 UTC (permalink / raw)
To: linux-rdma, Christian Benvenuti, Dave Goodell, Doug Ledford,
Hal Rosenstock, Sean Hefty
Cc: LKML, kernel-janitors, Wolfram Sang
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 12 May 2017 21:53:51 +0200
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/infiniband/hw/usnic/usnic_transport.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/infiniband/hw/usnic/usnic_transport.c b/drivers/infiniband/hw/usnic/usnic_transport.c
index de318389a301..2e9bba52a686 100644
--- a/drivers/infiniband/hw/usnic/usnic_transport.c
+++ b/drivers/infiniband/hw/usnic/usnic_transport.c
@@ -201,10 +201,8 @@ int usnic_transport_sock_get_addr(struct socket *sock, int *proto,
int usnic_transport_init(void)
{
roce_bitmap = kzalloc(ROCE_BITMAP_SZ, GFP_KERNEL);
- if (!roce_bitmap) {
- usnic_err("Failed to allocate bit map");
+ if (!roce_bitmap)
return -ENOMEM;
- }
/* Do not ever allocate bit 0, hence set it here */
bitmap_set(roce_bitmap, 0, 1);
--
2.12.3
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-02-28 21:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-27 19:15 [PATCH] IB/usnic: Delete an error message for a failed memory allocation in usnic_transport_init() SF Markus Elfring
2018-02-28 21:13 ` Jason Gunthorpe
-- strict thread matches above, loose matches on Subject: below --
2017-05-12 20:00 SF Markus Elfring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome