All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-nvme:nvme-5.14 32/32] drivers/nvme/target/zns.c:257:6: warning: no previous prototype for 'nvmet_bdev_zone_zmgmt_recv_work'
@ 2021-06-15 19:45 ` kernel test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-06-15 19:45 UTC (permalink / raw)
  To: Chaitanya Kulkarni
  Cc: kbuild-all, linux-nvme, Christoph Hellwig, Damien Le Moal

[-- Attachment #1: Type: text/plain, Size: 3035 bytes --]

tree:   git://git.infradead.org/nvme.git nvme-5.14
head:   9653e01d9c3c46930da3f007a39a2aaf230bd8ff
commit: 9653e01d9c3c46930da3f007a39a2aaf230bd8ff [32/32] nvmet: add ZBD over ZNS backend support
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git remote add linux-nvme git://git.infradead.org/nvme.git
        git fetch --no-tags linux-nvme nvme-5.14
        git checkout 9653e01d9c3c46930da3f007a39a2aaf230bd8ff
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/nvme/target/zns.c:257:6: warning: no previous prototype for 'nvmet_bdev_zone_zmgmt_recv_work' [-Wmissing-prototypes]
     257 | void nvmet_bdev_zone_zmgmt_recv_work(struct work_struct *w)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/nvmet_bdev_zone_zmgmt_recv_work +257 drivers/nvme/target/zns.c

   256	
 > 257	void nvmet_bdev_zone_zmgmt_recv_work(struct work_struct *w)
   258	{
   259		struct nvmet_req *req = container_of(w, struct nvmet_req, z.zmgmt_work);
   260		sector_t start_sect = nvmet_lba_to_sect(req->ns, req->cmd->zmr.slba);
   261		unsigned long req_slba_nr_zones = nvmet_req_nr_zones_from_slba(req);
   262		u32 out_bufsize = (le32_to_cpu(req->cmd->zmr.numd) + 1) << 2;
   263		__le64 nr_zones;
   264		u16 status;
   265		int ret;
   266		struct nvmet_report_zone_data rz_data = {
   267			.out_nr_zones = get_nr_zones_from_buf(req, out_bufsize),
   268			/* leave the place for report zone header */
   269			.out_buf_offset = sizeof(struct nvme_zone_report),
   270			.zrasf = req->cmd->zmr.zrasf,
   271			.nr_zones = 0,
   272			.req = req,
   273		};
   274	
   275		status = nvmet_bdev_validate_zone_mgmt_recv(req);
   276		if (status)
   277			goto out;
   278	
   279		if (!req_slba_nr_zones) {
   280			status = NVME_SC_SUCCESS;
   281			goto out;
   282		}
   283	
   284		ret = blkdev_report_zones(req->ns->bdev, start_sect, req_slba_nr_zones,
   285					 nvmet_bdev_report_zone_cb, &rz_data);
   286		if (ret < 0) {
   287			status = NVME_SC_INTERNAL;
   288			goto out;
   289		}
   290	
   291		/*
   292		 * When partial bit is set nr_zones must indicate the number of zone
   293		 * descriptors actually transferred.
   294		 */
   295		if (req->cmd->zmr.pr)
   296			rz_data.nr_zones = min(rz_data.nr_zones, rz_data.out_nr_zones);
   297	
   298		nr_zones = cpu_to_le64(rz_data.nr_zones);
   299		status = nvmet_copy_to_sgl(req, 0, &nr_zones, sizeof(nr_zones));
   300	
   301	out:
   302		nvmet_req_complete(req, status);
   303	}
   304	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 60393 bytes --]

[-- Attachment #3: Type: text/plain, Size: 158 bytes --]

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [linux-nvme:nvme-5.14 32/32] drivers/nvme/target/zns.c:257:6: warning: no previous prototype for 'nvmet_bdev_zone_zmgmt_recv_work'
@ 2021-06-15 19:45 ` kernel test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-06-15 19:45 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3116 bytes --]

tree:   git://git.infradead.org/nvme.git nvme-5.14
head:   9653e01d9c3c46930da3f007a39a2aaf230bd8ff
commit: 9653e01d9c3c46930da3f007a39a2aaf230bd8ff [32/32] nvmet: add ZBD over ZNS backend support
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git remote add linux-nvme git://git.infradead.org/nvme.git
        git fetch --no-tags linux-nvme nvme-5.14
        git checkout 9653e01d9c3c46930da3f007a39a2aaf230bd8ff
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/nvme/target/zns.c:257:6: warning: no previous prototype for 'nvmet_bdev_zone_zmgmt_recv_work' [-Wmissing-prototypes]
     257 | void nvmet_bdev_zone_zmgmt_recv_work(struct work_struct *w)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/nvmet_bdev_zone_zmgmt_recv_work +257 drivers/nvme/target/zns.c

   256	
 > 257	void nvmet_bdev_zone_zmgmt_recv_work(struct work_struct *w)
   258	{
   259		struct nvmet_req *req = container_of(w, struct nvmet_req, z.zmgmt_work);
   260		sector_t start_sect = nvmet_lba_to_sect(req->ns, req->cmd->zmr.slba);
   261		unsigned long req_slba_nr_zones = nvmet_req_nr_zones_from_slba(req);
   262		u32 out_bufsize = (le32_to_cpu(req->cmd->zmr.numd) + 1) << 2;
   263		__le64 nr_zones;
   264		u16 status;
   265		int ret;
   266		struct nvmet_report_zone_data rz_data = {
   267			.out_nr_zones = get_nr_zones_from_buf(req, out_bufsize),
   268			/* leave the place for report zone header */
   269			.out_buf_offset = sizeof(struct nvme_zone_report),
   270			.zrasf = req->cmd->zmr.zrasf,
   271			.nr_zones = 0,
   272			.req = req,
   273		};
   274	
   275		status = nvmet_bdev_validate_zone_mgmt_recv(req);
   276		if (status)
   277			goto out;
   278	
   279		if (!req_slba_nr_zones) {
   280			status = NVME_SC_SUCCESS;
   281			goto out;
   282		}
   283	
   284		ret = blkdev_report_zones(req->ns->bdev, start_sect, req_slba_nr_zones,
   285					 nvmet_bdev_report_zone_cb, &rz_data);
   286		if (ret < 0) {
   287			status = NVME_SC_INTERNAL;
   288			goto out;
   289		}
   290	
   291		/*
   292		 * When partial bit is set nr_zones must indicate the number of zone
   293		 * descriptors actually transferred.
   294		 */
   295		if (req->cmd->zmr.pr)
   296			rz_data.nr_zones = min(rz_data.nr_zones, rz_data.out_nr_zones);
   297	
   298		nr_zones = cpu_to_le64(rz_data.nr_zones);
   299		status = nvmet_copy_to_sgl(req, 0, &nr_zones, sizeof(nr_zones));
   300	
   301	out:
   302		nvmet_req_complete(req, status);
   303	}
   304	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 60393 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-nvme:nvme-5.14 32/32] drivers/nvme/target/zns.c:257:6: warning: no previous prototype for 'nvmet_bdev_zone_zmgmt_recv_work'
  2021-06-15 19:45 ` kernel test robot
  (?)
  (?)
@ 2021-06-15 20:04 ` Chaitanya Kulkarni
  -1 siblings, 0 replies; 4+ messages in thread
From: Chaitanya Kulkarni @ 2021-06-15 20:04 UTC (permalink / raw)
  To: kernel test robot
  Cc: kbuild-all, linux-nvme, Christoph Hellwig, Damien Le Moal

On 6/15/21 12:46, kernel test robot wrote:
> tree:   git://git.infradead.org/nvme.git nvme-5.14
> head:   9653e01d9c3c46930da3f007a39a2aaf230bd8ff
> commit: 9653e01d9c3c46930da3f007a39a2aaf230bd8ff [32/32] nvmet: add ZBD over ZNS backend support
> config: m68k-allmodconfig (attached as .config)
> compiler: m68k-linux-gcc (GCC) 9.3.0
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         git remote add linux-nvme git://git.infradead.org/nvme.git
>         git fetch --no-tags linux-nvme nvme-5.14
>         git checkout 9653e01d9c3c46930da3f007a39a2aaf230bd8ff
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k 
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All warnings (new ones prefixed by >>):
>
>>> drivers/nvme/target/zns.c:257:6: warning: no previous prototype for 'nvmet_bdev_zone_zmgmt_recv_work' [-Wmissing-prototypes]
>      257 | void nvmet_bdev_zone_zmgmt_recv_work(struct work_struct *w)
>          |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
> vim +/nvmet_bdev_zone_zmgmt_recv_work +257 drivers/nvme/target/zns.c
>
>    256	
>  > 257	void nvmet_bdev_zone_zmgmt_recv_work(struct work_struct *w)
>    258	{
>    259		struct nvmet_req *req = container_of(w, struct nvmet_req, z.zmgmt_work);
>    260		sector_t start_sect = nvmet_lba_to_sect(req->ns, req->cmd->zmr.slba);
>    261		unsigned long req_slba_nr_zones = nvmet_req_nr_zones_from_slba(req);
>    262		u32 out_bufsize = (le32_to_cpu(req->cmd->zmr.numd) + 1) << 2;
>    263		__le64 nr_zones;
>    264		u16 status;
>    265		int ret;
>    266		struct nvmet_report_zone_data rz_data = {
>    267			.out_nr_zones = get_nr_zones_from_buf(req, out_bufsize),
>    268			/* leave the place for report zone header */
>    269			.out_buf_offset = sizeof(struct nvme_zone_report),
>    270			.zrasf = req->cmd->zmr.zrasf,
>    271			.nr_zones = 0,
>    272			.req = req,
>    273		};
>    274	
>    275		status = nvmet_bdev_validate_zone_mgmt_recv(req);
>    276		if (status)
>    277			goto out;
>    278	
>    279		if (!req_slba_nr_zones) {
>    280			status = NVME_SC_SUCCESS;
>    281			goto out;
>    282		}
>    283	
>    284		ret = blkdev_report_zones(req->ns->bdev, start_sect, req_slba_nr_zones,
>    285					 nvmet_bdev_report_zone_cb, &rz_data);
>    286		if (ret < 0) {
>    287			status = NVME_SC_INTERNAL;
>    288			goto out;
>    289		}
>    290	
>    291		/*
>    292		 * When partial bit is set nr_zones must indicate the number of zone
>    293		 * descriptors actually transferred.
>    294		 */
>    295		if (req->cmd->zmr.pr)
>    296			rz_data.nr_zones = min(rz_data.nr_zones, rz_data.out_nr_zones);
>    297	
>    298		nr_zones = cpu_to_le64(rz_data.nr_zones);
>    299		status = nvmet_copy_to_sgl(req, 0, &nr_zones, sizeof(nr_zones));
>    300	
>    301	out:
>    302		nvmet_req_complete(req, status);
>    303	}
>    304	
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

I don't understand why does this need a prototype ?

The function nvmet_bdev_zone_zmgmt_recv_work() is defined  (line 257)
before it was used (line 307).

Will try and reproduce this on latest 5.14.





_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-nvme:nvme-5.14 32/32] drivers/nvme/target/zns.c:257:6: warning: no previous prototype for 'nvmet_bdev_zone_zmgmt_recv_work'
  2021-06-15 19:45 ` kernel test robot
  (?)
@ 2021-06-15 20:04 ` Chaitanya Kulkarni
  -1 siblings, 0 replies; 4+ messages in thread
From: Chaitanya Kulkarni @ 2021-06-15 20:04 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3525 bytes --]

On 6/15/21 12:46, kernel test robot wrote:
> tree:   git://git.infradead.org/nvme.git nvme-5.14
> head:   9653e01d9c3c46930da3f007a39a2aaf230bd8ff
> commit: 9653e01d9c3c46930da3f007a39a2aaf230bd8ff [32/32] nvmet: add ZBD over ZNS backend support
> config: m68k-allmodconfig (attached as .config)
> compiler: m68k-linux-gcc (GCC) 9.3.0
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         git remote add linux-nvme git://git.infradead.org/nvme.git
>         git fetch --no-tags linux-nvme nvme-5.14
>         git checkout 9653e01d9c3c46930da3f007a39a2aaf230bd8ff
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k 
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All warnings (new ones prefixed by >>):
>
>>> drivers/nvme/target/zns.c:257:6: warning: no previous prototype for 'nvmet_bdev_zone_zmgmt_recv_work' [-Wmissing-prototypes]
>      257 | void nvmet_bdev_zone_zmgmt_recv_work(struct work_struct *w)
>          |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
> vim +/nvmet_bdev_zone_zmgmt_recv_work +257 drivers/nvme/target/zns.c
>
>    256	
>  > 257	void nvmet_bdev_zone_zmgmt_recv_work(struct work_struct *w)
>    258	{
>    259		struct nvmet_req *req = container_of(w, struct nvmet_req, z.zmgmt_work);
>    260		sector_t start_sect = nvmet_lba_to_sect(req->ns, req->cmd->zmr.slba);
>    261		unsigned long req_slba_nr_zones = nvmet_req_nr_zones_from_slba(req);
>    262		u32 out_bufsize = (le32_to_cpu(req->cmd->zmr.numd) + 1) << 2;
>    263		__le64 nr_zones;
>    264		u16 status;
>    265		int ret;
>    266		struct nvmet_report_zone_data rz_data = {
>    267			.out_nr_zones = get_nr_zones_from_buf(req, out_bufsize),
>    268			/* leave the place for report zone header */
>    269			.out_buf_offset = sizeof(struct nvme_zone_report),
>    270			.zrasf = req->cmd->zmr.zrasf,
>    271			.nr_zones = 0,
>    272			.req = req,
>    273		};
>    274	
>    275		status = nvmet_bdev_validate_zone_mgmt_recv(req);
>    276		if (status)
>    277			goto out;
>    278	
>    279		if (!req_slba_nr_zones) {
>    280			status = NVME_SC_SUCCESS;
>    281			goto out;
>    282		}
>    283	
>    284		ret = blkdev_report_zones(req->ns->bdev, start_sect, req_slba_nr_zones,
>    285					 nvmet_bdev_report_zone_cb, &rz_data);
>    286		if (ret < 0) {
>    287			status = NVME_SC_INTERNAL;
>    288			goto out;
>    289		}
>    290	
>    291		/*
>    292		 * When partial bit is set nr_zones must indicate the number of zone
>    293		 * descriptors actually transferred.
>    294		 */
>    295		if (req->cmd->zmr.pr)
>    296			rz_data.nr_zones = min(rz_data.nr_zones, rz_data.out_nr_zones);
>    297	
>    298		nr_zones = cpu_to_le64(rz_data.nr_zones);
>    299		status = nvmet_copy_to_sgl(req, 0, &nr_zones, sizeof(nr_zones));
>    300	
>    301	out:
>    302		nvmet_req_complete(req, status);
>    303	}
>    304	
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

I don't understand why does this need a prototype ?

The function nvmet_bdev_zone_zmgmt_recv_work() is defined  (line 257)
before it was used (line 307).

Will try and reproduce this on latest 5.14.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-06-15 22:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-15 19:45 [linux-nvme:nvme-5.14 32/32] drivers/nvme/target/zns.c:257:6: warning: no previous prototype for 'nvmet_bdev_zone_zmgmt_recv_work' kernel test robot
2021-06-15 19:45 ` kernel test robot
2021-06-15 20:04 ` Chaitanya Kulkarni
2021-06-15 20:04 ` Chaitanya Kulkarni

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.