* [hare-nvme:tls.v13 17/19] drivers/nvme/target/configfs.c:1881:19: error: call to undeclared function 'key_lookup'; ISO C99 and later do not support implicit function declarations
@ 2023-08-14 18:19 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-08-14 18:19 UTC (permalink / raw)
To: Hannes Reinecke; +Cc: llvm, oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/hare/nvme.git tls.v13
head: ce525e34ae9d3f5ed12f23caea57c0aa2e8359ee
commit: 742a9e6a640d76c3d7cbb647d0da0887857e7d32 [17/19] nvmet-tcp: enable TLS handshake upcall
config: arm-randconfig-r033-20230814 (https://download.01.org/0day-ci/archive/20230815/202308150232.X4uOBipx-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce: (https://download.01.org/0day-ci/archive/20230815/202308150232.X4uOBipx-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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308150232.X4uOBipx-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/nvme/target/configfs.c:1881:19: error: call to undeclared function 'key_lookup'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1881 | port->keyring = key_lookup(nvme_keyring_id());
| ^
>> drivers/nvme/target/configfs.c:1881:17: error: incompatible integer to pointer conversion assigning to 'struct key *' from 'int' [-Wint-conversion]
1881 | port->keyring = key_lookup(nvme_keyring_id());
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
vim +/key_lookup +1881 drivers/nvme/target/configfs.c
1858
1859 static struct config_group *nvmet_ports_make(struct config_group *group,
1860 const char *name)
1861 {
1862 struct nvmet_port *port;
1863 u16 portid;
1864 u32 i;
1865
1866 if (kstrtou16(name, 0, &portid))
1867 return ERR_PTR(-EINVAL);
1868
1869 port = kzalloc(sizeof(*port), GFP_KERNEL);
1870 if (!port)
1871 return ERR_PTR(-ENOMEM);
1872
1873 port->ana_state = kcalloc(NVMET_MAX_ANAGRPS + 1,
1874 sizeof(*port->ana_state), GFP_KERNEL);
1875 if (!port->ana_state) {
1876 kfree(port);
1877 return ERR_PTR(-ENOMEM);
1878 }
1879
1880 if (nvme_keyring_id()) {
> 1881 port->keyring = key_lookup(nvme_keyring_id());
1882 if (IS_ERR(port->keyring)) {
1883 pr_warn("NVMe keyring not available, disabling TLS\n");
1884 port->keyring = NULL;
1885 }
1886 }
1887
1888 for (i = 1; i <= NVMET_MAX_ANAGRPS; i++) {
1889 if (i == NVMET_DEFAULT_ANA_GRPID)
1890 port->ana_state[1] = NVME_ANA_OPTIMIZED;
1891 else
1892 port->ana_state[i] = NVME_ANA_INACCESSIBLE;
1893 }
1894
1895 list_add(&port->global_entry, &nvmet_ports_list);
1896
1897 INIT_LIST_HEAD(&port->entry);
1898 INIT_LIST_HEAD(&port->subsystems);
1899 INIT_LIST_HEAD(&port->referrals);
1900 port->inline_data_size = -1; /* < 0 == let the transport choose */
1901
1902 port->disc_addr.portid = cpu_to_le16(portid);
1903 port->disc_addr.adrfam = NVMF_ADDR_FAMILY_MAX;
1904 port->disc_addr.treq = NVMF_TREQ_DISABLE_SQFLOW;
1905 config_group_init_type_name(&port->group, name, &nvmet_port_type);
1906
1907 config_group_init_type_name(&port->subsys_group,
1908 "subsystems", &nvmet_port_subsys_type);
1909 configfs_add_default_group(&port->subsys_group, &port->group);
1910
1911 config_group_init_type_name(&port->referrals_group,
1912 "referrals", &nvmet_referrals_type);
1913 configfs_add_default_group(&port->referrals_group, &port->group);
1914
1915 config_group_init_type_name(&port->ana_groups_group,
1916 "ana_groups", &nvmet_ana_groups_type);
1917 configfs_add_default_group(&port->ana_groups_group, &port->group);
1918
1919 port->ana_default_group.port = port;
1920 port->ana_default_group.grpid = NVMET_DEFAULT_ANA_GRPID;
1921 config_group_init_type_name(&port->ana_default_group.group,
1922 __stringify(NVMET_DEFAULT_ANA_GRPID),
1923 &nvmet_ana_group_type);
1924 configfs_add_default_group(&port->ana_default_group.group,
1925 &port->ana_groups_group);
1926
1927 return &port->group;
1928 }
1929
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-08-14 18:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-14 18:19 [hare-nvme:tls.v13 17/19] drivers/nvme/target/configfs.c:1881:19: error: call to undeclared function 'key_lookup'; ISO C99 and later do not support implicit function declarations kernel test robot
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.