Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937846AbcJQRFq (ORCPT ); Mon, 17 Oct 2016 13:05:46 -0400 Received: from bgl-iport-3.cisco.com ([72.163.197.27]:14404 "EHLO bgl-iport-3.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936372AbcJQRBb (ORCPT ); Mon, 17 Oct 2016 13:01:31 -0400 X-Greylist: delayed 607 seconds by postgrey-1.27 at vger.kernel.org; Mon, 17 Oct 2016 13:01:31 EDT X-IronPort-AV: E=Sophos;i="5.31,357,1473120000"; d="scan'208";a="29621404" From: David Singleton To: "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 Subject: [PATCH] sd: assign appropriate log level Date: Mon, 17 Oct 2016 09:51:07 -0700 Message-Id: <20161017165108.29718-4-davsingl@cisco.com> X-Mailer: git-send-email 2.9.3 X-Auto-Response-Suppress: DR, OOF, AutoReply Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1416 Lines: 45 From: Shikhar Dogra Reduce chatter on console for usb hotplug. KERN_ERR is too high severity for these messages, moving them to KERN_WARNING 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 { - sd_first_printk(KERN_ERR, sdkp, + sd_first_printk(KERN_WARNING, sdkp, "Assuming drive cache: write through\n"); sdkp->WCE = 0; } -- 2.9.3