[intel-lts:5.4/yocto 9356/18528] drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:993:47: sparse: sparse: incorrect type in assignment (different base types)
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: f74600f861eeb3536c7443943a3ce78a77c692dc
commit: 94e13c2880167751eb5cbbcb0e7be68ca83f0653 [9356/18528] dmaengine: dw-axi-dma: support cyclic mode
config: i386-randconfig-s001-20211014 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/intel/linux-intel-lts/commit/94e13c2880167751eb5cbbcb0...
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 5.4/yocto
git checkout 94e13c2880167751eb5cbbcb0e7be68ca83f0653
# 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/dma/dw-axi-dmac/dw-axi-dmac-platform.c:993:47: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] block_ts_lo @@ got unsigned int @@
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:993:47: sparse: expected restricted __le32 [usertype] block_ts_lo
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:993:47: sparse: got unsigned int
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1068:55: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] block_ts_lo @@ got unsigned int @@
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1068:55: sparse: expected restricted __le32 [usertype] block_ts_lo
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1068:55: sparse: got unsigned int
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1070:55: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] block_ts_lo @@ got unsigned int @@
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1070:55: sparse: expected restricted __le32 [usertype] block_ts_lo
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1070:55: sparse: got unsigned int
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1169:59: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned int [usertype] irq_mask @@ got restricted __le32 [usertype] status_lo @@
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1169:59: sparse: expected unsigned int [usertype] irq_mask
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1169:59: sparse: got restricted __le32 [usertype] status_lo
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1170:42: sparse: sparse: invalid assignment: |=
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1170:42: sparse: left side has type restricted __le32
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1170:42: sparse: right side has type unsigned long
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1111:22: sparse: sparse: context imbalance in 'axi_chan_handle_err' - different lock contexts for basic block
vim +993 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
912
913 static struct dma_async_tx_descriptor *
914 dw_chan_prep_dma_cyclic(struct dma_chan *dchan, dma_addr_t buf_addr,
915 size_t buf_len, size_t period_len,
916 enum dma_transfer_direction direction,
917 unsigned long flags)
918 {
919 struct axi_dma_chan *chan = dchan_to_axi_dma_chan(dchan);
920 struct axi_dma_desc *first = NULL, *prev = NULL;
921 unsigned int reg_width;
922 unsigned int mem_width;
923 unsigned int data_width = BIT(chan->chip->dw->hdata->m_data_width);
924 dma_addr_t reg;
925 u32 reg_value = 0;
926 unsigned int i = 0;
927 u32 ctllo, ctlhi;
928 size_t total_len = 0;
929 size_t block_ts, max_block_ts;
930 u8 lms = 0; // Select AXI0 master for LLI fetching
931 u32 offset;
932
933 if (unlikely(!is_slave_direction(direction)))
934 return NULL;
935
936 chan->direction = direction;
937 chan->cyclic = 0x1;
938
939 max_block_ts = chan->chip->dw->hdata->block_size[chan->id];
940
941 axi_set_hw_channel(chan->chip, chan->hw_hs_num);
942
943 switch (direction) {
944 case DMA_MEM_TO_DEV:
945 reg_width = __ffs(chan->slave_config.dst_addr_width);
946
947 chan->reg_width = reg_width;
948 if (reg_width == DWAXIDMAC_TRANS_WIDTH_16) {
949 offset = DMAC_APB_HALFWORD_WR_CH_EN;
950 reg_value = axi_dma_apb_ioread32(chan->chip, offset);
951 reg_value |= 0x1 << chan->id;
952 axi_dma_apb_iowrite32(chan->chip,
953 DMAC_APB_HALFWORD_WR_CH_EN, reg_value);
954 } else if (reg_width == DWAXIDMAC_TRANS_WIDTH_8) {
955 offset = DMAC_APB_BYTE_WR_CH_EN;
956 reg_value = axi_dma_apb_ioread32(chan->chip, offset);
957 reg_value |= 0x1 << chan->id;
958 axi_dma_apb_iowrite32(chan->chip, offset, reg_value);
959 }
960 reg = chan->slave_config.dst_addr;
961
962 ctllo = axi_dma_prepare_ctllo(chan) |
963 reg_width << CH_CTL_L_DST_WIDTH_POS |
964 DWAXIDMAC_CH_CTL_L_NOINC << CH_CTL_L_DST_INC_POS |
965 DWAXIDMAC_CH_CTL_L_INC << CH_CTL_L_SRC_INC_POS;
966
967 for (i = 0; i < buf_len / period_len; i++) {
968 struct axi_dma_desc *desc;
969 size_t xfer_len;
970 u32 mem, len;
971
972 mem_width = __ffs(data_width | mem | len);
973 if (mem_width > DWAXIDMAC_TRANS_WIDTH_32)
974 mem_width = DWAXIDMAC_TRANS_WIDTH_32;
975
976 xfer_len = period_len;
977 block_ts = period_len;
978
979 desc = axi_desc_get(chan);
980 if (unlikely(!desc))
981 goto err_desc_get;
982
983 if (block_ts > max_block_ts) {
984 block_ts = max_block_ts;
985 xfer_len = max_block_ts << mem_width;
986 }
987
988 ctlhi = axi_dma_prepare_ctlhi(chan);
989
990 ctllo |= mem_width << CH_CTL_L_SRC_WIDTH_POS;
991 write_desc_sar(desc, buf_addr + i * period_len);
992 write_desc_dar(desc, reg);
> 993 desc->lli.block_ts_lo = period_len / 4;
994 desc->lli.ctl_hi = cpu_to_le32(ctlhi);
995 desc->lli.ctl_lo = cpu_to_le32(ctllo);
996
997 set_desc_src_master(desc);
998 set_desc_src_master(desc);
999
1000 // Manage transfer list (xfer_list)
1001 if (!first) {
1002 first = desc;
1003 } else {
1004 write_desc_llp(prev, desc->vd.tx.phys | lms);
1005 list_add_tail(&desc->xfer_list,
1006 &first->xfer_list);
1007 }
1008 prev = desc;
1009 if (i == ((buf_len / period_len) - 1))
1010 write_desc_llp(prev, first->vd.tx.phys | lms);
1011
1012 total_len += xfer_len;
1013
1014 set_desc_last(desc);
1015 }
1016 break;
1017 case DMA_DEV_TO_MEM:
1018 reg_width = __ffs(chan->slave_config.src_addr_width);
1019
1020 chan->reg_width = reg_width;
1021 if (reg_width == DWAXIDMAC_TRANS_WIDTH_16) {
1022 offset = DMAC_APB_HALFWORD_WR_CH_EN;
1023 reg_value = axi_dma_apb_ioread32(chan->chip, offset);
1024 reg_value |= 0x1 << chan->id;
1025 axi_dma_apb_iowrite32(chan->chip, offset, reg_value);
1026 } else if (reg_width == DWAXIDMAC_TRANS_WIDTH_8) {
1027 offset = DMAC_APB_BYTE_WR_CH_EN;
1028 reg_value = axi_dma_apb_ioread32(chan->chip, offset);
1029 reg_value |= 0x1 << chan->id;
1030 axi_dma_apb_iowrite32(chan->chip, offset, reg_value);
1031 }
1032 reg = chan->slave_config.src_addr;
1033 if (reg_width > DWAXIDMAC_TRANS_WIDTH_32)
1034 reg_width = DWAXIDMAC_TRANS_WIDTH_32;
1035 ctllo = axi_dma_prepare_ctllo(chan) |
1036 reg_width << CH_CTL_L_SRC_WIDTH_POS |
1037 DWAXIDMAC_CH_CTL_L_INC << CH_CTL_L_DST_INC_POS |
1038 // Workaround
1039 DWAXIDMAC_CH_CTL_L_NOINC << CH_CTL_L_SRC_INC_POS;
1040
1041 for (i = 0; i < buf_len / period_len; i++) {
1042 struct axi_dma_desc *desc;
1043 size_t xfer_len;
1044 u32 mem, len;
1045
1046 desc = axi_desc_get(chan);
1047 if (unlikely(!desc))
1048 goto err_desc_get;
1049
1050 xfer_len = len;
1051 block_ts = xfer_len >> reg_width;
1052 if (block_ts > max_block_ts) {
1053 block_ts = max_block_ts;
1054 xfer_len = max_block_ts << reg_width;
1055 }
1056 xfer_len = period_len;
1057 block_ts = period_len;
1058 mem_width = __ffs(data_width | mem | xfer_len);
1059 if (mem_width > DWAXIDMAC_TRANS_WIDTH_32)
1060 mem_width = DWAXIDMAC_TRANS_WIDTH_32;
1061
1062 ctlhi = axi_dma_prepare_ctlhi(chan);
1063 ctllo |= mem_width << CH_CTL_L_DST_WIDTH_POS;
1064
1065 write_desc_sar(desc, reg);
1066 write_desc_dar(desc, buf_addr + i * period_len);
1067 if (reg_width == DWAXIDMAC_TRANS_WIDTH_16)
1068 desc->lli.block_ts_lo = period_len / 2;
1069 else if (reg_width >= DWAXIDMAC_TRANS_WIDTH_32)
1070 desc->lli.block_ts_lo = period_len / 4;
1071 desc->lli.ctl_hi = cpu_to_le32(ctlhi);
1072 desc->lli.ctl_lo = cpu_to_le32(ctllo);
1073
1074 set_desc_src_master(desc);
1075 set_desc_src_master(desc);
1076
1077 // Manage transfer list (xfer_list)
1078 if (!first) {
1079 first = desc;
1080 } else {
1081 write_desc_llp(prev, desc->vd.tx.phys | lms);
1082 list_add_tail(&desc->xfer_list,
1083 &first->xfer_list);
1084 }
1085 prev = desc;
1086 if (i == ((buf_len / period_len) - 1))
1087 write_desc_llp(prev, first->vd.tx.phys | lms);
1088
1089 total_len += xfer_len;
1090
1091 // TODO: check if needed
1092 set_desc_last(desc);
1093 }
1094 break;
1095 default:
1096 return NULL;
1097 }
1098
1099 if (unlikely(!first))
1100 return NULL;
1101
1102 return vchan_tx_prep(&chan->vc, &first->vd, flags);
1103
1104 err_desc_get:
1105 if (first)
1106 axi_desc_put(first);
1107
1108 return NULL;
1109 }
1110
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[bvanassche:scsi-for-next 1/2] drivers/scsi/qedf/qedf_main.c:989:35: error: 'qedf_host_attr_groups' undeclared here (not in a function); did you mean 'qedf_host_attrs'?
by kernel test robot
tree: https://github.com/bvanassche/linux scsi-for-next
head: 3d4f1af1fe85f0f2cc435ea177d25f9bad454965
commit: 983ecfd3c8e1418e0bd073bac176b8065ec619fd [1/2] scsi: Register SCSI host sysfs attributes earlier
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 11.2.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
# https://github.com/bvanassche/linux/commit/983ecfd3c8e1418e0bd073bac176b8...
git remote add bvanassche https://github.com/bvanassche/linux
git fetch --no-tags bvanassche scsi-for-next
git checkout 983ecfd3c8e1418e0bd073bac176b8065ec619fd
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=xtensa SHELL=/bin/bash drivers/gpu/drm/ drivers/net/wireless/ drivers/pci/ drivers/scsi/
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 >>):
>> drivers/scsi/qedf/qedf_main.c:989:35: error: 'qedf_host_attr_groups' undeclared here (not in a function); did you mean 'qedf_host_attrs'?
989 | .shost_attr_groups = qedf_host_attr_groups,
| ^~~~~~~~~~~~~~~~~~~~~
| qedf_host_attrs
--
>> drivers/scsi/qedi/qedi_iscsi.c:61:30: error: 'qedi_shost_attr_groups' undeclared here (not in a function); did you mean 'qedi_shost_attrs'?
61 | .shost_attr_groups = qedi_shost_attr_groups,
| ^~~~~~~~~~~~~~~~~~~~~~
| qedi_shost_attrs
vim +989 drivers/scsi/qedf/qedf_main.c
981
982 static struct scsi_host_template qedf_host_template = {
983 .module = THIS_MODULE,
984 .name = QEDF_MODULE_NAME,
985 .this_id = -1,
986 .cmd_per_lun = 32,
987 .max_sectors = 0xffff,
988 .queuecommand = qedf_queuecommand,
> 989 .shost_attr_groups = qedf_host_attr_groups,
990 .eh_abort_handler = qedf_eh_abort,
991 .eh_device_reset_handler = qedf_eh_device_reset, /* lun reset */
992 .eh_target_reset_handler = qedf_eh_target_reset, /* target reset */
993 .eh_host_reset_handler = qedf_eh_host_reset,
994 .slave_configure = qedf_slave_configure,
995 .dma_boundary = QED_HW_DMA_BOUNDARY,
996 .sg_tablesize = QEDF_MAX_BDS_PER_CMD,
997 .can_queue = FCOE_PARAMS_NUM_TASKS,
998 .change_queue_depth = scsi_change_queue_depth,
999 };
1000
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
lib/test_ubsan.c:71:6: warning: variable 'val1' set but not used
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 89d714ab6043bca7356b5c823f5335f5dce1f930
commit: 4a26f49b7b3dbe998d9b2561f9f256a1c3fdb74a ubsan: expand tests and reporting
date: 11 months ago
config: arm-randconfig-r016-20211109 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project f3798ad5fa845771846599f3c088016e3aef800c)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# 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 4a26f49b7b3dbe998d9b2561f9f256a1c3fdb74a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
lib/test_ubsan.c:16:15: warning: variable 'val' set but not used [-Wunused-but-set-variable]
volatile int val = INT_MAX;
^
lib/test_ubsan.c:17:24: warning: variable 'uval' set but not used [-Wunused-but-set-variable]
volatile unsigned int uval = UINT_MAX;
^
lib/test_ubsan.c:29:24: warning: variable 'uval' set but not used [-Wunused-but-set-variable]
volatile unsigned int uval = 0;
^
lib/test_ubsan.c:28:15: warning: variable 'val' set but not used [-Wunused-but-set-variable]
volatile int val = INT_MIN;
^
lib/test_ubsan.c:42:24: warning: variable 'uval' set but not used [-Wunused-but-set-variable]
volatile unsigned int uval = UINT_MAX / 2;
^
lib/test_ubsan.c:41:15: warning: variable 'val' set but not used [-Wunused-but-set-variable]
volatile int val = INT_MAX / 2;
^
lib/test_ubsan.c:61:15: warning: variable 'val' set but not used [-Wunused-but-set-variable]
volatile int val = 16;
^
>> lib/test_ubsan.c:71:6: warning: variable 'val1' set but not used [-Wunused-but-set-variable]
int val1 = 10;
^
lib/test_ubsan.c:72:6: warning: variable 'val2' set but not used [-Wunused-but-set-variable]
int val2 = INT_MAX;
^
lib/test_ubsan.c:107:37: warning: variable 'eptr' set but not used [-Wunused-but-set-variable]
enum ubsan_test_enum eval, eval2, *eptr;
^
lib/test_ubsan.c:106:19: warning: variable 'ptr' set but not used [-Wunused-but-set-variable]
bool val, val2, *ptr;
^
lib/test_ubsan.c:130:6: warning: variable 'val' set but not used [-Wunused-but-set-variable]
int val;
^
lib/test_ubsan.c:150:27: warning: variable 'val2' set but not used [-Wunused-but-set-variable]
volatile long long *ptr, val2;
^
>> lib/test_ubsan.c:170:28: warning: unused variable 'skip_ubsan_array' [-Wunused-const-variable]
static const test_ubsan_fp skip_ubsan_array[] = {
^
14 warnings generated.
vim +/val1 +71 lib/test_ubsan.c
67
68 static void test_ubsan_shift_out_of_bounds(void)
69 {
70 volatile int neg = -1, wrap = 4;
> 71 int val1 = 10;
72 int val2 = INT_MAX;
73
74 UBSAN_TEST(CONFIG_UBSAN_SHIFT, "negative exponent");
75 val1 <<= neg;
76
77 UBSAN_TEST(CONFIG_UBSAN_SHIFT, "left overflow");
78 val2 <<= wrap;
79 }
80
81 static void test_ubsan_out_of_bounds(void)
82 {
83 volatile int i = 4, j = 5, k = -1;
84 volatile char above[4] = { }; /* Protect surrounding memory. */
85 volatile int arr[4];
86 volatile char below[4] = { }; /* Protect surrounding memory. */
87
88 above[0] = below[0];
89
90 UBSAN_TEST(CONFIG_UBSAN_BOUNDS, "above");
91 arr[j] = i;
92
93 UBSAN_TEST(CONFIG_UBSAN_BOUNDS, "below");
94 arr[k] = i;
95 }
96
97 enum ubsan_test_enum {
98 UBSAN_TEST_ZERO = 0,
99 UBSAN_TEST_ONE,
100 UBSAN_TEST_MAX,
101 };
102
103 static void test_ubsan_load_invalid_value(void)
104 {
105 volatile char *dst, *src;
106 bool val, val2, *ptr;
107 enum ubsan_test_enum eval, eval2, *eptr;
108 unsigned char c = 0xff;
109
110 UBSAN_TEST(CONFIG_UBSAN_BOOL, "bool");
111 dst = (char *)&val;
112 src = &c;
113 *dst = *src;
114
115 ptr = &val2;
116 val2 = val;
117
118 UBSAN_TEST(CONFIG_UBSAN_ENUM, "enum");
119 dst = (char *)&eval;
120 src = &c;
121 *dst = *src;
122
123 eptr = &eval2;
124 eval2 = eval;
125 }
126
127 static void test_ubsan_null_ptr_deref(void)
128 {
129 volatile int *ptr = NULL;
130 int val;
131
132 UBSAN_TEST(CONFIG_UBSAN_OBJECT_SIZE);
133 val = *ptr;
134 }
135
136 static void test_ubsan_misaligned_access(void)
137 {
138 volatile char arr[5] __aligned(4) = {1, 2, 3, 4, 5};
139 volatile int *ptr, val = 6;
140
141 UBSAN_TEST(CONFIG_UBSAN_ALIGNMENT);
142 ptr = (int *)(arr + 1);
143 *ptr = val;
144 }
145
146 static void test_ubsan_object_size_mismatch(void)
147 {
148 /* "((aligned(8)))" helps this not into be misaligned for ptr-access. */
149 volatile int val __aligned(8) = 4;
150 volatile long long *ptr, val2;
151
152 UBSAN_TEST(CONFIG_UBSAN_OBJECT_SIZE);
153 ptr = (long long *)&val;
154 val2 = *ptr;
155 }
156
157 static const test_ubsan_fp test_ubsan_array[] = {
158 test_ubsan_add_overflow,
159 test_ubsan_sub_overflow,
160 test_ubsan_mul_overflow,
161 test_ubsan_negate_overflow,
162 test_ubsan_shift_out_of_bounds,
163 test_ubsan_out_of_bounds,
164 test_ubsan_load_invalid_value,
165 test_ubsan_misaligned_access,
166 test_ubsan_object_size_mismatch,
167 };
168
169 /* Excluded because they Oops the module. */
> 170 static const test_ubsan_fp skip_ubsan_array[] = {
171 test_ubsan_divrem_overflow,
172 test_ubsan_null_ptr_deref,
173 };
174
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[intel-lts:5.4/yocto 14047/18528] drivers/counter/intel-qep.c:863:34: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: f74600f861eeb3536c7443943a3ce78a77c692dc
commit: 2e228f3df9479e9e061cc7e0b7aba0c071ea22bf [14047/18528] REVERT-ME: Temporary Enable D0i3 flow for PSE IOs
config: ia64-randconfig-s031-20210930 (attached as .config)
compiler: ia64-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/intel/linux-intel-lts/commit/2e228f3df9479e9e061cc7e0b...
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 5.4/yocto
git checkout 2e228f3df9479e9e061cc7e0b7aba0c071ea22bf
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=ia64
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/counter/intel-qep.c:863:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] <asn:2> *base @@ got struct device *dev @@
drivers/counter/intel-qep.c:863:34: sparse: expected void [noderef] <asn:2> *base
drivers/counter/intel-qep.c:863:34: sparse: got struct device *dev
drivers/counter/intel-qep.c:864:45: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] <asn:2> *base @@ got struct device *dev @@
drivers/counter/intel-qep.c:864:45: sparse: expected void [noderef] <asn:2> *base
drivers/counter/intel-qep.c:864:45: sparse: got struct device *dev
drivers/counter/intel-qep.c: note: in included file (through arch/ia64/include/asm/io.h, arch/ia64/include/asm/smp.h, include/linux/smp.h, ...):
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
vim +863 drivers/counter/intel-qep.c
837
838 static int intel_qep_runtime_resume(struct device *dev)
839 {
840 struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
841 struct intel_qep *qep = pci_get_drvdata(pdev);
842 u32 d0i3c_reg;
843 u32 cgsr_reg;
844
845 cgsr_reg = intel_qep_readl(qep->regs, INTEL_QEP_CGSR);
846
847 if (cgsr_reg & INTEL_QEP_CGSR_CG)
848 intel_qep_writel(qep->regs, INTEL_QEP_CGSR,
849 (cgsr_reg & ~INTEL_QEP_CGSR_CG));
850
851 d0i3c_reg = intel_qep_readl(qep->regs, INTEL_QEP_D0I3C);
852
853 if (d0i3c_reg & INTEL_QEP_D0I3_CIP) {
854 dev_info(dev, "%s d0i3c CIP detected", __func__);
855 } else {
856
857 if (d0i3c_reg & INTEL_QEP_D0I3_EN)
858 d0i3c_reg &= ~INTEL_QEP_D0I3_EN;
859
860 if (d0i3c_reg & INTEL_QEP_D0I3_RR)
861 d0i3c_reg |= INTEL_QEP_D0I3_RR;
862
> 863 intel_qep_writel(dev, INTEL_QEP_D0I3C, d0i3c_reg);
864 d0i3c_reg = intel_qep_readl(dev, INTEL_QEP_D0I3C);
865 }
866
867 intel_qep_init(qep, false);
868
869 return 0;
870 }
871 #endif
872
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[intel-lts:5.4/yocto 9356/18528] drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:993:47: sparse: sparse: incorrect type in assignment (different base types)
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: f74600f861eeb3536c7443943a3ce78a77c692dc
commit: 94e13c2880167751eb5cbbcb0e7be68ca83f0653 [9356/18528] dmaengine: dw-axi-dma: support cyclic mode
config: ia64-randconfig-s031-20210930 (attached as .config)
compiler: ia64-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/intel/linux-intel-lts/commit/94e13c2880167751eb5cbbcb0...
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 5.4/yocto
git checkout 94e13c2880167751eb5cbbcb0e7be68ca83f0653
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=ia64
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/dma/dw-axi-dmac/dw-axi-dmac-platform.c:993:47: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] block_ts_lo @@ got unsigned long @@
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:993:47: sparse: expected restricted __le32 [usertype] block_ts_lo
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:993:47: sparse: got unsigned long
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1068:55: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] block_ts_lo @@ got unsigned long @@
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1068:55: sparse: expected restricted __le32 [usertype] block_ts_lo
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1068:55: sparse: got unsigned long
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1070:55: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] block_ts_lo @@ got unsigned long @@
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1070:55: sparse: expected restricted __le32 [usertype] block_ts_lo
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1070:55: sparse: got unsigned long
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1169:59: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned int [usertype] irq_mask @@ got restricted __le32 [usertype] status_lo @@
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1169:59: sparse: expected unsigned int [usertype] irq_mask
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1169:59: sparse: got restricted __le32 [usertype] status_lo
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1170:42: sparse: sparse: invalid assignment: |=
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1170:42: sparse: left side has type restricted __le32
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1170:42: sparse: right side has type unsigned long
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1111:22: sparse: sparse: context imbalance in 'axi_chan_handle_err' - different lock contexts for basic block
vim +993 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
912
913 static struct dma_async_tx_descriptor *
914 dw_chan_prep_dma_cyclic(struct dma_chan *dchan, dma_addr_t buf_addr,
915 size_t buf_len, size_t period_len,
916 enum dma_transfer_direction direction,
917 unsigned long flags)
918 {
919 struct axi_dma_chan *chan = dchan_to_axi_dma_chan(dchan);
920 struct axi_dma_desc *first = NULL, *prev = NULL;
921 unsigned int reg_width;
922 unsigned int mem_width;
923 unsigned int data_width = BIT(chan->chip->dw->hdata->m_data_width);
924 dma_addr_t reg;
925 u32 reg_value = 0;
926 unsigned int i = 0;
927 u32 ctllo, ctlhi;
928 size_t total_len = 0;
929 size_t block_ts, max_block_ts;
930 u8 lms = 0; // Select AXI0 master for LLI fetching
931 u32 offset;
932
933 if (unlikely(!is_slave_direction(direction)))
934 return NULL;
935
936 chan->direction = direction;
937 chan->cyclic = 0x1;
938
939 max_block_ts = chan->chip->dw->hdata->block_size[chan->id];
940
941 axi_set_hw_channel(chan->chip, chan->hw_hs_num);
942
943 switch (direction) {
944 case DMA_MEM_TO_DEV:
945 reg_width = __ffs(chan->slave_config.dst_addr_width);
946
947 chan->reg_width = reg_width;
948 if (reg_width == DWAXIDMAC_TRANS_WIDTH_16) {
949 offset = DMAC_APB_HALFWORD_WR_CH_EN;
950 reg_value = axi_dma_apb_ioread32(chan->chip, offset);
951 reg_value |= 0x1 << chan->id;
952 axi_dma_apb_iowrite32(chan->chip,
953 DMAC_APB_HALFWORD_WR_CH_EN, reg_value);
954 } else if (reg_width == DWAXIDMAC_TRANS_WIDTH_8) {
955 offset = DMAC_APB_BYTE_WR_CH_EN;
956 reg_value = axi_dma_apb_ioread32(chan->chip, offset);
957 reg_value |= 0x1 << chan->id;
958 axi_dma_apb_iowrite32(chan->chip, offset, reg_value);
959 }
960 reg = chan->slave_config.dst_addr;
961
962 ctllo = axi_dma_prepare_ctllo(chan) |
963 reg_width << CH_CTL_L_DST_WIDTH_POS |
964 DWAXIDMAC_CH_CTL_L_NOINC << CH_CTL_L_DST_INC_POS |
965 DWAXIDMAC_CH_CTL_L_INC << CH_CTL_L_SRC_INC_POS;
966
967 for (i = 0; i < buf_len / period_len; i++) {
968 struct axi_dma_desc *desc;
969 size_t xfer_len;
970 u32 mem, len;
971
972 mem_width = __ffs(data_width | mem | len);
973 if (mem_width > DWAXIDMAC_TRANS_WIDTH_32)
974 mem_width = DWAXIDMAC_TRANS_WIDTH_32;
975
976 xfer_len = period_len;
977 block_ts = period_len;
978
979 desc = axi_desc_get(chan);
980 if (unlikely(!desc))
981 goto err_desc_get;
982
983 if (block_ts > max_block_ts) {
984 block_ts = max_block_ts;
985 xfer_len = max_block_ts << mem_width;
986 }
987
988 ctlhi = axi_dma_prepare_ctlhi(chan);
989
990 ctllo |= mem_width << CH_CTL_L_SRC_WIDTH_POS;
991 write_desc_sar(desc, buf_addr + i * period_len);
992 write_desc_dar(desc, reg);
> 993 desc->lli.block_ts_lo = period_len / 4;
994 desc->lli.ctl_hi = cpu_to_le32(ctlhi);
995 desc->lli.ctl_lo = cpu_to_le32(ctllo);
996
997 set_desc_src_master(desc);
998 set_desc_src_master(desc);
999
1000 // Manage transfer list (xfer_list)
1001 if (!first) {
1002 first = desc;
1003 } else {
1004 write_desc_llp(prev, desc->vd.tx.phys | lms);
1005 list_add_tail(&desc->xfer_list,
1006 &first->xfer_list);
1007 }
1008 prev = desc;
1009 if (i == ((buf_len / period_len) - 1))
1010 write_desc_llp(prev, first->vd.tx.phys | lms);
1011
1012 total_len += xfer_len;
1013
1014 set_desc_last(desc);
1015 }
1016 break;
1017 case DMA_DEV_TO_MEM:
1018 reg_width = __ffs(chan->slave_config.src_addr_width);
1019
1020 chan->reg_width = reg_width;
1021 if (reg_width == DWAXIDMAC_TRANS_WIDTH_16) {
1022 offset = DMAC_APB_HALFWORD_WR_CH_EN;
1023 reg_value = axi_dma_apb_ioread32(chan->chip, offset);
1024 reg_value |= 0x1 << chan->id;
1025 axi_dma_apb_iowrite32(chan->chip, offset, reg_value);
1026 } else if (reg_width == DWAXIDMAC_TRANS_WIDTH_8) {
1027 offset = DMAC_APB_BYTE_WR_CH_EN;
1028 reg_value = axi_dma_apb_ioread32(chan->chip, offset);
1029 reg_value |= 0x1 << chan->id;
1030 axi_dma_apb_iowrite32(chan->chip, offset, reg_value);
1031 }
1032 reg = chan->slave_config.src_addr;
1033 if (reg_width > DWAXIDMAC_TRANS_WIDTH_32)
1034 reg_width = DWAXIDMAC_TRANS_WIDTH_32;
1035 ctllo = axi_dma_prepare_ctllo(chan) |
1036 reg_width << CH_CTL_L_SRC_WIDTH_POS |
1037 DWAXIDMAC_CH_CTL_L_INC << CH_CTL_L_DST_INC_POS |
1038 // Workaround
1039 DWAXIDMAC_CH_CTL_L_NOINC << CH_CTL_L_SRC_INC_POS;
1040
1041 for (i = 0; i < buf_len / period_len; i++) {
1042 struct axi_dma_desc *desc;
1043 size_t xfer_len;
1044 u32 mem, len;
1045
1046 desc = axi_desc_get(chan);
1047 if (unlikely(!desc))
1048 goto err_desc_get;
1049
1050 xfer_len = len;
1051 block_ts = xfer_len >> reg_width;
1052 if (block_ts > max_block_ts) {
1053 block_ts = max_block_ts;
1054 xfer_len = max_block_ts << reg_width;
1055 }
1056 xfer_len = period_len;
1057 block_ts = period_len;
1058 mem_width = __ffs(data_width | mem | xfer_len);
1059 if (mem_width > DWAXIDMAC_TRANS_WIDTH_32)
1060 mem_width = DWAXIDMAC_TRANS_WIDTH_32;
1061
1062 ctlhi = axi_dma_prepare_ctlhi(chan);
1063 ctllo |= mem_width << CH_CTL_L_DST_WIDTH_POS;
1064
1065 write_desc_sar(desc, reg);
1066 write_desc_dar(desc, buf_addr + i * period_len);
1067 if (reg_width == DWAXIDMAC_TRANS_WIDTH_16)
1068 desc->lli.block_ts_lo = period_len / 2;
1069 else if (reg_width >= DWAXIDMAC_TRANS_WIDTH_32)
1070 desc->lli.block_ts_lo = period_len / 4;
1071 desc->lli.ctl_hi = cpu_to_le32(ctlhi);
1072 desc->lli.ctl_lo = cpu_to_le32(ctllo);
1073
1074 set_desc_src_master(desc);
1075 set_desc_src_master(desc);
1076
1077 // Manage transfer list (xfer_list)
1078 if (!first) {
1079 first = desc;
1080 } else {
1081 write_desc_llp(prev, desc->vd.tx.phys | lms);
1082 list_add_tail(&desc->xfer_list,
1083 &first->xfer_list);
1084 }
1085 prev = desc;
1086 if (i == ((buf_len / period_len) - 1))
1087 write_desc_llp(prev, first->vd.tx.phys | lms);
1088
1089 total_len += xfer_len;
1090
1091 // TODO: check if needed
1092 set_desc_last(desc);
1093 }
1094 break;
1095 default:
1096 return NULL;
1097 }
1098
1099 if (unlikely(!first))
1100 return NULL;
1101
1102 return vchan_tx_prep(&chan->vc, &first->vd, flags);
1103
1104 err_desc_get:
1105 if (first)
1106 axi_desc_put(first);
1107
1108 return NULL;
1109 }
1110
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 2 weeks
[android-common:android12-5.10 8046/13750] kernel/sched/fair.c:4424:6: warning: no previous prototype for 'set_next_entity'
by kernel test robot
Hi lijianzhong,
FYI, the error/warning still remains.
tree: https://android.googlesource.com/kernel/common android12-5.10
head: 129e04dc199ef790bd0c2bd31e8d9ae909e44b57
commit: 54f66141a8834e27601fe594d68a97db01bb86b6 [8046/13750] ANDROID: sched: Add vendor hooks for sched.
config: arm-randconfig-r026-20211014 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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 remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-5.10
git checkout 54f66141a8834e27601fe594d68a97db01bb86b6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> kernel/sched/fair.c:4424:6: warning: no previous prototype for 'set_next_entity' [-Wmissing-prototypes]
4424 | void set_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *se)
| ^~~~~~~~~~~~~~~
kernel/sched/fair.c:5408:6: warning: no previous prototype for 'init_cfs_bandwidth' [-Wmissing-prototypes]
5408 | void init_cfs_bandwidth(struct cfs_bandwidth *cfs_b) {}
| ^~~~~~~~~~~~~~~~~~
kernel/sched/fair.c:11341:6: warning: no previous prototype for 'free_fair_sched_group' [-Wmissing-prototypes]
11341 | void free_fair_sched_group(struct task_group *tg) { }
| ^~~~~~~~~~~~~~~~~~~~~
kernel/sched/fair.c:11343:5: warning: no previous prototype for 'alloc_fair_sched_group' [-Wmissing-prototypes]
11343 | int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent)
| ^~~~~~~~~~~~~~~~~~~~~~
kernel/sched/fair.c:11348:6: warning: no previous prototype for 'online_fair_sched_group' [-Wmissing-prototypes]
11348 | void online_fair_sched_group(struct task_group *tg) { }
| ^~~~~~~~~~~~~~~~~~~~~~~
kernel/sched/fair.c:11350:6: warning: no previous prototype for 'unregister_fair_sched_group' [-Wmissing-prototypes]
11350 | void unregister_fair_sched_group(struct task_group *tg) { }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/set_next_entity +4424 kernel/sched/fair.c
4423
> 4424 void set_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *se)
4425 {
4426 /* 'current' is not kept within the tree. */
4427 if (se->on_rq) {
4428 /*
4429 * Any task has to be enqueued before it get to execute on
4430 * a CPU. So account for the time it spent waiting on the
4431 * runqueue.
4432 */
4433 update_stats_wait_end(cfs_rq, se);
4434 __dequeue_entity(cfs_rq, se);
4435 update_load_avg(cfs_rq, se, UPDATE_TG);
4436 }
4437
4438 update_stats_curr_start(cfs_rq, se);
4439 cfs_rq->curr = se;
4440
4441 /*
4442 * Track our maximum slice length, if the CPU's load is at
4443 * least twice that of our own weight (i.e. dont track it
4444 * when there are only lesser-weight tasks around):
4445 */
4446 if (schedstat_enabled() &&
4447 rq_of(cfs_rq)->cfs.load.weight >= 2*se->load.weight) {
4448 schedstat_set(se->statistics.slice_max,
4449 max((u64)schedstat_val(se->statistics.slice_max),
4450 se->sum_exec_runtime - se->prev_sum_exec_runtime));
4451 }
4452
4453 se->prev_sum_exec_runtime = se->sum_exec_runtime;
4454 }
4455 EXPORT_SYMBOL_GPL(set_next_entity);
4456
4457
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 2 weeks
[zen:5.15/zen-sauce 6/28] drivers/gpu/drm/drm_plane_helper.c:113:25: error: 'visible' is used uninitialized in this function
by kernel test robot
tree: https://github.com/zen-kernel/zen-kernel 5.15/zen-sauce
head: 81ba2917231b206b7b6b9b160e456c5452c4f62e
commit: e5a3bbcb4908996f6034817704297979cbf2dc07 [6/28] ZEN: Disable stack conservation for GCC
config: i386-buildonly-randconfig-r006-20211104 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/zen-kernel/zen-kernel/commit/e5a3bbcb4908996f603481770...
git remote add zen https://github.com/zen-kernel/zen-kernel
git fetch --no-tags zen 5.15/zen-sauce
git checkout e5a3bbcb4908996f6034817704297979cbf2dc07
# 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 >>):
drivers/gpu/drm/drm_plane_helper.c: In function 'drm_primary_helper_update':
>> drivers/gpu/drm/drm_plane_helper.c:113:25: error: 'visible' is used uninitialized in this function [-Werror=uninitialized]
113 | struct drm_plane_state plane_state = {
| ^~~~~~~~~~~
drivers/gpu/drm/drm_plane_helper.c:178:7: note: 'visible' was declared here
178 | bool visible;
| ^~~~~~~
cc1: all warnings being treated as errors
vim +/visible +113 drivers/gpu/drm/drm_plane_helper.c
c103d1cfb3543f Matt Roper 2014-04-01 100
84c0851794d40b Daniel Vetter 2018-10-04 101 static int drm_plane_helper_check_update(struct drm_plane *plane,
df86af9133b495 Ville Syrjälä 2016-08-08 102 struct drm_crtc *crtc,
df86af9133b495 Ville Syrjälä 2016-08-08 103 struct drm_framebuffer *fb,
df86af9133b495 Ville Syrjälä 2016-08-08 104 struct drm_rect *src,
df86af9133b495 Ville Syrjälä 2016-08-08 105 struct drm_rect *dst,
df86af9133b495 Ville Syrjälä 2016-08-08 106 unsigned int rotation,
df86af9133b495 Ville Syrjälä 2016-08-08 107 int min_scale,
df86af9133b495 Ville Syrjälä 2016-08-08 108 int max_scale,
df86af9133b495 Ville Syrjälä 2016-08-08 109 bool can_position,
df86af9133b495 Ville Syrjälä 2016-08-08 110 bool can_update_disabled,
df86af9133b495 Ville Syrjälä 2016-08-08 111 bool *visible)
df86af9133b495 Ville Syrjälä 2016-08-08 112 {
10b47ee02d1ae6 Ville Syrjälä 2017-11-01 @113 struct drm_plane_state plane_state = {
df86af9133b495 Ville Syrjälä 2016-08-08 114 .plane = plane,
df86af9133b495 Ville Syrjälä 2016-08-08 115 .crtc = crtc,
df86af9133b495 Ville Syrjälä 2016-08-08 116 .fb = fb,
df86af9133b495 Ville Syrjälä 2016-08-08 117 .src_x = src->x1,
df86af9133b495 Ville Syrjälä 2016-08-08 118 .src_y = src->y1,
df86af9133b495 Ville Syrjälä 2016-08-08 119 .src_w = drm_rect_width(src),
df86af9133b495 Ville Syrjälä 2016-08-08 120 .src_h = drm_rect_height(src),
df86af9133b495 Ville Syrjälä 2016-08-08 121 .crtc_x = dst->x1,
df86af9133b495 Ville Syrjälä 2016-08-08 122 .crtc_y = dst->y1,
df86af9133b495 Ville Syrjälä 2016-08-08 123 .crtc_w = drm_rect_width(dst),
df86af9133b495 Ville Syrjälä 2016-08-08 124 .crtc_h = drm_rect_height(dst),
df86af9133b495 Ville Syrjälä 2016-08-08 125 .rotation = rotation,
df86af9133b495 Ville Syrjälä 2016-08-08 126 .visible = *visible,
df86af9133b495 Ville Syrjälä 2016-08-08 127 };
10b47ee02d1ae6 Ville Syrjälä 2017-11-01 128 struct drm_crtc_state crtc_state = {
10b47ee02d1ae6 Ville Syrjälä 2017-11-01 129 .crtc = crtc,
10b47ee02d1ae6 Ville Syrjälä 2017-11-01 130 .enable = crtc->enabled,
81af63a4af82e7 Ville Syrjälä 2018-01-23 131 .mode = crtc->mode,
10b47ee02d1ae6 Ville Syrjälä 2017-11-01 132 };
df86af9133b495 Ville Syrjälä 2016-08-08 133 int ret;
df86af9133b495 Ville Syrjälä 2016-08-08 134
a01cb8ba3f6282 Ville Syrjälä 2017-11-01 135 ret = drm_atomic_helper_check_plane_state(&plane_state, &crtc_state,
81af63a4af82e7 Ville Syrjälä 2018-01-23 136 min_scale, max_scale,
df86af9133b495 Ville Syrjälä 2016-08-08 137 can_position,
df86af9133b495 Ville Syrjälä 2016-08-08 138 can_update_disabled);
df86af9133b495 Ville Syrjälä 2016-08-08 139 if (ret)
df86af9133b495 Ville Syrjälä 2016-08-08 140 return ret;
df86af9133b495 Ville Syrjälä 2016-08-08 141
10b47ee02d1ae6 Ville Syrjälä 2017-11-01 142 *src = plane_state.src;
10b47ee02d1ae6 Ville Syrjälä 2017-11-01 143 *dst = plane_state.dst;
10b47ee02d1ae6 Ville Syrjälä 2017-11-01 144 *visible = plane_state.visible;
df86af9133b495 Ville Syrjälä 2016-08-08 145
df86af9133b495 Ville Syrjälä 2016-08-08 146 return 0;
df86af9133b495 Ville Syrjälä 2016-08-08 147 }
7daf8d54c17c6d Matt Roper 2014-05-29 148
:::::: The code at line 113 was first introduced by commit
:::::: 10b47ee02d1ae66160058241cf5b962f64e81b47 drm: Check crtc_state->enable rather than crtc->enabled in drm_plane_helper_check_state()
:::::: TO: Ville Syrjälä <ville.syrjala(a)linux.intel.com>
:::::: CC: Ville Syrjälä <ville.syrjala(a)linux.intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 2 weeks
drivers/firmware/efi/capsule-loader.c:91:12: warning: no previous prototype for 'efi_capsule_setup_info'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: cb690f5238d71f543f4ce874aa59237cf53a877c
commit: a18b14d8886614b3c7d290c4cfc33389822b0535 riscv: Disable STACKPROTECTOR_PER_TASK if GCC_PLUGIN_RANDSTRUCT is enabled
date: 3 months ago
config: riscv-randconfig-r022-20211109 (attached as .config)
compiler: riscv32-linux-gcc (GCC) 11.2.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
# 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 a18b14d8886614b3c7d290c4cfc33389822b0535
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/firmware/efi/capsule-loader.c:91:12: warning: no previous prototype for 'efi_capsule_setup_info' [-Wmissing-prototypes]
91 | int __weak efi_capsule_setup_info(struct capsule_info *cap_info, void *kbuff,
| ^~~~~~~~~~~~~~~~~~~~~~
--
lib/test_hexdump.c: In function 'test_hexdump_prepare_test.constprop':
>> lib/test_hexdump.c:116:17: warning: 'strncpy' output truncated copying between 0 and 32 bytes from a string of length 32 [-Wstringop-truncation]
116 | strncpy(p, data_a, l);
| ^~~~~~~~~~~~~~~~~~~~~
vim +/efi_capsule_setup_info +91 drivers/firmware/efi/capsule-loader.c
65117f1aa1b2d14 Kweh, Hock Leong 2016-04-25 79
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 80 /**
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 81 * efi_capsule_setup_info - obtain the efi capsule header in the binary and
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 82 * setup capsule_info structure
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 83 * @cap_info: pointer to current instance of capsule_info structure
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 84 * @kbuff: a mapped first page buffer pointer
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 85 * @hdr_bytes: the total received number of bytes for efi header
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 86 *
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 87 * Platforms with non-standard capsule update mechanisms can override
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 88 * this __weak function so they can perform any required capsule
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 89 * image munging. See quark_quirk_function() for an example.
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 90 **/
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 @91 int __weak efi_capsule_setup_info(struct capsule_info *cap_info, void *kbuff,
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 92 size_t hdr_bytes)
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 93 {
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 94 /* Only process data block that is larger than efi header size */
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 95 if (hdr_bytes < sizeof(efi_capsule_header_t))
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 96 return 0;
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 97
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 98 memcpy(&cap_info->header, kbuff, sizeof(cap_info->header));
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 99 cap_info->total_size = cap_info->header.imagesize;
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 100
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 101 return __efi_capsule_setup_info(cap_info);
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 102 }
3fabd628d5ea24b Ard Biesheuvel 2017-06-02 103
:::::: The code at line 91 was first introduced by commit
:::::: 3fabd628d5ea24b02ddb1230ffca1df0f779f84e efi/capsule-loader: Redirect calls to efi_capsule_setup_info() via weak alias
:::::: TO: Ard Biesheuvel <ard.biesheuvel(a)linaro.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
10 months, 2 weeks
[android-common:android13-5.15 6/8] kernel/sched/core.c:2308:12: warning: no previous prototype for '__migrate_task'
by kernel test robot
tree: https://android.googlesource.com/kernel/common android13-5.15
head: 81a0b5826138b3314eea90bcec18f5822b0a3575
commit: ca2177d4a03ddc4e6b64e54e0e7a176e282b4e18 [6/8] ANDROID: sched: allow access to critical common code for CPU Pause
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android13-5.15
git checkout ca2177d4a03ddc4e6b64e54e0e7a176e282b4e18
# 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 warnings (new ones prefixed by >>):
>> kernel/sched/core.c:2308:12: warning: no previous prototype for '__migrate_task' [-Wmissing-prototypes]
2308 | struct rq *__migrate_task(struct rq *rq, struct rq_flags *rf,
| ^~~~~~~~~~~~~~
kernel/sched/core.c:3459:6: warning: no previous prototype for 'sched_set_stop_task' [-Wmissing-prototypes]
3459 | void sched_set_stop_task(int cpu, struct task_struct *stop)
| ^~~~~~~~~~~~~~~~~~~
vim +/__migrate_task +2308 kernel/sched/core.c
2298
2299 /*
2300 * Move (not current) task off this CPU, onto the destination CPU. We're doing
2301 * this because either it can't run here any more (set_cpus_allowed()
2302 * away from this CPU, or CPU going down), or because we're
2303 * attempting to rebalance this task on exec (sched_exec).
2304 *
2305 * So we race with normal scheduler movements, but that's OK, as long
2306 * as the task is no longer on this CPU.
2307 */
> 2308 struct rq *__migrate_task(struct rq *rq, struct rq_flags *rf,
2309 struct task_struct *p, int dest_cpu)
2310 {
2311 /* Affinity changed (again). */
2312 if (!is_cpu_allowed(p, dest_cpu))
2313 return rq;
2314
2315 update_rq_clock(rq);
2316 rq = move_queued_task(rq, rf, p, dest_cpu);
2317
2318 return rq;
2319 }
2320 EXPORT_SYMBOL_GPL(__migrate_task);
2321
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 2 weeks
kernel/time/clocksource.c:1053:9: warning: no previous prototype for 'sysfs_get_uname'
by kernel test robot
Hi Arnd,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: cb690f5238d71f543f4ce874aa59237cf53a877c
commit: 686092e7daaa9f43396c57ea0044799e47f0d9da parisc: use legacy_timer_tick
date: 1 year ago
config: parisc-buildonly-randconfig-r005-20210927 (attached as .config)
compiler: hppa64-linux-gcc (GCC) 11.2.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
# 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 686092e7daaa9f43396c57ea0044799e47f0d9da
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=parisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> kernel/time/clocksource.c:1053:9: warning: no previous prototype for 'sysfs_get_uname' [-Wmissing-prototypes]
1053 | ssize_t sysfs_get_uname(const char *buf, char *dst, size_t cnt)
| ^~~~~~~~~~~~~~~
vim +/sysfs_get_uname +1053 kernel/time/clocksource.c
734efb467b31e56 John Stultz 2006-06-26 1052
891292a767c2453 Patrick Palka 2013-10-11 @1053 ssize_t sysfs_get_uname(const char *buf, char *dst, size_t cnt)
29b5407819f5973 Thomas Gleixner 2013-04-25 1054 {
29b5407819f5973 Thomas Gleixner 2013-04-25 1055 size_t ret = cnt;
29b5407819f5973 Thomas Gleixner 2013-04-25 1056
29b5407819f5973 Thomas Gleixner 2013-04-25 1057 /* strings from sysfs write are not 0 terminated! */
29b5407819f5973 Thomas Gleixner 2013-04-25 1058 if (!cnt || cnt >= CS_NAME_LEN)
29b5407819f5973 Thomas Gleixner 2013-04-25 1059 return -EINVAL;
29b5407819f5973 Thomas Gleixner 2013-04-25 1060
29b5407819f5973 Thomas Gleixner 2013-04-25 1061 /* strip of \n: */
29b5407819f5973 Thomas Gleixner 2013-04-25 1062 if (buf[cnt-1] == '\n')
29b5407819f5973 Thomas Gleixner 2013-04-25 1063 cnt--;
29b5407819f5973 Thomas Gleixner 2013-04-25 1064 if (cnt > 0)
29b5407819f5973 Thomas Gleixner 2013-04-25 1065 memcpy(dst, buf, cnt);
29b5407819f5973 Thomas Gleixner 2013-04-25 1066 dst[cnt] = 0;
29b5407819f5973 Thomas Gleixner 2013-04-25 1067 return ret;
29b5407819f5973 Thomas Gleixner 2013-04-25 1068 }
29b5407819f5973 Thomas Gleixner 2013-04-25 1069
:::::: The code at line 1053 was first introduced by commit
:::::: 891292a767c2453af0e5be9465e95b06b4b29ebe time: Fix signedness bug in sysfs_get_uname() and its callers
:::::: TO: Patrick Palka <patrick(a)parcs.ath.cx>
:::::: CC: John Stultz <john.stultz(a)linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 2 weeks