From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753123AbdLGQVP (ORCPT ); Thu, 7 Dec 2017 11:21:15 -0500 Received: from smtprelay0220.hostedemail.com ([216.40.44.220]:55972 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752498AbdLGQVB (ORCPT ); Thu, 7 Dec 2017 11:21:01 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:968:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1539:1593:1594:1711:1714:1730:1747:1777:1792:1981:2194:2199:2393:2559:2562:2828:2899:2910:3138:3139:3140:3141:3142:3351:3622:3865:3866:3867:3868:3871:3872:3874:4321:5007:6742:10004:10400:10848:11232:11658:11914:12114:12740:12760:12895:13069:13160:13229:13255:13311:13357:13439:14659:14721:21080:21212:21433:21627:30012:30054: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:2,LUA_SUMMARY:none X-HE-Tag: foot07_5f823a896da38 X-Filterd-Recvd-Size: 1987 Message-ID: <1512663652.960.41.camel@perches.com> Subject: Re: USB: hub: Delete an error message for a failed memory allocation in usb_hub_clear_tt_buffer() From: Joe Perches To: Alan Stern , Geert Uytterhoeven Cc: SF Markus Elfring , USB list , Daniel Drake , Dmitry Fleytman , Eugene Korenevsky , Greg Kroah-Hartman , =?ISO-8859-1?Q?G=FCnter_R=F6ck?= , Johan Hovold , Mathias Nyman , Peter Chen , LKML , "kernel-janitors@vger.kernel.org" Date: Thu, 07 Dec 2017 08:20:52 -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 On Thu, 2017-12-07 at 10:12 -0500, Alan Stern wrote: > The real problem is that the kernel development community doesn't have > a fixed policy on how to handle memory allocation errors. [] > If there was one agreed-upon policy, then we could definitively point > to old code and say "That's wrong, and here is how it should be fixed." > But currently this is not possible, and we end up with repetitive > discussions like this one that aren't of general use. Well stated. My preferred policy would be to remove all the individual allocation failure messages and only use the generic warn_alloc()/dump_stack() mechanism. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Perches Date: Thu, 07 Dec 2017 16:20:52 +0000 Subject: Re: USB: hub: Delete an error message for a failed memory allocation in usb_hub_clear_tt_buffer() Message-Id: <1512663652.960.41.camel@perches.com> List-Id: References: <97b0eeb8-834e-61ca-01dd-afbbf18697db@users.sourceforge.net> In-Reply-To: <97b0eeb8-834e-61ca-01dd-afbbf18697db@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Alan Stern , Geert Uytterhoeven Cc: SF Markus Elfring , USB list , Daniel Drake , Dmitry Fleytman , Eugene Korenevsky , Greg Kroah-Hartman , =?ISO-8859-1?Q?G=FCnter_R=F6ck?= , Johan Hovold , Mathias Nyman , Peter Chen , LKML , "kernel-janitors@vger.kernel.org" On Thu, 2017-12-07 at 10:12 -0500, Alan Stern wrote: > The real problem is that the kernel development community doesn't have > a fixed policy on how to handle memory allocation errors. [] > If there was one agreed-upon policy, then we could definitively point > to old code and say "That's wrong, and here is how it should be fixed." > But currently this is not possible, and we end up with repetitive > discussions like this one that aren't of general use. Well stated. My preferred policy would be to remove all the individual allocation failure messages and only use the generic warn_alloc()/dump_stack() mechanism. From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Subject: USB: hub: Delete an error message for a failed memory allocation in usb_hub_clear_tt_buffer() From: Joe Perches Message-Id: <1512663652.960.41.camel@perches.com> Date: Thu, 07 Dec 2017 08:20:52 -0800 To: Alan Stern , Geert Uytterhoeven Cc: SF Markus Elfring , USB list , Daniel Drake , Dmitry Fleytman , Eugene Korenevsky , Greg Kroah-Hartman , =?ISO-8859-1?Q?G=FCnter_R=F6ck?= , Johan Hovold , Mathias Nyman , Peter Chen , LKML , "kernel-janitors@vger.kernel.org" List-ID: T24gVGh1LCAyMDE3LTEyLTA3IGF0IDEwOjEyIC0wNTAwLCBBbGFuIFN0ZXJuIHdyb3RlOgo+IFRo ZSByZWFsIHByb2JsZW0gaXMgdGhhdCB0aGUga2VybmVsIGRldmVsb3BtZW50IGNvbW11bml0eSBk b2Vzbid0IGhhdmUKPiBhIGZpeGVkIHBvbGljeSBvbiBob3cgdG8gaGFuZGxlIG1lbW9yeSBhbGxv Y2F0aW9uIGVycm9ycy4KW10KPiBJZiB0aGVyZSB3YXMgb25lIGFncmVlZC11cG9uIHBvbGljeSwg dGhlbiB3ZSBjb3VsZCBkZWZpbml0aXZlbHkgcG9pbnQgCj4gdG8gb2xkIGNvZGUgYW5kIHNheSAi VGhhdCdzIHdyb25nLCBhbmQgaGVyZSBpcyBob3cgaXQgc2hvdWxkIGJlIGZpeGVkLiIgIAo+IEJ1 dCBjdXJyZW50bHkgdGhpcyBpcyBub3QgcG9zc2libGUsIGFuZCB3ZSBlbmQgdXAgd2l0aCByZXBl dGl0aXZlIAo+IGRpc2N1c3Npb25zIGxpa2UgdGhpcyBvbmUgdGhhdCBhcmVuJ3Qgb2YgZ2VuZXJh bCB1c2UuCgpXZWxsIHN0YXRlZC4KCk15IHByZWZlcnJlZCBwb2xpY3kgd291bGQgYmUgdG8gcmVt b3ZlIGFsbCB0aGUgaW5kaXZpZHVhbAphbGxvY2F0aW9uIGZhaWx1cmUgbWVzc2FnZXMgYW5kIG9u bHkgdXNlIHRoZSBnZW5lcmljCndhcm5fYWxsb2MoKS9kdW1wX3N0YWNrKCkgbWVjaGFuaXNtLgot LS0KVG8gdW5zdWJzY3JpYmUgZnJvbSB0aGlzIGxpc3Q6IHNlbmQgdGhlIGxpbmUgInVuc3Vic2Ny aWJlIGxpbnV4LXVzYiIgaW4KdGhlIGJvZHkgb2YgYSBtZXNzYWdlIHRvIG1ham9yZG9tb0B2Z2Vy Lmtlcm5lbC5vcmcKTW9yZSBtYWpvcmRvbW8gaW5mbyBhdCAgaHR0cDovL3ZnZXIua2VybmVsLm9y Zy9tYWpvcmRvbW8taW5mby5odG1sCg==