From: Chao Yu <chao@kernel.org> To: Nathan Chancellor <nathan@kernel.org> Cc: jaegeuk@kernel.org, ndesaulniers@google.com, trix@redhat.com, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, patches@lists.linux.dev, kernel test robot <lkp@intel.com> Subject: Re: [PATCH] f2fs: Fix type of single bit bitfield in f2fs_io_info Date: Thu, 2 Feb 2023 15:11:18 +0800 [thread overview] Message-ID: <e4dec7de-40d8-5e66-2e83-17e1540042ff@kernel.org> (raw) In-Reply-To: <Y9tU+woHY23zHpmv@dev-arch.thelio-3990X> On 2023/2/2 14:15, Nathan Chancellor wrote: > On Thu, Feb 02, 2023 at 02:13:18PM +0800, Chao Yu wrote: >> On 2023/2/2 0:40, Nathan Chancellor wrote: >>> Clang warns: >>> >>> ../fs/f2fs/data.c:995:17: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] >>> fio->submitted = 1; >>> ^ ~ >>> ../fs/f2fs/data.c:1011:15: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] >>> fio->retry = 1; >>> ^ ~ >>> >>> ../fs/f2fs/segment.c:3320:16: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] >>> fio->in_list = 1; >>> ^ ~ >>> >>> There is not a bug here because the value of these fields is never >>> explicitly compared against (just whether it is zero or non-zero) but >>> it is easy to silence the warning by using an unsigned type to allow >>> an assignment of 0 or 1 without implicit conversion. >> >> Nathan, thanks a lot for catching this, do you mind letting I merge this fix >> into original patch? as the original patch has not been upstreamed yet. > > No worries, do whatever you need to! I just care that the problem gets > resolved one way or another :) Thank you! Updated a v3 patch. :) Thanks, > > Cheers, > Nathan
WARNING: multiple messages have this Message-ID (diff)
From: Chao Yu <chao@kernel.org> To: Nathan Chancellor <nathan@kernel.org> Cc: kernel test robot <lkp@intel.com>, trix@redhat.com, llvm@lists.linux.dev, ndesaulniers@google.com, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, patches@lists.linux.dev, jaegeuk@kernel.org Subject: Re: [f2fs-dev] [PATCH] f2fs: Fix type of single bit bitfield in f2fs_io_info Date: Thu, 2 Feb 2023 15:11:18 +0800 [thread overview] Message-ID: <e4dec7de-40d8-5e66-2e83-17e1540042ff@kernel.org> (raw) In-Reply-To: <Y9tU+woHY23zHpmv@dev-arch.thelio-3990X> On 2023/2/2 14:15, Nathan Chancellor wrote: > On Thu, Feb 02, 2023 at 02:13:18PM +0800, Chao Yu wrote: >> On 2023/2/2 0:40, Nathan Chancellor wrote: >>> Clang warns: >>> >>> ../fs/f2fs/data.c:995:17: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] >>> fio->submitted = 1; >>> ^ ~ >>> ../fs/f2fs/data.c:1011:15: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] >>> fio->retry = 1; >>> ^ ~ >>> >>> ../fs/f2fs/segment.c:3320:16: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] >>> fio->in_list = 1; >>> ^ ~ >>> >>> There is not a bug here because the value of these fields is never >>> explicitly compared against (just whether it is zero or non-zero) but >>> it is easy to silence the warning by using an unsigned type to allow >>> an assignment of 0 or 1 without implicit conversion. >> >> Nathan, thanks a lot for catching this, do you mind letting I merge this fix >> into original patch? as the original patch has not been upstreamed yet. > > No worries, do whatever you need to! I just care that the problem gets > resolved one way or another :) Thank you! Updated a v3 patch. :) Thanks, > > Cheers, > Nathan _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2023-02-02 7:11 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-02-01 16:40 [PATCH] f2fs: Fix type of single bit bitfield in f2fs_io_info Nathan Chancellor 2023-02-01 16:40 ` [f2fs-dev] " Nathan Chancellor 2023-02-02 6:13 ` Chao Yu 2023-02-02 6:13 ` [f2fs-dev] " Chao Yu 2023-02-02 6:15 ` Nathan Chancellor 2023-02-02 6:15 ` [f2fs-dev] " Nathan Chancellor 2023-02-02 7:11 ` Chao Yu [this message] 2023-02-02 7:11 ` Chao Yu
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=e4dec7de-40d8-5e66-2e83-17e1540042ff@kernel.org \ --to=chao@kernel.org \ --cc=jaegeuk@kernel.org \ --cc=linux-f2fs-devel@lists.sourceforge.net \ --cc=linux-kernel@vger.kernel.org \ --cc=lkp@intel.com \ --cc=llvm@lists.linux.dev \ --cc=nathan@kernel.org \ --cc=ndesaulniers@google.com \ --cc=patches@lists.linux.dev \ --cc=trix@redhat.com \ /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.