[PATCH] nvmet: mark zmgmt recv work function static

Chaitanya Kulkarni chaitanya.kulkarni at wdc.com
Tue Jun 15 17:18:43 PDT 2021


The function nvmet_bdev_zone_zmgmt_recv_work() is only used in
target/zns.c. Mark this function static to avoid compiler warning :-

>> 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)
         |

Reported-by: kernel test robot <lkp at intel.com>
Fixes: 9653e01d9c3c ("nvmet: add ZBD over ZNS backend support")
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
---
 drivers/nvme/target/zns.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/target/zns.c b/drivers/nvme/target/zns.c
index b8ff75293e53..c4be4012c4d4 100644
--- a/drivers/nvme/target/zns.c
+++ b/drivers/nvme/target/zns.c
@@ -254,7 +254,7 @@ static unsigned long get_nr_zones_from_buf(struct nvmet_req *req, u32 bufsize)
 		sizeof(struct nvme_zone_descriptor);
 }
 
-void nvmet_bdev_zone_zmgmt_recv_work(struct work_struct *w)
+static void nvmet_bdev_zone_zmgmt_recv_work(struct work_struct *w)
 {
 	struct nvmet_req *req = container_of(w, struct nvmet_req, z.zmgmt_work);
 	sector_t start_sect = nvmet_lba_to_sect(req->ns, req->cmd->zmr.slba);
-- 
2.22.1




More information about the Linux-nvme mailing list