Return-Path: Received: from e23smtp09.au.ibm.com (e23smtp09.au.ibm.com [202.81.31.142]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 7FDE71A0024 for ; Tue, 29 Sep 2015 15:06:34 +1000 (AEST) Received: from /spool/local by e23smtp09.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 29 Sep 2015 15:06:33 +1000 Received: from d23relay09.au.ibm.com (d23relay09.au.ibm.com [9.185.63.181]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id B27AD2CE8050 for ; Tue, 29 Sep 2015 15:06:29 +1000 (EST) Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay09.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t8T56L1H19202212 for ; Tue, 29 Sep 2015 15:06:29 +1000 Received: from d23av04.au.ibm.com (localhost [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t8T55u8N010898 for ; Tue, 29 Sep 2015 15:05:57 +1000 Message-ID: <560A1C33.8040709@au1.ibm.com> Date: Tue, 29 Sep 2015 15:05:55 +1000 From: Andrew Donnellan MIME-Version: 1.0 To: "Matthew R. Ochs" , linux-scsi@vger.kernel.org, James Bottomley , "Nicholas A. Bellinger" , Brian King , Ian Munsie , Daniel Axtens , Tomas Henzl , David Laight CC: Michael Neuling , linuxppc-dev@lists.ozlabs.org, "Manoj N. Kumar" Subject: Re: [PATCH v4 12/32] cxlflash: Fix to avoid spamming the kernel log References: <1443222593-8828-1-git-send-email-mrochs@linux.vnet.ibm.com> <1443222936-9385-1-git-send-email-mrochs@linux.vnet.ibm.com> In-Reply-To: <1443222936-9385-1-git-send-email-mrochs@linux.vnet.ibm.com> Content-Type: text/plain; charset=windows-1252; format=flowed List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 26/09/15 09:15, Matthew R. Ochs wrote: > During run-time the driver can be very chatty and spam the system > kernel log. Various print statements can be limited and/or moved > to development-only mode. Additionally, numerous prints can be > converted to trace the corresponding device. > > The following changes were made: > - pr_debug to pr_devel > - pr_debug to pr_debug_ratelimited > - pr_err to dev_err > - pr_debug to dev_dbg > > Signed-off-by: Matthew R. Ochs > Signed-off-by: Manoj N. Kumar > Reviewed-by: Brian King Reviewed-by: Andrew Donnellan Changes mostly look fine, further comments below. > --- a/drivers/scsi/cxlflash/main.c > +++ b/drivers/scsi/cxlflash/main.c > @@ -58,8 +58,8 @@ static struct afu_cmd *cmd_checkout(struct afu *afu) > cmd = &afu->cmd[k]; > > if (!atomic_dec_if_positive(&cmd->free)) { > - pr_debug("%s: returning found index=%d\n", > - __func__, cmd->slot); > + pr_devel("%s: returning found index=%d cmd=%p\n", > + __func__, cmd->slot, cmd); > pr_debug("%s: cmd failed afu_rc=%d scsi_rc=%d fc_rc=%d " > - "afu_extra=0x%X, scsi_entra=0x%X, fc_extra=0x%X\n", > + "afu_extra=0x%X, scsi_extra=0x%X, fc_extra=0x%X\n", > __func__, ioasa->rc.afu_rc, ioasa->rc.scsi_rc, > ioasa->rc.fc_rc, ioasa->afu_extra, ioasa->scsi_extra, > ioasa->fc_extra); Minor nitpicking: mention that you fix these in the commit message. > @@ -240,9 +240,9 @@ static void cmd_complete(struct afu_cmd *cmd) > cmd_is_tmf = cmd->cmd_tmf; > cmd_checkin(cmd); /* Don't use cmd after here */ > > - pr_debug("%s: calling scsi_set_resid, scp=%p " > - "result=%X resid=%d\n", __func__, > - scp, scp->result, resid); > + pr_debug_ratelimited("%s: calling scsi_done scp=%p result=%X " > + "ioasc=%d\n", __func__, scp, scp->result, > + cmd->sa.ioasc); > > scsi_set_resid(scp, resid); > scsi_dma_unmap(scp); Why has the message changed from scsi_set_resid to scsi_done, and should the message be moved to immediately before the scsi_done call? Andrew -- Andrew Donnellan Software Engineer, OzLabs andrew.donnellan@au1.ibm.com Australia Development Lab, Canberra +61 2 6201 8874 (work) IBM Australia Limited