Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752418AbdLFVS5 (ORCPT ); Wed, 6 Dec 2017 16:18:57 -0500 Received: from iolanthe.rowland.org ([192.131.102.54]:58196 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752132AbdLFVSy (ORCPT ); Wed, 6 Dec 2017 16:18:54 -0500 Date: Wed, 6 Dec 2017 16:18:53 -0500 (EST) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Joe Perches cc: SF Markus Elfring , , Daniel Drake , Dmitry Fleytman , Eugene Korenevsky , Geert Uytterhoeven , Greg Kroah-Hartman , =?ISO-8859-1?Q?G=FCnter_R=F6ck?= , Johan Hovold , Mathias Nyman , Peter Chen , LKML , Subject: Re: [PATCH] USB: hub: Delete an error message for a failed memory allocation in usb_hub_clear_tt_buffer() In-Reply-To: <1512590706.960.25.camel@perches.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1130 Lines: 31 On Wed, 6 Dec 2017, Joe Perches wrote: > On Wed, 2017-12-06 at 11:45 -0500, Alan Stern wrote: > > On Wed, 6 Dec 2017, SF Markus Elfring wrote: > > > Omit an extra message for a memory allocation failure in this function. > > Markus' typical terrible commit message. > > > > diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c > [] > > > @@ -829,7 +829,6 @@ int usb_hub_clear_tt_buffer(struct urb *urb) > > > */ > > > clear = kmalloc(sizeof *clear, GFP_ATOMIC); > > > if (clear == NULL) { > > > - dev_err(&udev->dev, "can't save CLEAR_TT_BUFFER state\n"); > > > /* FIXME recover somehow ... RESET_TT? */ > > > return -ENOMEM; > > > } > > > > Does the existing memory allocation error message include the > > &udev->dev device name and driver name? If it doesn't, there will be > > no way for the user to tell that the error message is related to the > > device failure. > > No, but the effect is similar. > > OOM does a dump_stack() so this function's call tree is shown. A call stack doesn't tell you which device was being handled. Alan Stern