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 X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7AE78C48BDF for ; Fri, 18 Jun 2021 07:46:58 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E6D3161209 for ; Fri, 18 Jun 2021 07:46:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E6D3161209 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 563BA6B0070; Fri, 18 Jun 2021 03:46:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 514D16B0071; Fri, 18 Jun 2021 03:46:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3B4286B0072; Fri, 18 Jun 2021 03:46:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0167.hostedemail.com [216.40.44.167]) by kanga.kvack.org (Postfix) with ESMTP id 04E3E6B0070 for ; Fri, 18 Jun 2021 03:46:56 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 801E2180AD81F for ; Fri, 18 Jun 2021 07:46:56 +0000 (UTC) X-FDA: 78266063232.08.FAE4392 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by imf09.hostedemail.com (Postfix) with ESMTP id C18D6600015A for ; Fri, 18 Jun 2021 07:46:55 +0000 (UTC) Received: (Authenticated sender: miquel.raynal@bootlin.com) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id A108740006; Fri, 18 Jun 2021 07:46:52 +0000 (UTC) Date: Fri, 18 Jun 2021 09:46:51 +0200 From: Miquel Raynal To: kernel test robot Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com, Linux Memory Management List Subject: Re: [linux-next:master 9419/10007] drivers/mtd/nand/raw/arasan-nand-controller.c:1453:33: warning: shift count >= width of type Message-ID: <20210618094651.2a767516@xps13> In-Reply-To: <202106161802.0TPrXeZY-lkp@intel.com> References: <202106161802.0TPrXeZY-lkp@intel.com> Organization: Bootlin X-Mailer: Claws Mail 3.17.7 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Authentication-Results: imf09.hostedemail.com; dkim=none; spf=pass (imf09.hostedemail.com: domain of miquel.raynal@bootlin.com designates 217.70.183.194 as permitted sender) smtp.mailfrom=miquel.raynal@bootlin.com; dmarc=none X-Stat-Signature: tui1er54hdsgtqij4mj9zfu7c56ykafp X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: C18D6600015A X-HE-Tag: 1624002415-342629 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hello, kernel test robot wrote on Wed, 16 Jun 2021 18:33:22 +0800: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.g= it master > head: 19ae1f2bd9c091059f80646604ccef8a1e614f57 > commit: 236fd3e0427070413e7059dc3c52c3f9c89f7cc0 [9419/10007] Merge remot= e-tracking branch 'nand/nand/next' > config: riscv-randconfig-r013-20210615 (attached as .config) > compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 6472= 0f57bea6a6bf033feef4a5751ab9c0c3b401) > reproduce (this is a W=3D1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbi= n/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # install riscv cross compiling tool for clang build > # apt-get install binutils-riscv64-linux-gnu > # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next= .git/commit/?id=3D236fd3e0427070413e7059dc3c52c3f9c89f7cc0 > git remote add linux-next https://git.kernel.org/pub/scm/linux/ke= rnel/git/next/linux-next.git > git fetch --no-tags linux-next master > git checkout 236fd3e0427070413e7059dc3c52c3f9c89f7cc0 > # save the attached .config to linux build tree > COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dclang make.cross AR= CH=3Driscv=20 >=20 > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot >=20 > All warnings (new ones prefixed by >>): >=20 > In file included from drivers/mtd/nand/raw/arasan-nand-controller.c:17: > In file included from include/linux/dma-mapping.h:10: > In file included from include/linux/scatterlist.h:8: > In file included from include/linux/mm.h:33: > In file included from include/linux/pgtable.h:6: > arch/riscv/include/asm/pgtable.h:521:9: error: implicit declaration of= function 'pfn_pmd' [-Werror,-Wimplicit-function-declaration] > return pfn_pmd(page_to_pfn(page), prot); > ^ > arch/riscv/include/asm/pgtable.h:521:9: note: did you mean 'pfn_pgd'? > arch/riscv/include/asm/pgtable.h:222:21: note: 'pfn_pgd' declared here > static inline pgd_t pfn_pgd(unsigned long pfn, pgprot_t prot) > ^ > arch/riscv/include/asm/pgtable.h:521:17: error: implicit declaration o= f function 'page_to_section' [-Werror,-Wimplicit-function-declaration] > return pfn_pmd(page_to_pfn(page), prot); > ^ > include/asm-generic/memory_model.h:81:21: note: expanded from macro 'p= age_to_pfn' > #define page_to_pfn __page_to_pfn > ^ > include/asm-generic/memory_model.h:64:14: note: expanded from macro '_= _page_to_pfn' > int __sec =3D page_to_section(__pg); \ > ^ > arch/riscv/include/asm/pgtable.h:521:17: note: did you mean '__nr_to_s= ection'? > include/asm-generic/memory_model.h:81:21: note: expanded from macro 'p= age_to_pfn' > #define page_to_pfn __page_to_pfn > ^ > include/asm-generic/memory_model.h:64:14: note: expanded from macro '_= _page_to_pfn' > int __sec =3D page_to_section(__pg); \ > ^ > include/linux/mmzone.h:1314:35: note: '__nr_to_section' declared here > static inline struct mem_section *__nr_to_section(unsigned long nr) > ^ > In file included from drivers/mtd/nand/raw/arasan-nand-controller.c:17: > In file included from include/linux/dma-mapping.h:10: > In file included from include/linux/scatterlist.h:8: > In file included from include/linux/mm.h:33: > In file included from include/linux/pgtable.h:6: > arch/riscv/include/asm/pgtable.h:521:9: error: returning 'int' from a = function with incompatible result type 'pmd_t' > return pfn_pmd(page_to_pfn(page), prot); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > In file included from drivers/mtd/nand/raw/arasan-nand-controller.c:17: > In file included from include/linux/dma-mapping.h:10: > In file included from include/linux/scatterlist.h:8: > include/linux/mm.h:1552:29: error: static declaration of 'page_to_sect= ion' follows non-static declaration > static inline unsigned long page_to_section(const struct page *page) > ^ > arch/riscv/include/asm/pgtable.h:521:17: note: previous implicit decla= ration is here > return pfn_pmd(page_to_pfn(page), prot); > ^ > include/asm-generic/memory_model.h:81:21: note: expanded from macro 'p= age_to_pfn' > #define page_to_pfn __page_to_pfn > ^ > include/asm-generic/memory_model.h:64:14: note: expanded from macro '_= _page_to_pfn' > int __sec =3D page_to_section(__pg); \ > ^ > >> drivers/mtd/nand/raw/arasan-nand-controller.c:1453:33: warning: shift = count >=3D width of type [-Wshift-count-overflow] =20 > ret =3D dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)); > ^~~~~~~~~~~~~~~~ > include/linux/dma-mapping.h:76:54: note: expanded from macro 'DMA_BIT_= MASK' > #define DMA_BIT_MASK(n) (((n) =3D=3D 64) ? ~0ULL : ((1ULL<<(n))-1)) > ^ ~~~ > 1 warning and 4 errors generated. I'm not sure to understand what the proper fix here. I am also unable to reproduce the warning with the above steps. Thanks, Miqu=C3=A8l