[linux-nvme:nvme-6.2 30/41] drivers/nvme/target/../host/nvme.h:1030:12: warning: no previous prototype for 'nvme_init_auth'

Sagi Grimberg sagi at grimberg.me
Tue Nov 15 06:36:09 PST 2022



On 11/15/22 16:21, kernel test robot wrote:
> tree:   git://git.infradead.org/nvme.git nvme-6.2
> head:   e2deb6d1a5b2dcff71f429a64fb516186aa0382c
> commit: be6cfb9fa889e8c636287335d85ebe89a74f17b2 [30/41] nvme-auth: guarantee dhchap buffers under memory pressure
> config: x86_64-rhel-8.3-syz
> compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
> reproduce (this is a W=1 build):
>          git remote add linux-nvme git://git.infradead.org/nvme.git
>          git fetch --no-tags linux-nvme nvme-6.2
>          git checkout be6cfb9fa889e8c636287335d85ebe89a74f17b2
>          # save the config file
>          mkdir build_dir && cp config build_dir/.config
>          make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/nvme/
> 
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp at intel.com>

Sent a fix.
Thanks.

> 
> All warnings (new ones prefixed by >>):
> 
>     In file included from drivers/nvme/target/loop.c:13:
>>> drivers/nvme/target/../host/nvme.h:1030:12: warning: no previous prototype for 'nvme_init_auth' [-Wmissing-prototypes]
>      1030 | int __init nvme_init_auth(void)
>           |            ^~~~~~~~~~~~~~
>>> drivers/nvme/target/../host/nvme.h:1034:13: warning: no previous prototype for 'nvme_exit_auth' [-Wmissing-prototypes]
>      1034 | void __exit nvme_exit_auth(void) {};
>           |             ^~~~~~~~~~~~~~
> 
> 
> vim +/nvme_init_auth +1030 drivers/nvme/target/../host/nvme.h
> 
>    1019	
>    1020	#ifdef CONFIG_NVME_AUTH
>    1021	int __init nvme_init_auth(void);
>    1022	void __exit nvme_exit_auth(void);
>    1023	int nvme_auth_init_ctrl(struct nvme_ctrl *ctrl);
>    1024	void nvme_auth_stop(struct nvme_ctrl *ctrl);
>    1025	int nvme_auth_negotiate(struct nvme_ctrl *ctrl, int qid);
>    1026	int nvme_auth_wait(struct nvme_ctrl *ctrl, int qid);
>    1027	void nvme_auth_reset(struct nvme_ctrl *ctrl);
>    1028	void nvme_auth_free(struct nvme_ctrl *ctrl);
>    1029	#else
>> 1030	int __init nvme_init_auth(void)
>    1031	{
>    1032		return 0;
>    1033	}
>> 1034	void __exit nvme_exit_auth(void) {};
>    1035	static inline void nvme_auth_init_ctrl(struct nvme_ctrl *ctrl) {};
>    1036	static inline void nvme_auth_stop(struct nvme_ctrl *ctrl) {};
>    1037	static inline int nvme_auth_negotiate(struct nvme_ctrl *ctrl, int qid)
>    1038	{
>    1039		return -EPROTONOSUPPORT;
>    1040	}
>    1041	static inline int nvme_auth_wait(struct nvme_ctrl *ctrl, int qid)
>    1042	{
>    1043		return NVME_SC_AUTH_REQUIRED;
>    1044	}
>    1045	static inline void nvme_auth_free(struct nvme_ctrl *ctrl) {};
>    1046	#endif
>    1047	
> 



More information about the Linux-nvme mailing list