public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Quentin Lambert <lambert.quentin@gmail.com>
Cc: Shigekatsu Tateno <shigekatsu.tateno@atmel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/1] staging: ozwpan: Remove allocation from delaration line
Date: Tue, 10 Feb 2015 13:13:12 +0300	[thread overview]
Message-ID: <20150210101312.GG5206@mwanda> (raw)
In-Reply-To: <20150210092412.GA12753@sloth>

Looks good.  Thanks!

> diff --git a/drivers/staging/ozwpan/ozhcd.c b/drivers/staging/ozwpan/ozhcd.c
> index 8543bb2..96e95bf 100644
> --- a/drivers/staging/ozwpan/ozhcd.c
> +++ b/drivers/staging/ozwpan/ozhcd.c
> @@ -280,8 +280,9 @@ static void oz_free_urb_link(struct oz_urb_link *urbl)
>   */
>  static struct oz_endpoint *oz_ep_alloc(int buffer_size, gfp_t mem_flags)
>  {
> -	struct oz_endpoint *ep =
> -		kzalloc(sizeof(struct oz_endpoint)+buffer_size, mem_flags);
> +	struct oz_endpoint *ep;
> +
> +	ep = kzalloc(sizeof(struct oz_endpoint)+buffer_size, mem_flags);
>  	if (ep) {

Also notice how in the original code, we had to mangle the code to make
it fit into 80 characters so the new code looks much better.

regards,
dan
carpenter


  reply	other threads:[~2015-02-10 10:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-10  9:24 [PATCH v2 1/1] staging: ozwpan: Remove allocation from delaration line Quentin Lambert
2015-02-10 10:13 ` Dan Carpenter [this message]
2015-02-10 14:41   ` Joe Perches

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=20150210101312.GG5206@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lambert.quentin@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shigekatsu.tateno@atmel.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