Messages in this thread | | | Date | Fri, 13 Aug 2021 07:07:23 +0800 | From | kernel test robot <> | Subject | drivers/scsi/elx/libefc/efc_device.c:932:6: warning: cast to smaller integer type 'enum efc_nport_topology' from 'void *' |
| |
Hi James,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: f8fbb47c6e86c0b75f8df864db702c3e3f757361 commit: ebc076b3eddc807729bd81f7bc48e798a3ddc477 scsi: elx: efct: Tie into kernel Kconfig and build process date: 8 weeks ago config: x86_64-randconfig-a004-20210813 (attached as .config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 767496d19cb9a1fbba57ff08095faa161998ee36) 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 # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ebc076b3eddc807729bd81f7bc48e798a3ddc477 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout ebc076b3eddc807729bd81f7bc48e798a3ddc477 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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/scsi/elx/libefc/efc_device.c:932:6: warning: cast to smaller integer type 'enum efc_nport_topology' from 'void *' [-Wvoid-pointer-to-enum-cast] (enum efc_nport_topology)arg; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated.
vim +932 drivers/scsi/elx/libefc/efc_device.c
202bfdffae27a5 James Smart 2021-06-01 909 202bfdffae27a5 James Smart 2021-06-01 910 void 202bfdffae27a5 James Smart 2021-06-01 911 __efc_d_wait_topology_notify(struct efc_sm_ctx *ctx, 202bfdffae27a5 James Smart 2021-06-01 912 enum efc_sm_event evt, void *arg) 202bfdffae27a5 James Smart 2021-06-01 913 { 202bfdffae27a5 James Smart 2021-06-01 914 int rc; 202bfdffae27a5 James Smart 2021-06-01 915 struct efc_node *node = ctx->app; 202bfdffae27a5 James Smart 2021-06-01 916 202bfdffae27a5 James Smart 2021-06-01 917 efc_node_evt_set(ctx, evt, __func__); 202bfdffae27a5 James Smart 2021-06-01 918 202bfdffae27a5 James Smart 2021-06-01 919 node_sm_trace(); 202bfdffae27a5 James Smart 2021-06-01 920 202bfdffae27a5 James Smart 2021-06-01 921 switch (evt) { 202bfdffae27a5 James Smart 2021-06-01 922 case EFC_EVT_ENTER: 202bfdffae27a5 James Smart 2021-06-01 923 efc_node_hold_frames(node); 202bfdffae27a5 James Smart 2021-06-01 924 break; 202bfdffae27a5 James Smart 2021-06-01 925 202bfdffae27a5 James Smart 2021-06-01 926 case EFC_EVT_EXIT: 202bfdffae27a5 James Smart 2021-06-01 927 efc_node_accept_frames(node); 202bfdffae27a5 James Smart 2021-06-01 928 break; 202bfdffae27a5 James Smart 2021-06-01 929 202bfdffae27a5 James Smart 2021-06-01 930 case EFC_EVT_NPORT_TOPOLOGY_NOTIFY: { 202bfdffae27a5 James Smart 2021-06-01 931 enum efc_nport_topology topology = 202bfdffae27a5 James Smart 2021-06-01 @932 (enum efc_nport_topology)arg; 202bfdffae27a5 James Smart 2021-06-01 933 202bfdffae27a5 James Smart 2021-06-01 934 WARN_ON(node->nport->domain->attached); 202bfdffae27a5 James Smart 2021-06-01 935 202bfdffae27a5 James Smart 2021-06-01 936 WARN_ON(node->send_ls_acc != EFC_NODE_SEND_LS_ACC_PLOGI); 202bfdffae27a5 James Smart 2021-06-01 937 202bfdffae27a5 James Smart 2021-06-01 938 node_printf(node, "topology notification, topology=%d\n", 202bfdffae27a5 James Smart 2021-06-01 939 topology); 202bfdffae27a5 James Smart 2021-06-01 940 202bfdffae27a5 James Smart 2021-06-01 941 /* At the time the PLOGI was received, the topology was unknown, 202bfdffae27a5 James Smart 2021-06-01 942 * so we didn't know which node would perform the domain attach: 202bfdffae27a5 James Smart 2021-06-01 943 * 1. The node from which the PLOGI was sent (p2p) or 202bfdffae27a5 James Smart 2021-06-01 944 * 2. The node to which the FLOGI was sent (fabric). 202bfdffae27a5 James Smart 2021-06-01 945 */ 202bfdffae27a5 James Smart 2021-06-01 946 if (topology == EFC_NPORT_TOPO_P2P) { 202bfdffae27a5 James Smart 2021-06-01 947 /* if this is p2p, need to attach to the domain using 202bfdffae27a5 James Smart 2021-06-01 948 * the d_id from the PLOGI received 202bfdffae27a5 James Smart 2021-06-01 949 */ 202bfdffae27a5 James Smart 2021-06-01 950 efc_domain_attach(node->nport->domain, 202bfdffae27a5 James Smart 2021-06-01 951 node->ls_acc_did); 202bfdffae27a5 James Smart 2021-06-01 952 } 202bfdffae27a5 James Smart 2021-06-01 953 /* else, if this is fabric, the domain attach 202bfdffae27a5 James Smart 2021-06-01 954 * should be performed by the fabric node (node sending FLOGI); 202bfdffae27a5 James Smart 2021-06-01 955 * just wait for attach to complete 202bfdffae27a5 James Smart 2021-06-01 956 */ 202bfdffae27a5 James Smart 2021-06-01 957 202bfdffae27a5 James Smart 2021-06-01 958 efc_node_transition(node, __efc_d_wait_domain_attach, NULL); 202bfdffae27a5 James Smart 2021-06-01 959 break; 202bfdffae27a5 James Smart 2021-06-01 960 } 202bfdffae27a5 James Smart 2021-06-01 961 case EFC_EVT_DOMAIN_ATTACH_OK: 202bfdffae27a5 James Smart 2021-06-01 962 WARN_ON(!node->nport->domain->attached); 202bfdffae27a5 James Smart 2021-06-01 963 node_printf(node, "domain attach ok\n"); 202bfdffae27a5 James Smart 2021-06-01 964 /* sm: / efc_node_attach */ 202bfdffae27a5 James Smart 2021-06-01 965 rc = efc_node_attach(node); 202bfdffae27a5 James Smart 2021-06-01 966 efc_node_transition(node, __efc_d_wait_node_attach, NULL); 202bfdffae27a5 James Smart 2021-06-01 967 if (rc < 0) 202bfdffae27a5 James Smart 2021-06-01 968 efc_node_post_event(node, 202bfdffae27a5 James Smart 2021-06-01 969 EFC_EVT_NODE_ATTACH_FAIL, NULL); 202bfdffae27a5 James Smart 2021-06-01 970 202bfdffae27a5 James Smart 2021-06-01 971 break; 202bfdffae27a5 James Smart 2021-06-01 972 202bfdffae27a5 James Smart 2021-06-01 973 default: 202bfdffae27a5 James Smart 2021-06-01 974 __efc_d_common(__func__, ctx, evt, arg); 202bfdffae27a5 James Smart 2021-06-01 975 } 202bfdffae27a5 James Smart 2021-06-01 976 } 202bfdffae27a5 James Smart 2021-06-01 977
:::::: The code at line 932 was first introduced by commit :::::: 202bfdffae27a50d6fae0a259cde1333d9833127 scsi: elx: libefc: FC node ELS and state handling
:::::: TO: James Smart <jsmart2021@gmail.com> :::::: CC: Martin K. Petersen <martin.petersen@oracle.com>
--- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org [unhandled content-type:application/gzip] | |