From mboxrd@z Thu Jan 1 00:00:00 1970 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Subject: Re: [PATCH 4/8] input: Remove OOM message after input_allocate_device Date: Thu, 24 Oct 2013 20:46:12 +0200 Message-ID: <20131024184612.GC3512@pengutronix.de> References: <20131024182611.GA3512@pengutronix.de> <1382640218.22433.71.camel@joe-AO722> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Content-Disposition: inline In-Reply-To: <1382640218.22433.71.camel@joe-AO722> Sender: linux-kernel-owner@vger.kernel.org To: Joe Perches Cc: Kukjin Kim , Ferruh Yigit , Wan ZongShun , Andrey Moiseev , Dmitry Torokhov , linux-kernel@vger.kernel.org, Josh Wu , linux-samsung-soc@vger.kernel.org, Henrik Rydberg , Ben Dooks , linux-input@vger.kernel.org, Pau Oliva Fora , linux-arm-kernel@lists.infradead.org List-Id: linux-input@vger.kernel.org On Thu, Oct 24, 2013 at 11:43:38AM -0700, Joe Perches wrote: > On Thu, 2013-10-24 at 20:26 +0200, Uwe Kleine-K=F6nig wrote: > > Hello Joe, > >=20 > > On Wed, Oct 23, 2013 at 12:14:50PM -0700, Joe Perches wrote: > > > Emitting an OOM message isn't necessary after input_allocate_devi= ce > > > as there's a generic OOM and a dump_stack already done. > > >=20 > > > [...] > > > Signed-off-by: Joe Perches > > > diff --git a/drivers/input/joystick/as5011.c b/drivers/input/joys= tick/as5011.c > > > index 005d852..3b9c709 100644 > > > --- a/drivers/input/joystick/as5011.c > > > +++ b/drivers/input/joystick/as5011.c > > > @@ -254,8 +254,6 @@ static int as5011_probe(struct i2c_client *cl= ient, > > > as5011 =3D kmalloc(sizeof(struct as5011_device), GFP_KERNEL); > > > input_dev =3D input_allocate_device(); > > > if (!as5011 || !input_dev) { > > > - dev_err(&client->dev, > > > - "Can't allocate memory for device structure\n"); > > Don't know if that can happen, but if as5011 is NULL but input_dev = isn't > > the message would still be sensible, wouldn't it? There are several= more > > that suffer the same "problem". >=20 > Any k.alloc without __GFP_NOWARN does a generic OOM message > and a dump_stack() so there could already be 2 messages anyway. Then mention that in the commit log if you still want this patch?! Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig = | Industrial Linux Solutions | http://www.pengutronix.de/= |