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 30A8AC636CC for ; Wed, 15 Feb 2023 12:02:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233108AbjBOMCM (ORCPT ); Wed, 15 Feb 2023 07:02:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231318AbjBOMCL (ORCPT ); Wed, 15 Feb 2023 07:02:11 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A72E38028 for ; Wed, 15 Feb 2023 04:01:49 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2640C61B45 for ; Wed, 15 Feb 2023 12:01:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FE9BC433D2; Wed, 15 Feb 2023 12:01:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1676462508; bh=fNqTru1z+wAQ8qcyWYUzCcH6lz20zw3UIr4aL/jziJA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Z29fgzzP/YdzkrdahZfexm5VYkCPuOVuHNQl7xXnHULuSzAzTFBpXy/Vw62lcfDha CBiIL3R4nf7yq3pv+wTIHZsNjTUJmBSsLahFLKrA60Kmrjc8JDig0KRCdbq3FQuiNU JNvC9gn2tWqYMSJDzlj0tKubD9jcLHuKVJARBk2M= Date: Wed, 15 Feb 2023 13:01:46 +0100 From: Greg Kroah-Hartman To: Damien Le Moal Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, Rick Wertenbroek , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Manivannan Sadhasivam , Kishon Vijay Abraham I , Arnd Bergmann Subject: Re: [PATCH 07/12] pci: epf-test: Add debug and error messages Message-ID: References: <20230215032155.74993-1-damien.lemoal@opensource.wdc.com> <20230215032155.74993-8-damien.lemoal@opensource.wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Wed, Feb 15, 2023 at 08:45:50PM +0900, Damien Le Moal wrote: > On 2/15/23 20:34, Greg Kroah-Hartman wrote: > > On Wed, Feb 15, 2023 at 12:21:50PM +0900, Damien Le Moal wrote: > >> Make the pci-epf-test driver more verbose with dynamic debug messages > >> using dev_dbg(). Also add some dev_err() error messages to help > >> troubleshoot issues. > >> > >> Signed-off-by: Damien Le Moal > >> --- > >> drivers/pci/endpoint/functions/pci-epf-test.c | 69 +++++++++++++++---- > >> 1 file changed, 56 insertions(+), 13 deletions(-) > >> > >> diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c > >> index f630393e8208..9b791f4a7ffb 100644 > >> --- a/drivers/pci/endpoint/functions/pci-epf-test.c > >> +++ b/drivers/pci/endpoint/functions/pci-epf-test.c > >> @@ -330,6 +330,10 @@ static int pci_epf_test_copy(struct pci_epf_test *epf_test, bool use_dma) > >> enum pci_barno test_reg_bar = epf_test->test_reg_bar; > >> volatile struct pci_epf_test_reg *reg = epf_test->reg[test_reg_bar]; > > > > note, volatile is almost always wrong, please fix that up. > > OK. Will think of something else. If this is io memory, use the proper accessors to access it. If it is not io memory, then why is it marked volatile at all? thanks, greg k-h