Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1209200pxm; Wed, 23 Feb 2022 21:17:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJyvNfhLxfaYRuqYKyQ1+JfecxoUx70T1z/QaMX9/IKxX6nDKSH7Ct0Cl+Nnzabqioq92bhL X-Received: by 2002:a05:6a00:b49:b0:4cf:432f:9cd9 with SMTP id p9-20020a056a000b4900b004cf432f9cd9mr1018609pfo.10.1645679827270; Wed, 23 Feb 2022 21:17:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645679827; cv=none; d=google.com; s=arc-20160816; b=mS4Ps92iegvkC4RArEaqyRV0KXb/FmXXXw4BxAhMtizNy0xk7DYl4zzNZpMM+xUgLw Ak6s/KzxSlqxgR1UCWGdpGP98oMsRXI0PcZmts/hoPw8DjoTt+KdKxqPeERf5RswPvw3 GLR4XV4NyoN2u/Jd7JACXAgXOYu45QyaLNbh1E8a95pqAhG72EOLcfaMcC7y/ANXRiv/ 5u04+bf5Fw3gorfPiL9iY33o9Zm50+FELM1SOch9jMimIa/7wvQ5iRsfkSwRKB0yvVT7 DTI24owYBlLRK3tyYv2jo45o86tN/wHu2vNWrkSa57uPbSFDkOv/1mMt76NFdwuEFno1 Mspg== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=AZhyoEuD86KKdEj1ilFmEeC938XIlmiDx38CB4st0CA=; b=mtossJ0RR3TMeX716WiS9x0WRL6dGgdKGcWQXRmRUf0jYQ2VMqFrkNXPmCKPism7+m vtbenhrTxZiwL0st0pZyFxvXihHPVVBSsSpLfgnkUcMOGijqOwV/KID3CLUFSvZZclH4 /+RtW03p+hp1LEn0X8d1ZCoLnU96+GV6nJxj+i5lLKqOr1irTv2Lsf9uPRUaVr/5cYnR FvkmAmFGNr2NDocGeJzmdcSobsddAhQI4h/YZMItxPCdd+QtIsArHb7gYMr7xIpeQASO 7DcC7qLuDFUNWkncC9A2HY5qHKY0KbTX6cT+bg5WFQgIhpGTD3xEjmaqki+0hBZwSX74 Ectw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="RAcPw6/d"; 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 bg25si1726710pgb.88.2022.02.23.21.16.50; Wed, 23 Feb 2022 21:17:07 -0800 (PST) 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="RAcPw6/d"; 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 S230007AbiBXEje (ORCPT + 99 others); Wed, 23 Feb 2022 23:39:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229476AbiBXEjc (ORCPT ); Wed, 23 Feb 2022 23:39:32 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10D5C1F7671; Wed, 23 Feb 2022 20:39:04 -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 ams.source.kernel.org (Postfix) with ESMTPS id BC8A3B82284; Thu, 24 Feb 2022 04:39:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE59DC340E9; Thu, 24 Feb 2022 04:39:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645677541; bh=oI8CPLC1EMfiXlrbW9XX3rNJjWhgOpqXILFLAUtXfEk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RAcPw6/dV//awrcFH0EeVUFrftlPqNPcP9dKYWzG35eh/dQGhtc194DOktlrZOPY4 jk6bs16cEX0VvpRoTE3ymKKSJegTQC1r67sy/jtkkSug/Y3vKg795WeafFEaSNaJLH 5nWKk1JpGjvunXCywJFeQfIsfxmBweYe6i+xYARQRQULTFOtYnHQYzetGexzpaLraV LIyl4YeG9jOS86F/+QNZPZB75jI4142e0oG+LnfD5H2izAO20S7Kx7N0zRVluV1rsa CYVarERFm1Fu4uB3wLnWTd5IMz57u8fXjimcRm3WCpm4Mmgft+ohHV81UmprlH4rW9 v8t5j1rRIRXHQ== Date: Thu, 24 Feb 2022 10:08:57 +0530 From: Vinod Koul To: Akhil R Cc: Nathan Chancellor , "devicetree@vger.kernel.org" , "dmaengine@vger.kernel.org" , Jonathan Hunter , Krishna Yarlagadda , Laxman Dewangan , "linux-kernel@vger.kernel.org" , "linux-tegra@vger.kernel.org" , "p.zabel@pengutronix.de" , Rajesh Gumasta , "robh+dt@kernel.org" , "thierry.reding@gmail.com" , Pavan Kunapuli Subject: Re: [PATCH v20 2/2] dmaengine: tegra: Add tegra gpcdma driver Message-ID: References: <20220221153934.5226-1-akhilrajeev@nvidia.com> <20220221153934.5226-3-akhilrajeev@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 24-02-22, 04:23, Akhil R wrote: > > On Wed, Feb 23, 2022 at 03:49:09AM +0000, Akhil R wrote: > > > I am getting notification for the below warning also. > > > > > > >> drivers/dma/tegra186-gpc-dma.c:898:53: warning: shift count >= width of > > type [-Wshift-count-overflow] > > > FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_DST_PTR, (dest >> > > 32)); > > > https://lore.kernel.org/all/202202230559.bLOEMEUh-lkp@intel.com/ > > > > > > I suppose, this is because it is compiled against a different ARCH other than > > arm64. > > > For arm64, the dma_addr_t is 64 bytes, and this warning does not occur. > > > Could this be ignored for now? If not, could you suggest a fix, if possible? > > > > I am not really familiar with the DMA API and dma_addr_t so I am not > > sure about a proper fix. > > > > You could cast dest to u64 to guarantee it is a type that can be shifted > > by 32 but that might not be right for CONFIG_PHYS_ADDR_T_64BIT=n. If the > > driver is not expected to run without CONFIG_PHYS_ADDR_T_64BIT, then > > this is probably fine. > > > > You could mark this driver 'depends on PHYS_ADDR_T_64BIT' if it cannot > > run with CONFIG_ARCH_TEGRA=y + CONFIG_PHYS_ADDR_T_64BIT=n but I do > > not > > see any other drivers that do that, which might mean that is not a > > proper fix. > > > > Please do not ignore the warning, as it will show up with ARCH=arm > > allmodconfig, which has -Werror enabled. > I see some drivers using 'depends on ARM64'. I guess probably we could > use that to avoid this warning. The driver is only supported for arm64 Tegra > systems as of now. dma_addr_t can be different on different arch so yes this 'can' overflow, but since this driver would never be used on non ARM64, make sense to put depends. -- ~Vinod