[hare-scsi-devel:auth.v2 7/12] drivers/nvme/target/nvmet.h:728:58: sparse: sparse: incorrect type in return expression (different base types)
From: kernel test robot
Date: Tue Jul 13 2021 - 03:58:35 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git auth.v2
head: 9107ea4a3526c6801b38b7a2345b7372278a35ba
commit: ca7a6b4cc19e4383ec693c75bb5c6f678b692a14 [7/12] nvmet: Implement basic In-Band Authentication
config: i386-randconfig-s001-20210713 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git/commit/?id=ca7a6b4cc19e4383ec693c75bb5c6f678b692a14
git remote add hare-scsi-devel https://git.kernel.org/pub/scm/linux/kernel/git/hare/scsi-devel.git
git fetch --no-tags hare-scsi-devel auth.v2
git checkout ca7a6b4cc19e4383ec693c75bb5c6f678b692a14
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
sparse warnings: (new ones prefixed by >>)
drivers/nvme/target/trace.c: note: in included file (through drivers/nvme/target/trace.h):
>> drivers/nvme/target/nvmet.h:728:58: sparse: sparse: incorrect type in return expression (different base types) @@ expected char @@ got void * @@
drivers/nvme/target/nvmet.h:728:58: sparse: expected char
drivers/nvme/target/nvmet.h:728:58: sparse: got void *
drivers/nvme/target/nvmet.h:728:12: sparse: sparse: symbol 'nvmet_dhchap_dhgroup_name' was not declared. Should it be static?
--
drivers/nvme/target/io-cmd-bdev.c: note: in included file:
>> drivers/nvme/target/nvmet.h:728:58: sparse: sparse: incorrect type in return expression (different base types) @@ expected char @@ got void * @@
drivers/nvme/target/nvmet.h:728:58: sparse: expected char
drivers/nvme/target/nvmet.h:728:58: sparse: got void *
drivers/nvme/target/nvmet.h:728:12: sparse: sparse: symbol 'nvmet_dhchap_dhgroup_name' was not declared. Should it be static?
--
drivers/nvme/target/discovery.c: note: in included file:
>> drivers/nvme/target/nvmet.h:728:58: sparse: sparse: incorrect type in return expression (different base types) @@ expected char @@ got void * @@
drivers/nvme/target/nvmet.h:728:58: sparse: expected char
drivers/nvme/target/nvmet.h:728:58: sparse: got void *
drivers/nvme/target/nvmet.h:728:12: sparse: sparse: symbol 'nvmet_dhchap_dhgroup_name' was not declared. Should it be static?
--
drivers/nvme/target/io-cmd-file.c: note: in included file:
>> drivers/nvme/target/nvmet.h:728:58: sparse: sparse: incorrect type in return expression (different base types) @@ expected char @@ got void * @@
drivers/nvme/target/nvmet.h:728:58: sparse: expected char
drivers/nvme/target/nvmet.h:728:58: sparse: got void *
drivers/nvme/target/nvmet.h:728:12: sparse: sparse: symbol 'nvmet_dhchap_dhgroup_name' was not declared. Should it be static?
--
drivers/nvme/target/admin-cmd.c: note: in included file:
>> drivers/nvme/target/nvmet.h:728:58: sparse: sparse: incorrect type in return expression (different base types) @@ expected char @@ got void * @@
drivers/nvme/target/nvmet.h:728:58: sparse: expected char
drivers/nvme/target/nvmet.h:728:58: sparse: got void *
drivers/nvme/target/nvmet.h:728:12: sparse: sparse: symbol 'nvmet_dhchap_dhgroup_name' was not declared. Should it be static?
--
drivers/nvme/target/zns.c: note: in included file:
>> drivers/nvme/target/nvmet.h:728:58: sparse: sparse: incorrect type in return expression (different base types) @@ expected char @@ got void * @@
drivers/nvme/target/nvmet.h:728:58: sparse: expected char
drivers/nvme/target/nvmet.h:728:58: sparse: got void *
drivers/nvme/target/nvmet.h:728:12: sparse: sparse: symbol 'nvmet_dhchap_dhgroup_name' was not declared. Should it be static?
--
drivers/nvme/target/passthru.c: note: in included file:
>> drivers/nvme/target/nvmet.h:728:58: sparse: sparse: incorrect type in return expression (different base types) @@ expected char @@ got void * @@
drivers/nvme/target/nvmet.h:728:58: sparse: expected char
drivers/nvme/target/nvmet.h:728:58: sparse: got void *
drivers/nvme/target/nvmet.h:728:12: sparse: sparse: symbol 'nvmet_dhchap_dhgroup_name' was not declared. Should it be static?
--
drivers/nvme/target/configfs.c: note: in included file:
>> drivers/nvme/target/nvmet.h:728:58: sparse: sparse: incorrect type in return expression (different base types) @@ expected char @@ got void * @@
drivers/nvme/target/nvmet.h:728:58: sparse: expected char
drivers/nvme/target/nvmet.h:728:58: sparse: got void *
drivers/nvme/target/nvmet.h:728:12: sparse: sparse: symbol 'nvmet_dhchap_dhgroup_name' was not declared. Should it be static?
--
drivers/nvme/target/loop.c: note: in included file:
>> drivers/nvme/target/nvmet.h:728:58: sparse: sparse: incorrect type in return expression (different base types) @@ expected char @@ got void * @@
drivers/nvme/target/nvmet.h:728:58: sparse: expected char
drivers/nvme/target/nvmet.h:728:58: sparse: got void *
drivers/nvme/target/nvmet.h:728:12: sparse: sparse: symbol 'nvmet_dhchap_dhgroup_name' was not declared. Should it be static?
--
drivers/nvme/target/core.c: note: in included file (through drivers/nvme/target/trace.h):
>> drivers/nvme/target/nvmet.h:728:58: sparse: sparse: incorrect type in return expression (different base types) @@ expected char @@ got void * @@
drivers/nvme/target/nvmet.h:728:58: sparse: expected char
drivers/nvme/target/nvmet.h:728:58: sparse: got void *
drivers/nvme/target/nvmet.h:728:12: sparse: sparse: symbol 'nvmet_dhchap_dhgroup_name' was not declared. Should it be static?
vim +728 drivers/nvme/target/nvmet.h
687
688 #ifdef CONFIG_NVME_TARGET_AUTH
689 void nvmet_execute_auth_send(struct nvmet_req *req);
690 void nvmet_execute_auth_receive(struct nvmet_req *req);
691 int nvmet_auth_set_host_key(struct nvmet_host *host, const char *secret);
692 int nvmet_auth_set_host_hash(struct nvmet_host *host, const char *hash);
693 int nvmet_auth_get_hash(struct nvmet_ctrl *ctrl, unsigned int *hash_len);
694 const char *nvmet_auth_hmac_name(int hmac_id);
695 int nvmet_auth_set_host_dhgroup(struct nvmet_host *host, const char *hash);
696 const char *nvmet_auth_get_host_dhgroup(struct nvmet_host *host);
697 int nvmet_setup_auth(struct nvmet_ctrl *ctrl, struct nvmet_req *req);
698 void nvmet_reset_auth(struct nvmet_ctrl *ctrl);
699 int nvmet_setup_dhgroup(struct nvmet_ctrl *ctrl, int dhgroup_id);
700 bool nvmet_check_auth_status(struct nvmet_req *req);
701 int nvmet_auth_host_hash(struct nvmet_req *req, u8 *response,
702 unsigned int hash_len);
703 int nvmet_auth_ctrl_hash(struct nvmet_req *req, u8 *response,
704 unsigned int hash_len);
705 static inline bool nvmet_has_auth(struct nvmet_ctrl *ctrl)
706 {
707 return ctrl->shash_tfm != NULL;
708 }
709 const char *nvmet_dhchap_dhgroup_name(int dhgid);
710 int nvmet_auth_ctrl_exponential(struct nvmet_req *req,
711 u8 *buf, int buf_size);
712 int nvmet_auth_ctrl_sesskey(struct nvmet_req *req,
713 u8 *buf, int buf_size);
714 #else
715 static inline int nvmet_setup_auth(struct nvmet_ctrl *ctrl, struct nvmet_req *req)
716 {
717 return 0;
718 }
719 static inline void nvmet_reset_auth(struct nvmet_ctrl *ctrl) {};
720 static inline bool nvmet_check_auth_status(struct nvmet_req *req)
721 {
722 return true;
723 }
724 static inline bool nvmet_has_auth(struct nvmet_ctrl *ctrl)
725 {
726 return false;
727 }
> 728 const char nvmet_dhchap_dhgroup_name(int dhgid) { return NULL; }
729 #endif
730
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip