Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752647AbdLFUFV (ORCPT ); Wed, 6 Dec 2017 15:05:21 -0500 Received: from smtprelay0176.hostedemail.com ([216.40.44.176]:40095 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752601AbdLFUFL (ORCPT ); Wed, 6 Dec 2017 15:05:11 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:973:981:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2693:2828:2899:3138:3139:3140:3141:3142:3352:3622:3865:3867:3868:3870:3871:3872:3874:4321:4605:5007:6742:7974:8660:10004:10400:10471:10848:11026:11232:11473:11658:11914:12043:12114:12438:12740:12760:12895:13069:13095:13148:13230:13255:13311:13357:13439:14659:14721:21080:21212:21433:21627:30029:30045:30051:30054:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: sheet18_66fce31ffb513 X-Filterd-Recvd-Size: 2298 Message-ID: <1512590706.960.25.camel@perches.com> Subject: Re: [PATCH] USB: hub: Delete an error message for a failed memory allocation in usb_hub_clear_tt_buffer() From: Joe Perches To: Alan Stern , SF Markus Elfring Cc: linux-usb@vger.kernel.org, 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 , kernel-janitors@vger.kernel.org Date: Wed, 06 Dec 2017 12:05:06 -0800 In-Reply-To: References: Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.26.1-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 965 Lines: 25 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.