Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936565AbcJQRPe (ORCPT ); Mon, 17 Oct 2016 13:15:34 -0400 Received: from smtprelay0159.hostedemail.com ([216.40.44.159]:49594 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932489AbcJQRPY (ORCPT ); Mon, 17 Oct 2016 13:15:24 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4250:4321:5007:7576:8784:10004:10400:10848:11026:11232:11658:11914:12296:12555:12740:12760:13069:13095:13311:13357:13439:14181:14659:14721:21080:21433:21451:30054:30064:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:3,LUA_SUMMARY:none X-HE-Tag: shelf48_4bb14b8a0be1a X-Filterd-Recvd-Size: 2598 Message-ID: <1476724518.4414.4.camel@perches.com> Subject: Re: [PATCH] sd: assign appropriate log level From: Joe Perches To: David Singleton , "James E.J. Bottomley" , "Martin K. Petersen" Cc: Shikhar Dogra , xe-kernel@external.cisco.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 17 Oct 2016 10:15:18 -0700 In-Reply-To: <20161017165108.29718-4-davsingl@cisco.com> References: <20161017165108.29718-4-davsingl@cisco.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.0-2ubuntu1 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: 1654 Lines: 48 On Mon, 2016-10-17 at 09:51 -0700, David Singleton wrote: > From: Shikhar Dogra > > Reduce chatter on console for usb hotplug. > KERN_ERR is too high severity for these messages, moving them > to KERN_WARNING Perhaps KERN_NOTICE is more appropriate. That's the level for most of these sd_first_printk already. > USB devices never have a Caching Mode page, it doesn't make > sense to make it an error when you have tons of USB devices where > the print is useless, and not an error. > > For second message, the condition is not an error. The existing > workaround of assuming a write through cache doesn't limit > functionality in any way. > > Cc: xe-kernel@external.cisco.com > Signed-off-by: Shikhar Dogra > Signed-off-by: David Singleton > --- > drivers/scsi/sd.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c > index 51e5629..ab7bfe3 100644 > --- a/drivers/scsi/sd.c > +++ b/drivers/scsi/sd.c > @@ -2540,7 +2540,7 @@ sd_read_cache_type(struct scsi_disk *sdkp, unsigned char *buffer) > } > } > > - sd_first_printk(KERN_ERR, sdkp, "No Caching mode page found\n"); > + sd_first_printk(KERN_WARNING, sdkp, "No Caching mode page found\n"); > goto defaults; > > Page_found: > @@ -2594,7 +2594,7 @@ sd_read_cache_type(struct scsi_disk *sdkp, unsigned char *buffer) > "Assuming drive cache: write back\n"); > sdkp->WCE = 1; > } else {s > - sd_first_printk(KERN_ERR, sdkp, > + sd_first_printk(KERN_WARNING, sdkp, > "Assuming drive cache: write through\n"); > sdkp->WCE = 0; > } >