From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 47CD3C25B0E for ; Tue, 16 Aug 2022 15:03:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236055AbiHPPDA (ORCPT ); Tue, 16 Aug 2022 11:03:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236052AbiHPPCi (ORCPT ); Tue, 16 Aug 2022 11:02:38 -0400 Received: from smtp.smtpout.orange.fr (smtp06.smtpout.orange.fr [80.12.242.128]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A390357E1 for ; Tue, 16 Aug 2022 08:00:56 -0700 (PDT) Received: from [192.168.1.18] ([90.11.190.129]) by smtp.orange.fr with ESMTPA id Ny3mo4Dd75V1hNy3moN0rt; Tue, 16 Aug 2022 17:00:51 +0200 X-ME-Helo: [192.168.1.18] X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Tue, 16 Aug 2022 17:00:51 +0200 X-ME-IP: 90.11.190.129 Message-ID: Date: Tue, 16 Aug 2022 17:00:50 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] vfio/fsl-mc: Fix a typo in a comment Content-Language: en-US To: Jason Gunthorpe Cc: Diana Craciun , Alex Williamson , Cornelia Huck , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, kvm@vger.kernel.org References: <2b65bf8d2b4d940cafbafcede07c23c35f042f5a.1659815764.git.christophe.jaillet@wanadoo.fr> From: Christophe JAILLET In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 09/08/2022 à 18:20, Jason Gunthorpe a écrit : > On Sat, Aug 06, 2022 at 09:56:13PM +0200, Christophe JAILLET wrote: >> L and S are swapped/ >> s/VFIO_FLS_MC/VFIO_FSL_MC/ >> >> Signed-off-by: Christophe JAILLET >> --- >> All the dev_ logging functions in the file have the "VFIO_FSL_MC: " >> prefix. >> As they are dev_ function, the driver should already be displayed. >> >> So, does it make sense or could they be all removed? >> --- >> drivers/vfio/fsl-mc/vfio_fsl_mc.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc.c b/drivers/vfio/fsl-mc/vfio_fsl_mc.c >> index 3feff729f3ce..66d01db1d240 100644 >> --- a/drivers/vfio/fsl-mc/vfio_fsl_mc.c >> +++ b/drivers/vfio/fsl-mc/vfio_fsl_mc.c >> @@ -110,7 +110,7 @@ static void vfio_fsl_mc_close_device(struct vfio_device *core_vdev) >> >> if (WARN_ON(ret)) >> dev_warn(&mc_cont->dev, >> - "VFIO_FLS_MC: reset device has failed (%d)\n", ret); >> + "VFIO_FSL_MC: reset device has failed (%d)\n", ret); > > WARN_ON already prints, this is better written as > > WARN(ret, "VFIO_FSL_MC: reset device has failed (%d)\n", ret); Or maybe, just: if (ret) dev_warn(&mc_cont->dev, "VFIO_FSL_MC: reset device has failed (%d)\n", ret); This keep information about the device, avoid the duplicate printing related to WARN_ON+dev_warn and is more in line with error handling in other files. Do you agree or do you prefer a v2 as you proposed with WARN()? CJ > > Jason >