mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@inria.fr>
To: Kent Overstreet <kmo@daterainc.com>
Cc: linux-kernel@vger.kernel.org, oe-kbuild-all@lists.linux.dev,
	lkp@intel.com
Subject: fs/bcachefs/move.c:33:17-31: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) (fwd)
Date: Tue, 5 Dec 2023 14:08:12 +0100 (CET)	[thread overview]
Message-ID: <899284eb-ef1d-44dd-9d57-86cb9b72bed7@inria.fr> (raw)



---------- Forwarded message ----------
Date: Tue, 5 Dec 2023 14:36:13 +0800
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Julia Lawall <julia.lawall@inria.fr>
Subject: fs/bcachefs/move.c:33:17-31: WARNING use flexible-array member instead
    (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-
    and-one-element-arrays)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Kent Overstreet <kmo@daterainc.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   bee0e7762ad2c6025b9f5245c040fcc36ef2bde8
commit: 1c6fdbd8f2465ddfb73a01ec620cbf3d14044e1a bcachefs: Initial commit
date:   6 weeks ago
:::::: branch date: 9 hours ago
:::::: commit date: 6 weeks ago
config: x86_64-randconfig-104-20231204 (https://download.01.org/0day-ci/archive/20231205/202312051447.F7YFxmFt-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce: (https://download.01.org/0day-ci/archive/20231205/202312051447.F7YFxmFt-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202312051447.F7YFxmFt-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> fs/bcachefs/move.c:33:17-31: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays)
--
>> fs/bcachefs/fs.c:437:1-7: preceding lock on line 351
   fs/bcachefs/fs.c:1559:4-10: preceding lock on line 1549
--
>> fs/bcachefs/journal.c:806:1-7: preceding lock on line 731
>> fs/bcachefs/journal.c:806:1-7: preceding lock on line 731
   fs/bcachefs/journal.c:806:1-7: preceding lock on line 767
--
>> fs/bcachefs/fs.c:235:12-13: WARNING opportunity for min()
--
>> fs/bcachefs/journal.c:624:20-21: WARNING opportunity for min()
   fs/bcachefs/journal.c:417:12-13: WARNING opportunity for min()
--
>> fs/bcachefs/journal_io.c:256:5-8: Unneeded variable: "ret". Return "  0" on line 263
   fs/bcachefs/journal_io.c:272:5-8: Unneeded variable: "ret". Return "  0" on line 288

vim +33 fs/bcachefs/move.c

1c6fdbd8f2465d Kent Overstreet 2017-03-16  20
1c6fdbd8f2465d Kent Overstreet 2017-03-16  21  struct moving_io {
1c6fdbd8f2465d Kent Overstreet 2017-03-16  22  	struct list_head	list;
1c6fdbd8f2465d Kent Overstreet 2017-03-16  23  	struct closure		cl;
1c6fdbd8f2465d Kent Overstreet 2017-03-16  24  	bool			read_completed;
1c6fdbd8f2465d Kent Overstreet 2017-03-16  25
1c6fdbd8f2465d Kent Overstreet 2017-03-16  26  	unsigned		read_sectors;
1c6fdbd8f2465d Kent Overstreet 2017-03-16  27  	unsigned		write_sectors;
1c6fdbd8f2465d Kent Overstreet 2017-03-16  28
1c6fdbd8f2465d Kent Overstreet 2017-03-16  29  	struct bch_read_bio	rbio;
1c6fdbd8f2465d Kent Overstreet 2017-03-16  30
1c6fdbd8f2465d Kent Overstreet 2017-03-16  31  	struct migrate_write	write;
1c6fdbd8f2465d Kent Overstreet 2017-03-16  32  	/* Must be last since it is variable size */
1c6fdbd8f2465d Kent Overstreet 2017-03-16 @33  	struct bio_vec		bi_inline_vecs[0];
1c6fdbd8f2465d Kent Overstreet 2017-03-16  34  };
1c6fdbd8f2465d Kent Overstreet 2017-03-16  35

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2023-12-05 13:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=899284eb-ef1d-44dd-9d57-86cb9b72bed7@inria.fr \
    --to=julia.lawall@inria.fr \
    --cc=kmo@daterainc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®