[jkirsher-next-queue:100GbE 1/15] include/linux/avf/virtchnl.h:809:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_get_capabilities' is not an integer constant
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git 100GbE
head: 411736a35504785d139d04e0a72222d6e4d1c749
commit: d3c6232fa2b0ca4823ca335fc3df7c7f99026727 [1/15] virtchnl: Extend AVF ops
config: i386-randconfig-a014-20200818 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
git checkout d3c6232fa2b0ca4823ca335fc3df7c7f99026727
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/net/ethernet/intel/i40e/i40e_prototype.h:9,
from drivers/net/ethernet/intel/i40e/i40e.h:40,
from drivers/net/ethernet/intel/i40e/i40e_main.c:11:
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:809:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
809 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_get_capabilities);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:809:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_get_capabilities' is not an integer constant
809 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_get_capabilities);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:891:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
891 | VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_txq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:891:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_txq_info_v2' is not an integer constant
891 | VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_txq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:907:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
907 | VIRTCHNL_CHECK_STRUCT_LEN(48, virtchnl_config_tx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:907:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_config_tx_queues' is not an integer constant
907 | VIRTCHNL_CHECK_STRUCT_LEN(48, virtchnl_config_tx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:937:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
937 | VIRTCHNL_CHECK_STRUCT_LEN(72, virtchnl_rxq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:937:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_rxq_info_v2' is not an integer constant
937 | VIRTCHNL_CHECK_STRUCT_LEN(72, virtchnl_rxq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:952:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
952 | VIRTCHNL_CHECK_STRUCT_LEN(80, virtchnl_config_rx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:952:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_config_rx_queues' is not an integer constant
952 | VIRTCHNL_CHECK_STRUCT_LEN(80, virtchnl_config_rx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:1090:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
1090 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_rss_hash);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:1090:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_rss_hash' is not an integer constant
1090 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_rss_hash);
| ^~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
--
In file included from drivers/net/ethernet/intel/ice/ice.h:37,
from drivers/net/ethernet/intel/ice/ice_common.h:7,
from drivers/net/ethernet/intel/ice/ice_flex_pipe.c:4:
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:809:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
809 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_get_capabilities);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:809:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_get_capabilities' is not an integer constant
809 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_get_capabilities);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:891:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
891 | VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_txq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:891:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_txq_info_v2' is not an integer constant
891 | VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_txq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:907:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
907 | VIRTCHNL_CHECK_STRUCT_LEN(48, virtchnl_config_tx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:907:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_config_tx_queues' is not an integer constant
907 | VIRTCHNL_CHECK_STRUCT_LEN(48, virtchnl_config_tx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:937:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
937 | VIRTCHNL_CHECK_STRUCT_LEN(72, virtchnl_rxq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:937:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_rxq_info_v2' is not an integer constant
937 | VIRTCHNL_CHECK_STRUCT_LEN(72, virtchnl_rxq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:952:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
952 | VIRTCHNL_CHECK_STRUCT_LEN(80, virtchnl_config_rx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:952:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_config_rx_queues' is not an integer constant
952 | VIRTCHNL_CHECK_STRUCT_LEN(80, virtchnl_config_rx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:1090:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
1090 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_rss_hash);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:1090:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_rss_hash' is not an integer constant
1090 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_rss_hash);
| ^~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
In file included from drivers/net/ethernet/intel/ice/ice_flex_pipe.c:6:
drivers/net/ethernet/intel/ice/ice_flex_pipe.c: In function 'ice_free_flow_profs':
drivers/net/ethernet/intel/ice/ice_flow.h:197:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
197 | #define ICE_FLOW_ENTRY_HNDL(e) ((u64)e)
| ^
drivers/net/ethernet/intel/ice/ice_flex_pipe.c:2921:9: note: in expansion of macro 'ICE_FLOW_ENTRY_HNDL'
2921 | ICE_FLOW_ENTRY_HNDL(e));
| ^~~~~~~~~~~~~~~~~~~
--
In file included from drivers/net/ethernet/intel/ice/ice.h:37,
from drivers/net/ethernet/intel/ice/ice_common.h:7,
from drivers/net/ethernet/intel/ice/ice_flow.c:4:
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:809:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
809 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_get_capabilities);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:809:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_get_capabilities' is not an integer constant
809 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_get_capabilities);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:891:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
891 | VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_txq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:891:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_txq_info_v2' is not an integer constant
891 | VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_txq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:907:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
907 | VIRTCHNL_CHECK_STRUCT_LEN(48, virtchnl_config_tx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:907:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_config_tx_queues' is not an integer constant
907 | VIRTCHNL_CHECK_STRUCT_LEN(48, virtchnl_config_tx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:937:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
937 | VIRTCHNL_CHECK_STRUCT_LEN(72, virtchnl_rxq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:937:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_rxq_info_v2' is not an integer constant
937 | VIRTCHNL_CHECK_STRUCT_LEN(72, virtchnl_rxq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:952:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
952 | VIRTCHNL_CHECK_STRUCT_LEN(80, virtchnl_config_rx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:952:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_config_rx_queues' is not an integer constant
952 | VIRTCHNL_CHECK_STRUCT_LEN(80, virtchnl_config_rx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:1090:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
1090 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_rss_hash);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:1090:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_rss_hash' is not an integer constant
1090 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_rss_hash);
| ^~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
In file included from drivers/net/ethernet/intel/ice/ice_flow.c:5:
drivers/net/ethernet/intel/ice/ice_flow.c: In function 'ice_flow_add_entry':
drivers/net/ethernet/intel/ice/ice_flow.h:197:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
197 | #define ICE_FLOW_ENTRY_HNDL(e) ((u64)e)
| ^
drivers/net/ethernet/intel/ice/ice_flow.c:946:13: note: in expansion of macro 'ICE_FLOW_ENTRY_HNDL'
946 | *entry_h = ICE_FLOW_ENTRY_HNDL(e);
| ^~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/intel/ice/ice_flow.c: In function 'ice_flow_rem_entry':
drivers/net/ethernet/intel/ice/ice_flow.h:198:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
198 | #define ICE_FLOW_ENTRY_PTR(h) ((struct ice_flow_entry *)(h))
| ^
drivers/net/ethernet/intel/ice/ice_flow.c:974:10: note: in expansion of macro 'ICE_FLOW_ENTRY_PTR'
974 | entry = ICE_FLOW_ENTRY_PTR(entry_h);
| ^~~~~~~~~~~~~~~~~~
--
In file included from drivers/net/ethernet/intel/i40e/i40e_prototype.h:9,
from drivers/net/ethernet/intel/i40e/i40e.h:40,
from drivers/net/ethernet/intel/i40e/i40e_main.c:11:
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:809:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
809 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_get_capabilities);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:809:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_get_capabilities' is not an integer constant
809 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_get_capabilities);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:891:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
891 | VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_txq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:891:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_txq_info_v2' is not an integer constant
891 | VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_txq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:907:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
907 | VIRTCHNL_CHECK_STRUCT_LEN(48, virtchnl_config_tx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:907:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_config_tx_queues' is not an integer constant
907 | VIRTCHNL_CHECK_STRUCT_LEN(48, virtchnl_config_tx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:937:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
937 | VIRTCHNL_CHECK_STRUCT_LEN(72, virtchnl_rxq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:937:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_rxq_info_v2' is not an integer constant
937 | VIRTCHNL_CHECK_STRUCT_LEN(72, virtchnl_rxq_info_v2);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:952:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
952 | VIRTCHNL_CHECK_STRUCT_LEN(80, virtchnl_config_rx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:952:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_config_rx_queues' is not an integer constant
952 | VIRTCHNL_CHECK_STRUCT_LEN(80, virtchnl_config_rx_queues);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:175:36: warning: division by zero [-Wdiv-by-zero]
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:1090:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
1090 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_rss_hash);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:1090:31: error: enumerator value for 'virtchnl_static_assert_virtchnl_rss_hash' is not an integer constant
1090 | VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_rss_hash);
| ^~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:175:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
175 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
In file included from drivers/net/ethernet/intel/i40e/i40e_trace.h:209,
from drivers/net/ethernet/intel/i40e/i40e_main.c:21:
include/trace/define_trace.h:95:42: fatal error: ./i40e_trace.h: No such file or directory
95 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
| ^
compilation terminated.
..
# https://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git/c...
git remote add jkirsher-next-queue https://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
git fetch --no-tags jkirsher-next-queue 100GbE
git checkout d3c6232fa2b0ca4823ca335fc3df7c7f99026727
vim +/virtchnl_static_assert_virtchnl_get_capabilities +809 include/linux/avf/virtchnl.h
808
> 809 VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_get_capabilities);
810
811 /* structure to specify a chunk of contiguous queues */
812 struct virtchnl_queue_chunk {
813 enum virtchnl_queue_type type;
814 u16 start_queue_id;
815 u16 num_queues;
816 };
817
818 VIRTCHNL_CHECK_STRUCT_LEN(8, virtchnl_queue_chunk);
819
820 /* structure to specify several chunks of contiguous queues */
821 struct virtchnl_queue_chunks {
822 u16 num_chunks;
823 u16 rsvd;
824 struct virtchnl_queue_chunk chunks[1];
825 };
826
827 VIRTCHNL_CHECK_STRUCT_LEN(12, virtchnl_queue_chunks);
828
829 /* VIRTCHNL_OP_CREATE_VPORT
830 * PF sends this message to CP to create a vport by filling in the first 8
831 * fields of virtchnl_create_vport structure (vport type, tx, rx queue models
832 * and desired number of queues and vectors). CP responds with the updated
833 * virtchnl_create_vport structure containing the number of assigned queues,
834 * vectors, vport id, max mtu, default mac addr followed by chunks which in turn
835 * will have an array of num_chunks entries of virtchnl_queue_chunk structures.
836 */
837 struct virtchnl_create_vport {
838 enum virtchnl_vport_type vport_type;
839 /* single or split */
840 enum virtchnl_queue_model txq_model;
841 /* single or split */
842 enum virtchnl_queue_model rxq_model;
843 u16 num_tx_q;
844 /* valid only if txq_model is split Q */
845 u16 num_tx_complq;
846 u16 num_rx_q;
847 /* valid only if rxq_model is split Q */
848 u16 num_rx_bufq;
849 u16 vport_id;
850 u16 max_mtu;
851 u8 default_mac_addr[ETH_ALEN];
852 enum virtchnl_rss_algorithm rss_algorithm;
853 u16 rss_key_size;
854 u16 rss_lut_size;
855 u16 qset_handle;
856 struct virtchnl_queue_chunks chunks;
857 };
858
859 VIRTCHNL_CHECK_STRUCT_LEN(56, virtchnl_create_vport);
860
861 /* VIRTCHNL_OP_DESTROY_VPORT
862 * VIRTCHNL_OP_ENABLE_VPORT
863 * VIRTCHNL_OP_DISABLE_VPORT
864 * PF sends this message to CP to destroy, enable or disable a vport by filling
865 * in the vport_id in virtchnl_vport structure.
866 * CP responds with the status of the requested operation.
867 */
868 struct virtchnl_vport {
869 u16 vport_id;
870 };
871
872 VIRTCHNL_CHECK_STRUCT_LEN(2, virtchnl_vport);
873
874 /* Tx queue config info */
875 struct virtchnl_txq_info_v2 {
876 u16 queue_id;
877 /* single or split */
878 enum virtchnl_queue_model model;
879 /* tx or tx_completion */
880 enum virtchnl_queue_type type;
881 /* queue or flow based */
882 enum virtchnl_txq_sched_mode sched_mode;
883 /* base or native */
884 enum virtchnl_desc_profile desc_profile;
885 u16 ring_len;
886 u64 dma_ring_addr;
887 /* valid only if queue model is split and type is tx */
888 u16 tx_compl_queue_id;
889 };
890
> 891 VIRTCHNL_CHECK_STRUCT_LEN(40, virtchnl_txq_info_v2);
892
893 /* VIRTCHNL_OP_CONFIG_TX_QUEUES
894 * PF sends this message to set up parameters for one or more TX queues.
895 * This message contains an array of num_qinfo instances of virtchnl_txq_info_v2
896 * structures. CP configures requested queues and returns a status code. If
897 * num_qinfo specified is greater than the number of queues associated with the
898 * vport, an error is returned and no queues are configured.
899 */
900 struct virtchnl_config_tx_queues {
901 u16 vport_id;
902 u16 num_qinfo;
903 u32 rsvd;
904 struct virtchnl_txq_info_v2 qinfo[1];
905 };
906
> 907 VIRTCHNL_CHECK_STRUCT_LEN(48, virtchnl_config_tx_queues);
908
909 /* Rx queue config info */
910 struct virtchnl_rxq_info_v2 {
911 u16 queue_id;
912 /* single or split */
913 enum virtchnl_queue_model model;
914 /* rx or rx buffer */
915 enum virtchnl_queue_type type;
916 /* base or native */
917 enum virtchnl_desc_profile desc_profile;
918 /* rsc, header-split, immediate write back */
919 u16 queue_flags;
920 /* 16 or 32 byte */
921 enum virtchnl_rxq_desc_size desc_size;
922 u16 ring_len;
923 u16 hdr_buffer_size;
924 u32 data_buffer_size;
925 u32 max_pkt_size;
926 u64 dma_ring_addr;
927 u64 dma_head_wb_addr;
928 u16 rsc_low_watermark;
929 u8 buffer_notif_stride;
930 enum virtchnl_rx_hsplit rx_split_pos;
931 /* valid only if queue model is split and type is rx buffer*/
932 u16 rx_bufq1_id;
933 /* valid only if queue model is split and type is rx buffer*/
934 u16 rx_bufq2_id;
935 };
936
> 937 VIRTCHNL_CHECK_STRUCT_LEN(72, virtchnl_rxq_info_v2);
938
939 /* VIRTCHNL_OP_CONFIG_RX_QUEUES
940 * PF sends this message to set up parameters for one or more RX queues.
941 * This message contains an array of num_qinfo instances of virtchnl_rxq_info_v2
942 * structures. CP configures requested queues and returns a status code.
943 * If the number of queues specified is greater than the number of queues
944 * associated with the vport, an error is returned and no queues are configured.
945 */
946 struct virtchnl_config_rx_queues {
947 u16 vport_id;
948 u16 num_qinfo;
949 struct virtchnl_rxq_info_v2 qinfo[1];
950 };
951
> 952 VIRTCHNL_CHECK_STRUCT_LEN(80, virtchnl_config_rx_queues);
953
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
include/linux/sched/topology.h:237:9: error: implicit declaration of function 'cpu_logical_map'
by kernel test robot
Hi Lukasz,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 18445bf405cb331117bc98427b1ba6f12418ad17
commit: 1bc138c622959979eb547be2d3bbc6442a5c80b0 PM / EM: add support for other devices than CPUs in Energy Model
date: 8 weeks ago
config: mips-randconfig-r013-20200818 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b34b1e38381fa4d1b1d9751a6b5233b68e734cfe)
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
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
git checkout 1bc138c622959979eb547be2d3bbc6442a5c80b0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
clang-12: warning: argument unused during compilation: '-mno-branch-likely' [-Wunused-command-line-argument]
clang-12: warning: argument unused during compilation: '-mno-branch-likely' [-Wunused-command-line-argument]
In file included from arch/mips/kernel/asm-offsets.c:12:
In file included from include/linux/compat.h:15:
In file included from include/linux/socket.h:8:
In file included from include/linux/uio.h:10:
In file included from include/crypto/hash.h:11:
In file included from include/linux/crypto.h:19:
In file included from include/linux/slab.h:15:
In file included from include/linux/gfp.h:9:
include/linux/topology.h:119:9: error: implicit declaration of function 'cpu_logical_map' [-Werror,-Wimplicit-function-declaration]
return cpu_to_node(raw_smp_processor_id());
^
arch/mips/include/asm/mach-loongson64/topology.h:7:27: note: expanded from macro 'cpu_to_node'
#define cpu_to_node(cpu) (cpu_logical_map(cpu) >> 2)
^
In file included from arch/mips/kernel/asm-offsets.c:12:
In file included from include/linux/compat.h:15:
In file included from include/linux/socket.h:8:
In file included from include/linux/uio.h:10:
In file included from include/crypto/hash.h:11:
In file included from include/linux/crypto.h:19:
In file included from include/linux/slab.h:15:
In file included from include/linux/gfp.h:9:
include/linux/topology.h:176:9: error: implicit declaration of function 'cpu_logical_map' [-Werror,-Wimplicit-function-declaration]
return cpu_to_node(cpu);
^
arch/mips/include/asm/mach-loongson64/topology.h:7:27: note: expanded from macro 'cpu_to_node'
#define cpu_to_node(cpu) (cpu_logical_map(cpu) >> 2)
^
In file included from arch/mips/kernel/asm-offsets.c:12:
In file included from include/linux/compat.h:15:
In file included from include/linux/socket.h:8:
In file included from include/linux/uio.h:10:
In file included from include/crypto/hash.h:11:
In file included from include/linux/crypto.h:19:
In file included from include/linux/slab.h:15:
In file included from include/linux/gfp.h:9:
include/linux/topology.h:210:25: error: implicit declaration of function 'cpu_logical_map' [-Werror,-Wimplicit-function-declaration]
return cpumask_of_node(cpu_to_node(cpu));
^
arch/mips/include/asm/mach-loongson64/topology.h:7:27: note: expanded from macro 'cpu_to_node'
#define cpu_to_node(cpu) (cpu_logical_map(cpu) >> 2)
^
In file included from arch/mips/kernel/asm-offsets.c:17:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:11:
In file included from include/linux/node.h:18:
In file included from include/linux/device.h:16:
In file included from include/linux/energy_model.h:10:
>> include/linux/sched/topology.h:237:9: error: implicit declaration of function 'cpu_logical_map' [-Werror,-Wimplicit-function-declaration]
return cpu_to_node(task_cpu(p));
^
arch/mips/include/asm/mach-loongson64/topology.h:7:27: note: expanded from macro 'cpu_to_node'
#define cpu_to_node(cpu) (cpu_logical_map(cpu) >> 2)
^
arch/mips/kernel/asm-offsets.c:26:6: warning: no previous prototype for function 'output_ptreg_defines' [-Wmissing-prototypes]
void output_ptreg_defines(void)
^
arch/mips/kernel/asm-offsets.c:26:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_ptreg_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:78:6: warning: no previous prototype for function 'output_task_defines' [-Wmissing-prototypes]
void output_task_defines(void)
^
arch/mips/kernel/asm-offsets.c:78:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_task_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:93:6: warning: no previous prototype for function 'output_thread_info_defines' [-Wmissing-prototypes]
void output_thread_info_defines(void)
^
arch/mips/kernel/asm-offsets.c:93:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_thread_info_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:110:6: warning: no previous prototype for function 'output_thread_defines' [-Wmissing-prototypes]
void output_thread_defines(void)
^
arch/mips/kernel/asm-offsets.c:110:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_thread_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:138:6: warning: no previous prototype for function 'output_thread_fpu_defines' [-Wmissing-prototypes]
void output_thread_fpu_defines(void)
^
arch/mips/kernel/asm-offsets.c:138:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_thread_fpu_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:181:6: warning: no previous prototype for function 'output_mm_defines' [-Wmissing-prototypes]
void output_mm_defines(void)
^
arch/mips/kernel/asm-offsets.c:181:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_mm_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:242:6: warning: no previous prototype for function 'output_sc_defines' [-Wmissing-prototypes]
void output_sc_defines(void)
^
arch/mips/kernel/asm-offsets.c:242:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_sc_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:255:6: warning: no previous prototype for function 'output_signal_defined' [-Wmissing-prototypes]
void output_signal_defined(void)
^
arch/mips/kernel/asm-offsets.c:255:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_signal_defined(void)
^
static
arch/mips/kernel/asm-offsets.c:334:6: warning: no previous prototype for function 'output_pm_defines' [-Wmissing-prototypes]
void output_pm_defines(void)
^
arch/mips/kernel/asm-offsets.c:334:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_pm_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:348:6: warning: no previous prototype for function 'output_kvm_defines' [-Wmissing-prototypes]
void output_kvm_defines(void)
^
arch/mips/kernel/asm-offsets.c:348:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_kvm_defines(void)
^
static
10 warnings and 4 errors generated.
make[2]: *** [scripts/Makefile.build:114: arch/mips/kernel/asm-offsets.s] Error 1
make[2]: Target 'missing-syscalls' not remade because of errors.
make[1]: *** [arch/mips/Makefile:397: archprepare] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:185: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 1bc138c622959979eb547be2d3bbc6442a5c80b0
vim +/cpu_logical_map +237 include/linux/sched/topology.h
36a0df85d2e85e Thara Gopinath 2020-02-21 234
ee6a3d19f15b9b Ingo Molnar 2017-02-06 235 static inline int task_node(const struct task_struct *p)
ee6a3d19f15b9b Ingo Molnar 2017-02-06 236 {
ee6a3d19f15b9b Ingo Molnar 2017-02-06 @237 return cpu_to_node(task_cpu(p));
ee6a3d19f15b9b Ingo Molnar 2017-02-06 238 }
ee6a3d19f15b9b Ingo Molnar 2017-02-06 239
:::::: The code at line 237 was first introduced by commit
:::::: ee6a3d19f15b9b10075481088b8d4537f286d7b4 sched/headers: Remove the <linux/topology.h> include from <linux/sched.h>
:::::: TO: Ingo Molnar <mingo(a)kernel.org>
:::::: CC: Ingo Molnar <mingo(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
drivers/vdpa/mlx5/core/mr.c:264:21: error: implicit declaration of function '__phys_to_pfn'; did you mean
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 18445bf405cb331117bc98427b1ba6f12418ad17
commit: 94abbccdf2916cb03f9626f2d36c6e9971490c12 vdpa/mlx5: Add shared memory registration code
date: 2 weeks ago
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
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
git checkout 94abbccdf2916cb03f9626f2d36c6e9971490c12
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/ia64/include/asm/ptrace.h:46,
from arch/ia64/include/asm/processor.h:20,
from arch/ia64/include/asm/thread_info.h:12,
from include/linux/thread_info.h:38,
from include/asm-generic/preempt.h:5,
from ./arch/ia64/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from include/linux/vdpa.h:6,
from drivers/vdpa/mlx5/core/mr.c:4:
drivers/vdpa/mlx5/core/mr.c: In function 'map_direct_mr':
>> drivers/vdpa/mlx5/core/mr.c:264:21: error: implicit declaration of function '__phys_to_pfn'; did you mean 'page_to_pfn'? [-Werror=implicit-function-declaration]
264 | pg = pfn_to_page(__phys_to_pfn(pa));
| ^~~~~~~~~~~~~
arch/ia64/include/asm/page.h:108:40: note: in definition of macro 'pfn_to_page'
108 | # define pfn_to_page(pfn) (vmem_map + (pfn))
| ^~~
cc1: some warnings being treated as errors
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 94abbccdf2916cb03f9626f2d36c6e9971490c12
vim +264 drivers/vdpa/mlx5/core/mr.c
225
226 static int map_direct_mr(struct mlx5_vdpa_dev *mvdev, struct mlx5_vdpa_direct_mr *mr,
227 struct vhost_iotlb *iotlb)
228 {
229 struct vhost_iotlb_map *map;
230 unsigned long lgcd = 0;
231 int log_entity_size;
232 unsigned long size;
233 u64 start = 0;
234 int err;
235 struct page *pg;
236 unsigned int nsg;
237 int sglen;
238 u64 pa;
239 u64 paend;
240 struct scatterlist *sg;
241 struct device *dma = mvdev->mdev->device;
242 int ret;
243
244 for (map = vhost_iotlb_itree_first(iotlb, mr->start, mr->end - 1);
245 map; map = vhost_iotlb_itree_next(map, start, mr->end - 1)) {
246 size = maplen(map, mr);
247 lgcd = gcd(lgcd, size);
248 start += size;
249 }
250 log_entity_size = ilog2(lgcd);
251
252 sglen = 1 << log_entity_size;
253 nsg = MLX5_DIV_ROUND_UP_POW2(mr->end - mr->start, log_entity_size);
254
255 err = sg_alloc_table(&mr->sg_head, nsg, GFP_KERNEL);
256 if (err)
257 return err;
258
259 sg = mr->sg_head.sgl;
260 for (map = vhost_iotlb_itree_first(iotlb, mr->start, mr->end - 1);
261 map; map = vhost_iotlb_itree_next(map, mr->start, mr->end - 1)) {
262 paend = map->addr + maplen(map, mr);
263 for (pa = map->addr; pa < paend; pa += sglen) {
> 264 pg = pfn_to_page(__phys_to_pfn(pa));
265 if (!sg) {
266 mlx5_vdpa_warn(mvdev, "sg null. start 0x%llx, end 0x%llx\n",
267 map->start, map->last + 1);
268 err = -ENOMEM;
269 goto err_map;
270 }
271 sg_set_page(sg, pg, sglen, 0);
272 sg = sg_next(sg);
273 if (!sg)
274 goto done;
275 }
276 }
277 done:
278 mr->log_size = log_entity_size;
279 mr->nsg = nsg;
280 ret = dma_map_sg_attrs(dma, mr->sg_head.sgl, mr->nsg, DMA_BIDIRECTIONAL, 0);
281 if (!ret)
282 goto err_map;
283
284 err = create_direct_mr(mvdev, mr);
285 if (err)
286 goto err_direct;
287
288 return 0;
289
290 err_direct:
291 dma_unmap_sg_attrs(dma, mr->sg_head.sgl, mr->nsg, DMA_BIDIRECTIONAL, 0);
292 err_map:
293 sg_free_table(&mr->sg_head);
294 return err;
295 }
296
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
Re: [PATCH 19/28] dma-mapping: replace DMA_ATTR_NON_CONSISTENT with dma_{alloc,free}_pages
by kernel test robot
Hi Christoph,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linuxtv-media/master]
[also build test WARNING on mkp-scsi/for-next scsi/for-next linus/master v5.9-rc1 next-20200819]
[cannot apply to mmotm/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Christoph-Hellwig/mm-turn-alloc_...
base: git://linuxtv.org/media_tree.git master
config: i386-randconfig-s001-20200819 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-183-gaa6ede3b-dirty
# 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(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/scsi/53c700.c:304:42: sparse: sparse: incorrect type in argument 4 (different base types) @@ expected unsigned int enum dma_data_direction dir @@ got restricted gfp_t @@
>> drivers/scsi/53c700.c:304:42: sparse: expected unsigned int enum dma_data_direction dir
>> drivers/scsi/53c700.c:304:42: sparse: got restricted gfp_t
drivers/scsi/53c700.c:354:29: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/53c700.c:358:43: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/53c700.c:360:9: sparse: sparse: cast to restricted __le32
drivers/scsi/53c700.c:360:9: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/53c700.c:362:9: sparse: sparse: cast to restricted __le32
drivers/scsi/53c700.c:362:9: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/53c700.c:364:9: sparse: sparse: cast to restricted __le32
drivers/scsi/53c700.c:364:9: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/53c700.c:830:25: sparse: sparse: cast to restricted __le32
drivers/scsi/53c700.c:830:25: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/53c700.c:843:17: sparse: sparse: cast to restricted __le32
drivers/scsi/53c700.c:843:17: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/53c700.c:857:17: sparse: sparse: cast to restricted __le32
drivers/scsi/53c700.c:857:17: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/53c700.c:941:17: sparse: sparse: cast to restricted __le32
drivers/scsi/53c700.c:941:17: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/53c700.c:1025:51: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/53c700.c:1026:53: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/53c700.c:1027:51: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/53c700.c:1151:25: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/53c700.c:1153:25: sparse: sparse: cast to restricted __le32
drivers/scsi/53c700.c:1153:25: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/53c700.c:1155:25: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/53c700.c:1200:43: sparse: sparse: cast to restricted __le32
drivers/scsi/53c700.c:1447:9: sparse: sparse: cast to restricted __le32
drivers/scsi/53c700.c:1447:9: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/53c700.c:1449:9: sparse: sparse: cast to restricted __le32
drivers/scsi/53c700.c:1449:9: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/53c700.c:1451:9: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/53c700.c:1453:9: sparse: sparse: cast to restricted __le32
drivers/scsi/53c700.c:1453:9: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/53c700.c:1456:9: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/53c700.c:1624:50: sparse: sparse: cast to restricted __le32
drivers/scsi/53c700.c:1626:66: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/53c700.c:1627:66: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/53c700.c:1628:49: sparse: sparse: cast to restricted __le32
drivers/scsi/53c700.c:1635:67: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/53c700.c:1639:59: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/53c700.c:1887:43: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/53c700.c:1890:45: sparse: sparse: restricted __le32 degrades to integer
drivers/scsi/53c700.c:1892:35: sparse: sparse: restricted __le32 degrades to integer
# https://github.com/0day-ci/linux/commit/b66e4b732653e92f234eb9aaceed34db5...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Christoph-Hellwig/mm-turn-alloc_pages-into-an-inline-function/20200819-155602
git checkout b66e4b732653e92f234eb9aaceed34db54048e61
vim +304 drivers/scsi/53c700.c
285
286 struct Scsi_Host *
287 NCR_700_detect(struct scsi_host_template *tpnt,
288 struct NCR_700_Host_Parameters *hostdata, struct device *dev)
289 {
290 dma_addr_t pScript, pSlots;
291 __u8 *memory;
292 __u32 *script;
293 struct Scsi_Host *host;
294 static int banner = 0;
295 int j;
296
297 if(tpnt->sdev_attrs == NULL)
298 tpnt->sdev_attrs = NCR_700_dev_attrs;
299
300 memory = dma_alloc_coherent(dev, TOTAL_MEM_SIZE, &pScript, GFP_KERNEL);
301 if (!memory) {
302 hostdata->noncoherent = 1;
303 memory = dma_alloc_pages(dev, TOTAL_MEM_SIZE, &pScript,
> 304 GFP_KERNEL, DMA_BIDIRECTIONAL);
305 }
306 if (!memory) {
307 printk(KERN_ERR "53c700: Failed to allocate memory for driver, detaching\n");
308 return NULL;
309 }
310
311 script = (__u32 *)memory;
312 hostdata->msgin = memory + MSGIN_OFFSET;
313 hostdata->msgout = memory + MSGOUT_OFFSET;
314 hostdata->status = memory + STATUS_OFFSET;
315 hostdata->slots = (struct NCR_700_command_slot *)(memory + SLOTS_OFFSET);
316 hostdata->dev = dev;
317
318 pSlots = pScript + SLOTS_OFFSET;
319
320 /* Fill in the missing routines from the host template */
321 tpnt->queuecommand = NCR_700_queuecommand;
322 tpnt->eh_abort_handler = NCR_700_abort;
323 tpnt->eh_host_reset_handler = NCR_700_host_reset;
324 tpnt->can_queue = NCR_700_COMMAND_SLOTS_PER_HOST;
325 tpnt->sg_tablesize = NCR_700_SG_SEGMENTS;
326 tpnt->cmd_per_lun = NCR_700_CMD_PER_LUN;
327 tpnt->slave_configure = NCR_700_slave_configure;
328 tpnt->slave_destroy = NCR_700_slave_destroy;
329 tpnt->slave_alloc = NCR_700_slave_alloc;
330 tpnt->change_queue_depth = NCR_700_change_queue_depth;
331
332 if(tpnt->name == NULL)
333 tpnt->name = "53c700";
334 if(tpnt->proc_name == NULL)
335 tpnt->proc_name = "53c700";
336
337 host = scsi_host_alloc(tpnt, 4);
338 if (!host)
339 return NULL;
340 memset(hostdata->slots, 0, sizeof(struct NCR_700_command_slot)
341 * NCR_700_COMMAND_SLOTS_PER_HOST);
342 for (j = 0; j < NCR_700_COMMAND_SLOTS_PER_HOST; j++) {
343 dma_addr_t offset = (dma_addr_t)((unsigned long)&hostdata->slots[j].SG[0]
344 - (unsigned long)&hostdata->slots[0].SG[0]);
345 hostdata->slots[j].pSG = (struct NCR_700_SG_List *)((unsigned long)(pSlots + offset));
346 if(j == 0)
347 hostdata->free_list = &hostdata->slots[j];
348 else
349 hostdata->slots[j-1].ITL_forw = &hostdata->slots[j];
350 hostdata->slots[j].state = NCR_700_SLOT_FREE;
351 }
352
353 for (j = 0; j < ARRAY_SIZE(SCRIPT); j++)
354 script[j] = bS_to_host(SCRIPT[j]);
355
356 /* adjust all labels to be bus physical */
357 for (j = 0; j < PATCHES; j++)
358 script[LABELPATCHES[j]] = bS_to_host(pScript + SCRIPT[LABELPATCHES[j]]);
359 /* now patch up fixed addresses. */
360 script_patch_32(hostdata, script, MessageLocation,
361 pScript + MSGOUT_OFFSET);
362 script_patch_32(hostdata, script, StatusAddress,
363 pScript + STATUS_OFFSET);
364 script_patch_32(hostdata, script, ReceiveMsgAddress,
365 pScript + MSGIN_OFFSET);
366
367 hostdata->script = script;
368 hostdata->pScript = pScript;
369 dma_sync_single_for_device(hostdata->dev, pScript, sizeof(SCRIPT), DMA_TO_DEVICE);
370 hostdata->state = NCR_700_HOST_FREE;
371 hostdata->cmd = NULL;
372 host->max_id = 8;
373 host->max_lun = NCR_700_MAX_LUNS;
374 BUG_ON(NCR_700_transport_template == NULL);
375 host->transportt = NCR_700_transport_template;
376 host->unique_id = (unsigned long)hostdata->base;
377 hostdata->eh_complete = NULL;
378 host->hostdata[0] = (unsigned long)hostdata;
379 /* kick the chip */
380 NCR_700_writeb(0xff, host, CTEST9_REG);
381 if (hostdata->chip710)
382 hostdata->rev = (NCR_700_readb(host, CTEST8_REG)>>4) & 0x0f;
383 else
384 hostdata->rev = (NCR_700_readb(host, CTEST7_REG)>>4) & 0x0f;
385 hostdata->fast = (NCR_700_readb(host, CTEST9_REG) == 0);
386 if (banner == 0) {
387 printk(KERN_NOTICE "53c700: Version " NCR_700_VERSION " By James.Bottomley(a)HansenPartnership.com\n");
388 banner = 1;
389 }
390 printk(KERN_NOTICE "scsi%d: %s rev %d %s\n", host->host_no,
391 hostdata->chip710 ? "53c710" :
392 (hostdata->fast ? "53c700-66" : "53c700"),
393 hostdata->rev, hostdata->differential ?
394 "(Differential)" : "");
395 /* reset the chip */
396 NCR_700_chip_reset(host);
397
398 if (scsi_add_host(host, dev)) {
399 dev_printk(KERN_ERR, dev, "53c700: scsi_add_host failed\n");
400 scsi_host_put(host);
401 return NULL;
402 }
403
404 spi_signalling(host) = hostdata->differential ? SPI_SIGNAL_HVD :
405 SPI_SIGNAL_SE;
406
407 return host;
408 }
409
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month