Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp2305371rwi; Tue, 1 Nov 2022 06:21:33 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7TL6jHj6pILoWr/FLBWdiH1Y2GmfTwVjIz/FDkuZra5RT4E0G6Kreuy6Cu1WhIvZ3mxYet X-Received: by 2002:a17:90a:8808:b0:213:c7d0:2217 with SMTP id s8-20020a17090a880800b00213c7d02217mr15058252pjn.231.1667308892728; Tue, 01 Nov 2022 06:21:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667308892; cv=none; d=google.com; s=arc-20160816; b=0zHAEIJG9DcLqYMS7rp/7TKLUAWnxWXCZc8CueOimjKd0kw2toUnwHaHvXqkCK8YRG 0XMvYNJsIRUT4cc0hWbEducOGt1oXz5qHofjmEmaeDu5tnGNQyRcn+6Ng3MOw4QLIiPh XXOQQOTHmDIN5qpoVr6jpvujgHzGMpfRb95Ef3nkioSAhXsxit4HJUtTw8ga4O32XZyC rLzcjxG7QjPgpu/Iiuz2ONnyb68LWWRkK0fJ4qpWHNEP0ith2BnDbmke6kXAs+ipEf3r Kx4e6beVFVRjimfXago+ubijUmKnepGsiqaZjx2fHvLiHyNKO03PCV7D/JXG9P1sYxDi zDZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ajZwomUSpf1naf6HXjxgHivuSzXOEoqWkv3sMHhF4SU=; b=CAP0xDt98f9ndRrH7O1pNcRcUL54NP3zoUn7AujPJqUel96ZGqj3OYFCwlq4DzFXWA /vC905WqZq8YGHuevqOEOFaagwNOid9NxNLKAsIgKslODG4NBMYrl+r5nh5dexdqaQeE ugDwdet3fX7/QOVWbnj9WNzrsiJMQUL4VMhhoGbtiwvRz8rR5HpZJuwOLCzHA8tUtWss LTBh2yVJymzoNMMHujBN8zSF1ua9sGmfF3RO/df/Hx5u0XPn5o0vvmJyzhmAVgVm+zD5 GsatgCGZrJ1sMlhUlWwkyu+jGquVJ7uonbcQjnCVb3fdLKtW0l3+EuO0Lj7/NzkJEAa9 bL8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I7TVodMd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ot1-20020a17090b3b4100b0020d3fa4d1edsi1857276pjb.64.2022.11.01.06.21.19; Tue, 01 Nov 2022 06:21:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I7TVodMd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230123AbiKAMYt (ORCPT + 97 others); Tue, 1 Nov 2022 08:24:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229763AbiKAMYr (ORCPT ); Tue, 1 Nov 2022 08:24:47 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83E5617A90; Tue, 1 Nov 2022 05:24:46 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id 42C70B81C9C; Tue, 1 Nov 2022 12:24:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DDF1CC433D6; Tue, 1 Nov 2022 12:24:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667305483; bh=bSa8Tet80b1soioHlSxW/ocDO2rBr47g7tjRPLUY5Sk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=I7TVodMdDhVwZCdw5dhm2FhqjUF0iegwejsl9wx6PG4uV7m/y71oEddEpf06q4oGU P3n1ow/9ga8zLF8+HX1QPEVm3NBv/iWhfzQS+npmwwrJlr+2HCMF1RhP9yAJr02otV 4JgTrjQ8fBr1synmKNwYCQtI3RIk1QfeaQY8Xrc61ZjcmK05nBoP7YFBAE5XPkG8Qv SN/9uaB4VhoUGvt9YhMTkrbE9h0128ijRhOoHeOkDIsxD1Zptx4sAcz7W+pzfWuyD8 z13vS042QOGK3fAKcPBIJ0Av+a065094FxEIT/k1pY1Z1eDL+yR914RMdbcda4kUKn 6zwtE3fzmyTIw== Date: Tue, 1 Nov 2022 17:54:31 +0530 From: Manivannan Sadhasivam To: Frank Li Cc: allenbh@gmail.com, bhelgaas@google.com, dave.jiang@intel.com, helgaas@kernel.org, imx@lists.linux.dev, jdmason@kudzu.us, kw@linux.com, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, lpieralisi@kernel.org, ntb@lists.linux.dev Subject: Re: [PATCH v14 6/7] PCI: endpoint: pci-epf-vntb: fix sparse build warning at epf_db Message-ID: <20221101122431.GJ54667@thinkpad> References: <20221028155703.318928-1-Frank.Li@nxp.com> <20221028155703.318928-7-Frank.Li@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221028155703.318928-7-Frank.Li@nxp.com> X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SORTED_RECIPS,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 28, 2022 at 11:57:02AM -0400, Frank Li wrote: > From: Frank Li > > Using epf_db[i] instead of readl() because epf_db is in local > system memory and allocated by dma_alloc_coherent(). > > Signed-off-by: Frank Li > --- > drivers/pci/endpoint/functions/pci-epf-vntb.c | 9 +++------ > 1 file changed, 3 insertions(+), 6 deletions(-) > > diff --git a/drivers/pci/endpoint/functions/pci-epf-vntb.c b/drivers/pci/endpoint/functions/pci-epf-vntb.c > index 54616281da9e..db3455c1589b 100644 > --- a/drivers/pci/endpoint/functions/pci-epf-vntb.c > +++ b/drivers/pci/endpoint/functions/pci-epf-vntb.c > @@ -136,7 +136,7 @@ struct epf_ntb { > > struct epf_ntb_ctrl *reg; > > - void __iomem *epf_db; > + u32 *epf_db; > > phys_addr_t vpci_mw_phy[MAX_MW]; > void __iomem *vpci_mw_addr[MAX_MW]; > @@ -257,12 +257,9 @@ static void epf_ntb_cmd_handler(struct work_struct *work) > ntb = container_of(work, struct epf_ntb, cmd_handler.work); > > for (i = 1; i < ntb->db_count; i++) { > - if (readl(ntb->epf_db + i * sizeof(u32))) { > - if (readl(ntb->epf_db + i * sizeof(u32))) > - ntb->db |= 1 << (i - 1); Why did you remove above line? Thanks, Mani > - > + if (ntb->epf_db[i]) { > ntb_db_event(&ntb->ntb, i); > - writel(0, ntb->epf_db + i * sizeof(u32)); > + ntb->epf_db[i] = 0; > } > } > > -- > 2.34.1 > -- மணிவண்ணன் சதாசிவம்