From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756171AbbBJNnj (ORCPT ); Tue, 10 Feb 2015 08:43:39 -0500 Received: from mail-pa0-f51.google.com ([209.85.220.51]:41451 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752038AbbBJNnh (ORCPT ); Tue, 10 Feb 2015 08:43:37 -0500 Date: Tue, 10 Feb 2015 19:13:27 +0530 From: Sudip Mukherjee To: Quentin Lambert Cc: Benjamin Romer , David Kershner , Greg Kroah-Hartman , 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 Message-ID: <20150210134327.GA15535@sudip-PC> References: <20150210130214.GA18429@sloth> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150210130214.GA18429@sloth> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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; > 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/