mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Doug Ledford <dledford@redhat.com>
To: "Marciniszyn, Mike" <mike.marciniszyn@intel.com>,
	SF Markus Elfring <elfring@users.sourceforge.net>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	Hal Rosenstock <hal.rosenstock@gmail.com>,
	"Hefty, Sean" <sean.hefty@intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	"kernel-janitors@vger.kernel.org"
	<kernel-janitors@vger.kernel.org>,
	Julia Lawall <julia.lawall@lip6.fr>
Subject: Re: [PATCH] IB/qib: Use memdup_user() rather than duplicating its implementation
Date: Tue, 23 Aug 2016 12:43:13 -0400	[thread overview]
Message-ID: <d82d2d5a-34b9-27c1-f24e-5bc0a841d47d@redhat.com> (raw)
In-Reply-To: <32E1700B9017364D9B60AED9960492BC2D0AF815@fmsmsx120.amr.corp.intel.com>


[-- Attachment #1.1: Type: text/plain, Size: 699 bytes --]

On 8/19/2016 11:27 AM, Marciniszyn, Mike wrote:
>> 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
> 

With Mike's additional cleanups in place, patch applied.

-- 
Doug Ledford <dledford@redhat.com>
    GPG Key ID: 0E572FDD


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]

  parent reply	other threads:[~2016-08-23 16:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-19  7:06 SF Markus Elfring
2016-08-19 15:27 ` Marciniszyn, Mike
2016-08-19 15:41   ` Leon Romanovsky
2016-08-19 15:42     ` Marciniszyn, Mike
2016-08-19 15:45       ` Leon Romanovsky
2016-08-23 16:43   ` Doug Ledford [this message]
2016-08-19 15:37 ` Leon Romanovsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d82d2d5a-34b9-27c1-f24e-5bc0a841d47d@redhat.com \
    --to=dledford@redhat.com \
    --cc=elfring@users.sourceforge.net \
    --cc=hal.rosenstock@gmail.com \
    --cc=julia.lawall@lip6.fr \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mike.marciniszyn@intel.com \
    --cc=sean.hefty@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®