[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <32E1700B9017364D9B60AED9960492BC2D0AF815@fmsmsx120.amr.corp.intel.com>
Date: Fri, 19 Aug 2016 15:27:20 +0000
From: "Marciniszyn, Mike" <mike.marciniszyn@...el.com>
To: SF Markus Elfring <elfring@...rs.sourceforge.net>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
Doug Ledford <dledford@...hat.com>,
Hal Rosenstock <hal.rosenstock@...il.com>,
"Hefty, Sean" <sean.hefty@...el.com>
CC: LKML <linux-kernel@...r.kernel.org>,
"kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
Julia Lawall <julia.lawall@...6.fr>
Subject: RE: [PATCH] IB/qib: Use memdup_user() rather than duplicating its
implementation
> Subject: [PATCH] IB/qib: Use memdup_user() rather than duplicating its
> diff --git a/drivers/infiniband/hw/qib/qib_fs.c
I would be even more aggressive at reducing lines of code.
For example do direct returns when ok to do:
if (pos != 0 || count != sizeof(struct qib_flash))
return -EINVAL;
tmp = memdup_user(buf, count);
if (IS_ERR(tmp))
return PTR_ERR(tmp);
The bail_tmp: label is then not needed.
Mike
Powered by blists - more mailing lists