Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1646957 > unrolled thread

[PATCH 1/3] RDS: IB: Delete an error message for a failed memory allocation in rds_ib_add_one()

Started bySF Markus Elfring <elfring@users.sourceforge.net>
First post2017-05-22 16:20 +0200
Last post2017-05-22 21:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 1/3] RDS: IB: Delete an error message for a failed memory  allocation in rds_ib_add_one() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-22 16:20 +0200
    Re: [PATCH 1/3] RDS: IB: Delete an error message for a failed memory  allocation in rds_ib_add_one() Santosh Shilimkar <santosh.shilimkar@oracle.com> - 2017-05-22 21:30 +0200

#1646957 — [PATCH 1/3] RDS: IB: Delete an error message for a failed memory allocation in rds_ib_add_one()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2017-05-22 16:20 +0200
Subject[PATCH 1/3] RDS: IB: Delete an error message for a failed memory allocation in rds_ib_add_one()
Message-ID<tJWlI-6KH-7@gated-at.bofh.it>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 22 May 2017 15:34:28 +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>
---
 net/rds/ib.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/net/rds/ib.c b/net/rds/ib.c
index 7a64c8db81ab..c5514d058171 100644
--- a/net/rds/ib.c
+++ b/net/rds/ib.c
@@ -166,8 +166,5 @@ static void rds_ib_add_one(struct ib_device *device)
-	if (!rds_ibdev->vector_load) {
-		pr_err("RDS/IB: %s failed to allocate vector memory\n",
-			__func__);
+	if (!rds_ibdev->vector_load)
 		goto put_dev;
-	}
 
 	rds_ibdev->dev = device;
 	rds_ibdev->pd = ib_alloc_pd(device, 0);
-- 
2.13.0

[toc] | [next] | [standalone]


#1647290

FromSantosh Shilimkar <santosh.shilimkar@oracle.com>
Date2017-05-22 21:30 +0200
Message-ID<tK1bI-1hH-11@gated-at.bofh.it>
In reply to#1646957
On 5/22/2017 7:11 AM, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Mon, 22 May 2017 15:34:28 +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>
> ---
>   net/rds/ib.c | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/net/rds/ib.c b/net/rds/ib.c
> index 7a64c8db81ab..c5514d058171 100644
> --- a/net/rds/ib.c
> +++ b/net/rds/ib.c
> @@ -166,8 +166,5 @@ static void rds_ib_add_one(struct ib_device *device)
> -	if (!rds_ibdev->vector_load) {
> -		pr_err("RDS/IB: %s failed to allocate vector memory\n",
> -			__func__);
> +	if (!rds_ibdev->vector_load)
>   		goto put_dev;
> -	}
>   
Well the ENOMEM is not carried here so the message was usefu
but its not critical so its fine to clean that up.

Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web