[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <32536396-F7DC-4BE8-A932-7B8C4051BC71@mellanox.com>
Date: Sun, 19 Feb 2017 19:48:40 +0000
From: Majd Dibbiny <majd@...lanox.com>
To: SF Markus Elfring <elfring@...rs.sourceforge.net>
CC: "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
Doug Ledford <dledford@...hat.com>,
Hal Rosenstock <hal.rosenstock@...il.com>,
"Leon Romanovsky" <leonro@...lanox.com>,
Matan Barak <matanb@...lanox.com>,
"Sean Hefty" <sean.hefty@...el.com>,
Yishai Hadas <yishaih@...lanox.com>,
LKML <linux-kernel@...r.kernel.org>,
"kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
Wolfram Sang <wsa@...-dreams.de>
Subject: Re: [PATCH 20/29] IB/mlx4: Delete an error message for a failed
memory allocation in mlx4_ib_add()
> On Feb 18, 2017, at 11:10 PM, SF Markus Elfring <elfring@...rs.sourceforge.net> wrote:
>
> From: Markus Elfring <elfring@...rs.sourceforge.net>
> Date: Sat, 18 Feb 2017 16:15:20 +0100
>
> Omit an extra message for a memory allocation failure in this function.
>
> Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
> Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
> ---
> drivers/infiniband/hw/mlx4/main.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c
> index 21b88d5ceda4..33b46c463ffa 100644
> --- a/drivers/infiniband/hw/mlx4/main.c
> +++ b/drivers/infiniband/hw/mlx4/main.c
> @@ -2623,11 +2623,8 @@ static void *mlx4_ib_add(struct mlx4_dev *dev)
> return NULL;
>
> ibdev = (struct mlx4_ib_dev *) ib_alloc_device(sizeof(*ibdev));
> - if (!ibdev) {
> - dev_err(&dev->persist->pdev->dev,
> - "Device struct alloc failed\n");
> + if (!ibdev)
> return NULL;
> - }
Not a big fan of this change.
9 out of the 15 drivers have this print in case of a failure..
>
> iboe = &ibdev->iboe;
>
> --
> 2.11.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists