kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Quentin Lambert <lambert.quentin@gmail.com>
Cc: Benjamin Romer <benjamin.romer@unisys.com>,
	David Kershner <david.kershner@unisys.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	kernel-janitors@vger.kernel.org, sparmaintainer@unisys.com,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] staging: unisys: Remove allocation from declaration line
Date: Tue, 10 Feb 2015 13:55:27 +0000	[thread overview]
Message-ID: <20150210134327.GA15535@sudip-PC> (raw)
In-Reply-To: <20150210130214.GA18429@sloth>

On Tue, Feb 10, 2015 at 02:02:14PM +0100, Quentin Lambert wrote:
> This patch removes allocation from declaration line because
> people are known to gloss over declarations.
> 
> Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
> ---
>  drivers/staging/unisys/visorchipset/visorchipset_main.c | 6 +++---
>  drivers/staging/unisys/visorutil/charqueue.c            | 3 ++-
>  drivers/staging/unisys/visorutil/memregion_direct.c     | 5 +++--
>  3 files changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c
> index 82e259d..a6c6bb7 100644
> --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c
> +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c
> @@ -1604,9 +1604,9 @@ parahotplug_next_expiration(void)
>  static struct parahotplug_request *
>  parahotplug_request_create(struct controlvm_message *msg)
>  {
> -	struct parahotplug_request *req > -	    kmalloc(sizeof(struct parahotplug_request),
> -		    GFP_KERNEL|__GFP_NORETRY);
> +	struct parahotplug_request *req;
> +
> +	req = kmalloc(sizeof(struct parahotplug_request), GFP_KERNEL|__GFP_NORETRY);
if you make it as:
	req = kmalloc(sizeof(*req), GFP_KERNEL|__GFP_NORETRY);
then this will not give you checkpatch warning of line over 80 char.

regards
sudip

>  	if (req = NULL)
>  		return NULL;
<snip>	
>  		return NULL;
> -- 
> 1.9.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

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

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-10 13:02 [PATCH 1/1] staging: unisys: Remove allocation from declaration line Quentin Lambert
2015-02-10 13:55 ` Sudip Mukherjee [this message]
2015-02-10 22:26 ` Greg Kroah-Hartman
2015-02-11 10:23   ` Dan Carpenter
2015-02-12 12:22     ` Quentin Lambert

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=20150210134327.GA15535@sudip-PC \
    --to=sudipm.mukherjee@gmail.com \
    --cc=benjamin.romer@unisys.com \
    --cc=david.kershner@unisys.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=sparmaintainer@unisys.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;
as well as URLs for NNTP newsgroup(s).