From: Fabio Estevam <festevam@gmail.com> To: Nathan Chancellor <natechancellor@gmail.com> Cc: Souptick Joarder <jrdr.linux@gmail.com>, kernel test robot <lkp@intel.com>, kbuild-all@lists.01.org, clang-built-linux@googlegroups.com, Linux Memory Management List <linux-mm@kvack.org>, Vinod Koul <vkoul@kernel.org> Subject: Re: [linux-next:master 6953/13205] drivers/dma/imx-dma.c:1048:20: warning: cast to smaller integer type 'enum imx_dma_type' from 'const void Date: Sat, 12 Dec 2020 18:44:55 -0300 [thread overview] Message-ID: <CAOMZO5AtPkciomabbe01Rg1BvqOzPx_omiytgXgNCQNbZTJ+=g@mail.gmail.com> (raw) In-Reply-To: <20201212200312.GA1773888@ubuntu-m3-large-x86> Hi Nathan, On Sat, Dec 12, 2020 at 5:03 PM Nathan Chancellor <natechancellor@gmail.com> wrote: > Correct. The clang developers explicitly wanted this behavior so I moved > it under a new warning that could be disabled on regular builds but show > up on W=1 in case people wanted to fix these occurrences. > > https://reviews.llvm.org/D72231 > https://github.com/ClangBuiltLinux/linux/issues/887 > 82f2bc2fcc01 ("kbuild: Disable -Wpointer-to-enum-cast") > > > Not sure how to make clang happy in this case. Thanks for the clarification. > Added a cast to unsigned long or uintptr_t before the cast to the enum > should fix it. Great, thanks. Maybe someone could send patches fixing these W=1 clang warnings for the different subsystems. Regards, Fabio Estevam
WARNING: multiple messages have this Message-ID (diff)
From: Fabio Estevam <festevam@gmail.com> To: kbuild-all@lists.01.org Subject: Re: [linux-next:master 6953/13205] drivers/dma/imx-dma.c:1048:20: warning: cast to smaller integer type 'enum imx_dma_type' from 'const void Date: Sat, 12 Dec 2020 18:44:55 -0300 [thread overview] Message-ID: <CAOMZO5AtPkciomabbe01Rg1BvqOzPx_omiytgXgNCQNbZTJ+=g@mail.gmail.com> (raw) In-Reply-To: <20201212200312.GA1773888@ubuntu-m3-large-x86> [-- Attachment #1: Type: text/plain, Size: 790 bytes --] Hi Nathan, On Sat, Dec 12, 2020 at 5:03 PM Nathan Chancellor <natechancellor@gmail.com> wrote: > Correct. The clang developers explicitly wanted this behavior so I moved > it under a new warning that could be disabled on regular builds but show > up on W=1 in case people wanted to fix these occurrences. > > https://reviews.llvm.org/D72231 > https://github.com/ClangBuiltLinux/linux/issues/887 > 82f2bc2fcc01 ("kbuild: Disable -Wpointer-to-enum-cast") > > > Not sure how to make clang happy in this case. Thanks for the clarification. > Added a cast to unsigned long or uintptr_t before the cast to the enum > should fix it. Great, thanks. Maybe someone could send patches fixing these W=1 clang warnings for the different subsystems. Regards, Fabio Estevam
next prev parent reply other threads:[~2020-12-12 21:45 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-12-11 13:46 [linux-next:master 6953/13205] drivers/dma/imx-dma.c:1048:20: warning: cast to smaller integer type 'enum imx_dma_type' from 'const void kernel test robot 2020-12-11 13:46 ` kernel test robot 2020-12-11 14:54 ` Souptick Joarder 2020-12-11 14:54 ` Souptick Joarder 2020-12-12 15:40 ` Fabio Estevam 2020-12-12 15:40 ` Fabio Estevam 2020-12-12 20:03 ` Nathan Chancellor 2020-12-12 20:03 ` Nathan Chancellor 2020-12-12 21:44 ` Fabio Estevam [this message] 2020-12-12 21:44 ` Fabio Estevam
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to='CAOMZO5AtPkciomabbe01Rg1BvqOzPx_omiytgXgNCQNbZTJ+=g@mail.gmail.com' \ --to=festevam@gmail.com \ --cc=clang-built-linux@googlegroups.com \ --cc=jrdr.linux@gmail.com \ --cc=kbuild-all@lists.01.org \ --cc=linux-mm@kvack.org \ --cc=lkp@intel.com \ --cc=natechancellor@gmail.com \ --cc=vkoul@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.