Re: [PATCH 1/4] MIPS: rework local_t operation on MIPS64
by kernel test robot
Hi Huang,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.16-rc1 next-20211118]
[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/Huang-Pei/MIPS-rework-local_t-op...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 42eb8fdac2fc5d62392dcfcf0253753e821a97b0
config: mips-buildonly-randconfig-r003-20211118 (attached as .config)
compiler: mips64-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/0day-ci/linux/commit/e556d474e72525ee2464e97dd372f526a...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Huang-Pei/MIPS-rework-local_t-operation-on-MIPS64/20211118-173509
git checkout e556d474e72525ee2464e97dd372f526ae18cb40
# 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=mips SHELL=/bin/bash drivers/net/
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 >>):
In file included from drivers/net/slip/slip.c:88:
>> drivers/net/slip/slip.h:44: warning: "END" redefined
44 | #define END 0300 /* indicates end of frame */
|
In file included from arch/mips/include/asm/local.h:10,
from include/asm-generic/local64.h:22,
from ./arch/mips/include/generated/asm/local64.h:1,
from include/linux/u64_stats_sync.h:75,
from include/net/snmp.h:47,
from include/net/netns/mib.h:5,
from include/net/net_namespace.h:17,
from include/linux/netdevice.h:37,
from drivers/net/slip/slip.c:78:
arch/mips/include/asm/asm.h:69: note: this is the location of the previous definition
69 | #define END(function) \
|
vim +/END +44 drivers/net/slip/slip.h
^1da177e4c3f41 drivers/net/slip.h Linus Torvalds 2005-04-16 42
^1da177e4c3f41 drivers/net/slip.h Linus Torvalds 2005-04-16 43 /* SLIP protocol characters. */
^1da177e4c3f41 drivers/net/slip.h Linus Torvalds 2005-04-16 @44 #define END 0300 /* indicates end of frame */
^1da177e4c3f41 drivers/net/slip.h Linus Torvalds 2005-04-16 45 #define ESC 0333 /* indicates byte stuffing */
^1da177e4c3f41 drivers/net/slip.h Linus Torvalds 2005-04-16 46 #define ESC_END 0334 /* ESC ESC_END means END 'data' */
^1da177e4c3f41 drivers/net/slip.h Linus Torvalds 2005-04-16 47 #define ESC_ESC 0335 /* ESC ESC_ESC means ESC 'data' */
^1da177e4c3f41 drivers/net/slip.h Linus Torvalds 2005-04-16 48
^1da177e4c3f41 drivers/net/slip.h Linus Torvalds 2005-04-16 49
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
[intel-lts:5.4/yocto 9356/18530] 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: 10c3d69bc60059b194dcfa816cbc1240ffb0431d
commit: 94e13c2880167751eb5cbbcb0e7be68ca83f0653 [9356/18530] 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
Re: [PATCH v5 3/4] virt: Add efi_secret module to expose confidential computing secrets
by kernel test robot
Hi Dov,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on 42eb8fdac2fc5d62392dcfcf0253753e821a97b0]
url: https://github.com/0day-ci/linux/commits/Dov-Murik/Allow-guest-access-to-...
base: 42eb8fdac2fc5d62392dcfcf0253753e821a97b0
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-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/0day-ci/linux/commit/547e54014b34e24cd885e941dd66e3fde...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Dov-Murik/Allow-guest-access-to-EFI-confidential-computing-secret-area/20211118-193724
git checkout 547e54014b34e24cd885e941dd66e3fdece3c0c6
# 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/virt/coco/efi_secret/efi_secret.c: In function 'efi_secret_map_area':
drivers/virt/coco/efi_secret/efi_secret.c:181:26: error: implicit declaration of function 'ioremap_encrypted' [-Werror=implicit-function-declaration]
181 | s->secret_data = ioremap_encrypted(secret_area->base_pa, secret_area->size);
| ^~~~~~~~~~~~~~~~~
>> drivers/virt/coco/efi_secret/efi_secret.c:181:24: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
181 | s->secret_data = ioremap_encrypted(secret_area->base_pa, secret_area->size);
| ^
cc1: some warnings being treated as errors
vim +181 drivers/virt/coco/efi_secret/efi_secret.c
157
158 static int efi_secret_map_area(void)
159 {
160 int ret;
161 struct efi_secret *s = efi_secret_get();
162 struct linux_efi_coco_secret_area *secret_area;
163
164 if (efi.coco_secret == EFI_INVALID_TABLE_ADDR) {
165 pr_err("Secret area address is not available\n");
166 return -EINVAL;
167 }
168
169 secret_area = memremap(efi.coco_secret, sizeof(*secret_area), MEMREMAP_WB);
170 if (secret_area == NULL) {
171 pr_err("Could not map secret area EFI config entry\n");
172 return -ENOMEM;
173 }
174 if (!secret_area->base_pa || secret_area->size < sizeof(struct secret_header)) {
175 pr_err("Invalid secret area memory location (base_pa=0x%llx size=0x%llx)\n",
176 secret_area->base_pa, secret_area->size);
177 ret = -EINVAL;
178 goto unmap;
179 }
180
> 181 s->secret_data = ioremap_encrypted(secret_area->base_pa, secret_area->size);
182 if (s->secret_data == NULL) {
183 pr_err("Could not map secret area\n");
184 ret = -ENOMEM;
185 goto unmap;
186 }
187
188 s->secret_data_len = secret_area->size;
189 ret = 0;
190
191 unmap:
192 memunmap(secret_area);
193 return ret;
194 }
195
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
Re: [PATCH v2 4/7] media: mtk-vcodec: fix debugging defines
by kernel test robot
Hi Dafna,
I love your patch! Perhaps something to improve:
[auto build test WARNING on media-tree/master]
[also build test WARNING on linux/master linus/master v5.16-rc1 next-20211118]
[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/Dafna-Hirschfeld/media-mtk-vcode...
base: git://linuxtv.org/media_tree.git master
config: arm-buildonly-randconfig-r003-20211118 (attached as .config)
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://github.com/0day-ci/linux/commit/87678e46cdd12f69edad572f8561e8ee9...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Dafna-Hirschfeld/media-mtk-vcodec-few-fixes/20211117-210840
git checkout 87678e46cdd12f69edad572f8561e8ee929d1d16
# 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 >>):
>> drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_if.c:641:5: warning: format specifies type 'unsigned long' but the argument has type 'unsigned int' [-Wformat]
sizeof(struct mtk_h264_sps_param),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mtk-vcodec/mtk_vcodec_util.h:46:46: note: expanded from macro 'mtk_vcodec_debug'
((struct mtk_vcodec_ctx *)(h)->ctx)->id, ##args)
^~~~
include/linux/printk.h:570:26: note: expanded from macro 'pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:163:22: note: expanded from macro 'dynamic_pr_debug'
pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:152:56: note: expanded from macro '_dynamic_func_call'
__dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
^~~~~~~~~~~
include/linux/dynamic_debug.h:134:15: note: expanded from macro '__dynamic_func_call'
func(&id, ##__VA_ARGS__); \
^~~~~~~~~~~
drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_if.c:642:5: warning: format specifies type 'unsigned long' but the argument has type 'unsigned int' [-Wformat]
sizeof(struct mtk_h264_pps_param),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mtk-vcodec/mtk_vcodec_util.h:46:46: note: expanded from macro 'mtk_vcodec_debug'
((struct mtk_vcodec_ctx *)(h)->ctx)->id, ##args)
^~~~
include/linux/printk.h:570:26: note: expanded from macro 'pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:163:22: note: expanded from macro 'dynamic_pr_debug'
pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:152:56: note: expanded from macro '_dynamic_func_call'
__dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
^~~~~~~~~~~
include/linux/dynamic_debug.h:134:15: note: expanded from macro '__dynamic_func_call'
func(&id, ##__VA_ARGS__); \
^~~~~~~~~~~
drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_if.c:643:5: warning: format specifies type 'unsigned long' but the argument has type 'unsigned int' [-Wformat]
sizeof(struct mtk_h264_dec_slice_param),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mtk-vcodec/mtk_vcodec_util.h:46:46: note: expanded from macro 'mtk_vcodec_debug'
((struct mtk_vcodec_ctx *)(h)->ctx)->id, ##args)
^~~~
include/linux/printk.h:570:26: note: expanded from macro 'pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:163:22: note: expanded from macro 'dynamic_pr_debug'
pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:152:56: note: expanded from macro '_dynamic_func_call'
__dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
^~~~~~~~~~~
include/linux/dynamic_debug.h:134:15: note: expanded from macro '__dynamic_func_call'
func(&id, ##__VA_ARGS__); \
^~~~~~~~~~~
drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_if.c:644:5: warning: format specifies type 'unsigned long' but the argument has type 'unsigned int' [-Wformat]
sizeof(struct mtk_h264_dpb_info));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/mtk-vcodec/mtk_vcodec_util.h:46:46: note: expanded from macro 'mtk_vcodec_debug'
((struct mtk_vcodec_ctx *)(h)->ctx)->id, ##args)
^~~~
include/linux/printk.h:570:26: note: expanded from macro 'pr_debug'
dynamic_pr_debug(fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:163:22: note: expanded from macro 'dynamic_pr_debug'
pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/dynamic_debug.h:152:56: note: expanded from macro '_dynamic_func_call'
__dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
^~~~~~~~~~~
include/linux/dynamic_debug.h:134:15: note: expanded from macro '__dynamic_func_call'
func(&id, ##__VA_ARGS__); \
^~~~~~~~~~~
4 warnings generated.
vim +641 drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_if.c
06fa5f757dc5a5 Yunfei Dong 2021-08-06 611
06fa5f757dc5a5 Yunfei Dong 2021-08-06 612 static int vdec_h264_slice_init(struct mtk_vcodec_ctx *ctx)
06fa5f757dc5a5 Yunfei Dong 2021-08-06 613 {
06fa5f757dc5a5 Yunfei Dong 2021-08-06 614 struct vdec_h264_slice_inst *inst;
06fa5f757dc5a5 Yunfei Dong 2021-08-06 615 int err;
06fa5f757dc5a5 Yunfei Dong 2021-08-06 616
06fa5f757dc5a5 Yunfei Dong 2021-08-06 617 inst = kzalloc(sizeof(*inst), GFP_KERNEL);
06fa5f757dc5a5 Yunfei Dong 2021-08-06 618 if (!inst)
06fa5f757dc5a5 Yunfei Dong 2021-08-06 619 return -ENOMEM;
06fa5f757dc5a5 Yunfei Dong 2021-08-06 620
06fa5f757dc5a5 Yunfei Dong 2021-08-06 621 inst->ctx = ctx;
06fa5f757dc5a5 Yunfei Dong 2021-08-06 622
06fa5f757dc5a5 Yunfei Dong 2021-08-06 623 inst->vpu.id = SCP_IPI_VDEC_H264;
06fa5f757dc5a5 Yunfei Dong 2021-08-06 624 inst->vpu.ctx = ctx;
06fa5f757dc5a5 Yunfei Dong 2021-08-06 625
06fa5f757dc5a5 Yunfei Dong 2021-08-06 626 err = vpu_dec_init(&inst->vpu);
06fa5f757dc5a5 Yunfei Dong 2021-08-06 627 if (err) {
06fa5f757dc5a5 Yunfei Dong 2021-08-06 628 mtk_vcodec_err(inst, "vdec_h264 init err=%d", err);
06fa5f757dc5a5 Yunfei Dong 2021-08-06 629 goto error_free_inst;
06fa5f757dc5a5 Yunfei Dong 2021-08-06 630 }
06fa5f757dc5a5 Yunfei Dong 2021-08-06 631
06fa5f757dc5a5 Yunfei Dong 2021-08-06 632 memcpy(&inst->vsi_ctx, inst->vpu.vsi, sizeof(inst->vsi_ctx));
06fa5f757dc5a5 Yunfei Dong 2021-08-06 633 inst->vsi_ctx.dec.resolution_changed = true;
06fa5f757dc5a5 Yunfei Dong 2021-08-06 634 inst->vsi_ctx.dec.realloc_mv_buf = true;
06fa5f757dc5a5 Yunfei Dong 2021-08-06 635
06fa5f757dc5a5 Yunfei Dong 2021-08-06 636 err = allocate_predication_buf(inst);
06fa5f757dc5a5 Yunfei Dong 2021-08-06 637 if (err)
06fa5f757dc5a5 Yunfei Dong 2021-08-06 638 goto error_deinit;
06fa5f757dc5a5 Yunfei Dong 2021-08-06 639
87678e46cdd12f Dafna Hirschfeld 2021-11-17 640 mtk_vcodec_debug(inst, "struct size = %lu,%lu,%lu,%lu\n",
06fa5f757dc5a5 Yunfei Dong 2021-08-06 @641 sizeof(struct mtk_h264_sps_param),
06fa5f757dc5a5 Yunfei Dong 2021-08-06 642 sizeof(struct mtk_h264_pps_param),
06fa5f757dc5a5 Yunfei Dong 2021-08-06 643 sizeof(struct mtk_h264_dec_slice_param),
06fa5f757dc5a5 Yunfei Dong 2021-08-06 644 sizeof(struct mtk_h264_dpb_info));
06fa5f757dc5a5 Yunfei Dong 2021-08-06 645
06fa5f757dc5a5 Yunfei Dong 2021-08-06 646 mtk_vcodec_debug(inst, "H264 Instance >> %p", inst);
06fa5f757dc5a5 Yunfei Dong 2021-08-06 647
06fa5f757dc5a5 Yunfei Dong 2021-08-06 648 ctx->drv_handle = inst;
06fa5f757dc5a5 Yunfei Dong 2021-08-06 649 return 0;
06fa5f757dc5a5 Yunfei Dong 2021-08-06 650
06fa5f757dc5a5 Yunfei Dong 2021-08-06 651 error_deinit:
06fa5f757dc5a5 Yunfei Dong 2021-08-06 652 vpu_dec_deinit(&inst->vpu);
06fa5f757dc5a5 Yunfei Dong 2021-08-06 653
06fa5f757dc5a5 Yunfei Dong 2021-08-06 654 error_free_inst:
06fa5f757dc5a5 Yunfei Dong 2021-08-06 655 kfree(inst);
06fa5f757dc5a5 Yunfei Dong 2021-08-06 656 return err;
06fa5f757dc5a5 Yunfei Dong 2021-08-06 657 }
06fa5f757dc5a5 Yunfei Dong 2021-08-06 658
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
[intel-lts:5.4/yocto 9331/18530] keembay-ocs-hcu-core.c:undefined reference to `devm_ioremap_resource'
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: 10c3d69bc60059b194dcfa816cbc1240ffb0431d
commit: 9b07a958f2eb496c88faf0bd749eb600357f4190 [9331/18530] crypto: keembay: Add Keem Bay OCS HCU
config: s390-randconfig-r001-20211118 (attached as .config)
compiler: s390-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/intel/linux-intel-lts/commit/9b07a958f2eb496c88faf0bd7...
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 5.4/yocto
git checkout 9b07a958f2eb496c88faf0bd749eb600357f4190
# 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=s390 SHELL=/bin/bash
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 >>):
s390-linux-ld: drivers/char/hw_random/exynos-trng.o: in function `exynos_trng_probe':
exynos-trng.c:(.text+0x53a): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/char/hw_random/meson-rng.o: in function `meson_rng_probe':
meson-rng.c:(.text+0xd0): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/char/hw_random/mtk-rng.o: in function `mtk_rng_probe':
mtk-rng.c:(.text+0x47e): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/ptp/ptp_qoriq.o: in function `ptp_qoriq_probe':
ptp_qoriq.c:(.text+0xf2a): undefined reference to `ioremap'
s390-linux-ld: ptp_qoriq.c:(.text+0xfa6): undefined reference to `iounmap'
s390-linux-ld: drivers/ptp/ptp_qoriq.o: in function `ptp_qoriq_free':
ptp_qoriq.c:(.text+0x102c): undefined reference to `iounmap'
s390-linux-ld: drivers/crypto/keembay/keembay-ocs-aes-core.o: in function `kmb_ocs_aes_probe':
keembay-ocs-aes-core.c:(.text+0x281c): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/crypto/keembay/keembay-ocs-ecc-core.o: in function `kmb_ocs_ecc_probe':
keembay-ocs-ecc-core.c:(.text.unlikely+0xb0): undefined reference to `devm_platform_ioremap_resource'
s390-linux-ld: drivers/crypto/keembay/keembay-ocs-hcu-core.o: in function `kmb_ocs_hcu_probe':
>> keembay-ocs-hcu-core.c:(.text+0x2516): undefined reference to `devm_ioremap_resource'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
Re: [PATCH 4/4] drm/msm/a6xx: Capture gmu log in devcoredump
by kernel test robot
Hi Akhil,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on drm/drm-next]
[also build test WARNING on drm-intel/for-linux-next drm-tip/drm-tip drm-exynos/exynos-drm-next v5.16-rc1 next-20211118]
[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/Akhil-P-Oommen/drm-msm-Increase-...
base: git://anongit.freedesktop.org/drm/drm drm-next
config: alpha-randconfig-r032-20211118 (attached as .config)
compiler: alpha-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/0day-ci/linux/commit/06feaa95e96ec85824f0e65134de626d6...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Akhil-P-Oommen/drm-msm-Increase-gpu-boost-interval/20211118-182201
git checkout 06feaa95e96ec85824f0e65134de626d61308d11
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=alpha
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/gpu/drm/msm/adreno/a6xx_gpu_state.c: In function 'a6xx_show':
>> drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c:1230:43: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' {aka 'long unsigned int'} [-Wformat=]
1230 | drm_printf(p, " size: %d\n", gmu_log->size);
| ~^ ~~~~~~~~~~~~~
| | |
| int size_t {aka long unsigned int}
| %ld
vim +1230 drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
1212
1213 void a6xx_show(struct msm_gpu *gpu, struct msm_gpu_state *state,
1214 struct drm_printer *p)
1215 {
1216 struct a6xx_gpu_state *a6xx_state = container_of(state,
1217 struct a6xx_gpu_state, base);
1218 int i;
1219
1220 if (IS_ERR_OR_NULL(state))
1221 return;
1222
1223 adreno_show(gpu, state, p);
1224
1225 drm_puts(p, "gmu-log:\n");
1226 if (a6xx_state->gmu_log) {
1227 struct msm_gpu_state_bo *gmu_log = a6xx_state->gmu_log;
1228
1229 drm_printf(p, " iova: 0x%016llx\n", gmu_log->iova);
> 1230 drm_printf(p, " size: %d\n", gmu_log->size);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
Re: [PATCH v5 4/8] leds: trigger: netdev: rename and expose NETDEV trigger enum and struct
by kernel test robot
Hi Ansuel,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on net/master]
[also build test ERROR on linus/master v5.16-rc1 next-20211118]
[cannot apply to pavel-leds/for-next robh/for-next net-next/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/Ansuel-Smith/Adds-support-for-PH...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git 5833291ab6de9c3e2374336b51c814e515e8f3a5
config: x86_64-randconfig-a006-20211115 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/4aa7005c8428f867be20ecd0afe4bc2cc...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ansuel-Smith/Adds-support-for-PHY-LEDs-with-offload-triggers/20211112-233807
git checkout 4aa7005c8428f867be20ecd0afe4bc2ccdf6da4a
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/gpu/drm/amd/amdgpu/ drivers/gpu/drm/i915/ drivers/leds/trigger/
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/leds/trigger/ledtrig-netdev.c:45:39: warning: 'struct led_netdev_data' declared inside parameter list will not be visible outside of this definition or declaration
45 | static void set_baseline_state(struct led_netdev_data *trigger_data)
| ^~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c: In function 'set_baseline_state':
>> drivers/leds/trigger/ledtrig-netdev.c:48:46: error: dereferencing pointer to incomplete type 'struct led_netdev_data'
48 | struct led_classdev *led_cdev = trigger_data->led_cdev;
| ^~
drivers/leds/trigger/ledtrig-netdev.c:59:16: error: 'TRIGGER_NETDEV_LINK' undeclared (first use in this function)
59 | if (test_bit(TRIGGER_NETDEV_LINK, &trigger_data->mode))
| ^~~~~~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:59:16: note: each undeclared identifier is reported only once for each function it appears in
drivers/leds/trigger/ledtrig-netdev.c:68:16: error: 'TRIGGER_NETDEV_TX' undeclared (first use in this function)
68 | if (test_bit(TRIGGER_NETDEV_TX, &trigger_data->mode) ||
| ^~~~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:69:16: error: 'TRIGGER_NETDEV_RX' undeclared (first use in this function)
69 | test_bit(TRIGGER_NETDEV_RX, &trigger_data->mode))
| ^~~~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c: In function 'device_name_show':
drivers/leds/trigger/ledtrig-netdev.c:80:28: error: dereferencing pointer to incomplete type 'struct led_netdev_data'
80 | spin_lock_bh(&trigger_data->lock);
| ^~
drivers/leds/trigger/ledtrig-netdev.c: In function 'device_name_store':
drivers/leds/trigger/ledtrig-netdev.c:96:40: error: dereferencing pointer to incomplete type 'struct led_netdev_data'
96 | cancel_delayed_work_sync(&trigger_data->work);
| ^~
drivers/leds/trigger/ledtrig-netdev.c:120:21: error: passing argument 1 of 'set_baseline_state' from incompatible pointer type [-Werror=incompatible-pointer-types]
120 | set_baseline_state(trigger_data);
| ^~~~~~~~~~~~
| |
| struct led_netdev_data *
drivers/leds/trigger/ledtrig-netdev.c:45:56: note: expected 'struct led_netdev_data *' but argument is of type 'struct led_netdev_data *'
45 | static void set_baseline_state(struct led_netdev_data *trigger_data)
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c: In function 'netdev_led_attr_show':
drivers/leds/trigger/ledtrig-netdev.c:136:9: error: 'TRIGGER_NETDEV_LINK' undeclared (first use in this function)
136 | bit = TRIGGER_NETDEV_LINK;
| ^~~~~~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:139:9: error: 'TRIGGER_NETDEV_TX' undeclared (first use in this function)
139 | bit = TRIGGER_NETDEV_TX;
| ^~~~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:142:9: error: 'TRIGGER_NETDEV_RX' undeclared (first use in this function)
142 | bit = TRIGGER_NETDEV_RX;
| ^~~~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:148:57: error: dereferencing pointer to incomplete type 'struct led_netdev_data'
148 | return sprintf(buf, "%u\n", test_bit(bit, &trigger_data->mode));
| ^~
drivers/leds/trigger/ledtrig-netdev.c: In function 'netdev_led_attr_store':
drivers/leds/trigger/ledtrig-netdev.c:165:9: error: 'TRIGGER_NETDEV_LINK' undeclared (first use in this function)
165 | bit = TRIGGER_NETDEV_LINK;
| ^~~~~~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:168:9: error: 'TRIGGER_NETDEV_TX' undeclared (first use in this function)
168 | bit = TRIGGER_NETDEV_TX;
| ^~~~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:171:9: error: 'TRIGGER_NETDEV_RX' undeclared (first use in this function)
171 | bit = TRIGGER_NETDEV_RX;
| ^~~~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:177:40: error: dereferencing pointer to incomplete type 'struct led_netdev_data'
177 | cancel_delayed_work_sync(&trigger_data->work);
| ^~
drivers/leds/trigger/ledtrig-netdev.c:184:21: error: passing argument 1 of 'set_baseline_state' from incompatible pointer type [-Werror=incompatible-pointer-types]
184 | set_baseline_state(trigger_data);
| ^~~~~~~~~~~~
| |
| struct led_netdev_data *
drivers/leds/trigger/ledtrig-netdev.c:45:56: note: expected 'struct led_netdev_data *' but argument is of type 'struct led_netdev_data *'
45 | static void set_baseline_state(struct led_netdev_data *trigger_data)
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c: In function 'interval_show':
drivers/leds/trigger/ledtrig-netdev.c:237:52: error: dereferencing pointer to incomplete type 'struct led_netdev_data'
237 | jiffies_to_msecs(atomic_read(&trigger_data->interval)));
| ^~
drivers/leds/trigger/ledtrig-netdev.c: In function 'interval_store':
drivers/leds/trigger/ledtrig-netdev.c:254:41: error: dereferencing pointer to incomplete type 'struct led_netdev_data'
254 | cancel_delayed_work_sync(&trigger_data->work);
| ^~
drivers/leds/trigger/ledtrig-netdev.c:257:22: error: passing argument 1 of 'set_baseline_state' from incompatible pointer type [-Werror=incompatible-pointer-types]
257 | set_baseline_state(trigger_data); /* resets timer */
| ^~~~~~~~~~~~
| |
| struct led_netdev_data *
drivers/leds/trigger/ledtrig-netdev.c:45:56: note: expected 'struct led_netdev_data *' but argument is of type 'struct led_netdev_data *'
45 | static void set_baseline_state(struct led_netdev_data *trigger_data)
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from include/linux/atomic/atomic-instrumented.h:20,
from include/linux/atomic.h:82,
from drivers/leds/trigger/ledtrig-netdev.c:13:
drivers/leds/trigger/ledtrig-netdev.c: In function 'netdev_trig_notify':
>> include/linux/container_of.h:19:47: error: dereferencing pointer to incomplete type 'struct led_netdev_data'
19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:19:2: note: in expansion of macro 'static_assert'
19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:19:16: note: in expansion of macro '__same_type'
19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:281:3: note: in expansion of macro 'container_of'
281 | container_of(nb, struct led_netdev_data, notifier);
| ^~~~~~~~~~~~
include/linux/compiler_types.h:276:27: error: expression in static assertion is not an integer
276 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:19:2: note: in expansion of macro 'static_assert'
19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:19:16: note: in expansion of macro '__same_type'
19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:281:3: note: in expansion of macro 'container_of'
281 | container_of(nb, struct led_netdev_data, notifier);
| ^~~~~~~~~~~~
In file included from <command-line>:
include/linux/compiler_types.h:140:35: error: invalid use of undefined type 'struct led_netdev_data'
140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^~~~~~~~~~~~~~~~~~
include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~~
include/linux/container_of.h:22:21: note: in expansion of macro 'offsetof'
22 | ((type *)(__mptr - offsetof(type, member))); })
| ^~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:281:3: note: in expansion of macro 'container_of'
281 | container_of(nb, struct led_netdev_data, notifier);
| ^~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:316:21: error: passing argument 1 of 'set_baseline_state' from incompatible pointer type [-Werror=incompatible-pointer-types]
316 | set_baseline_state(trigger_data);
| ^~~~~~~~~~~~
| |
| struct led_netdev_data *
drivers/leds/trigger/ledtrig-netdev.c:45:56: note: expected 'struct led_netdev_data *' but argument is of type 'struct led_netdev_data *'
45 | static void set_baseline_state(struct led_netdev_data *trigger_data)
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from include/linux/atomic/atomic-instrumented.h:20,
from include/linux/atomic.h:82,
from drivers/leds/trigger/ledtrig-netdev.c:13:
drivers/leds/trigger/ledtrig-netdev.c: In function 'netdev_trig_work':
>> include/linux/container_of.h:19:47: error: dereferencing pointer to incomplete type 'struct led_netdev_data'
19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:19:2: note: in expansion of macro 'static_assert'
19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:19:16: note: in expansion of macro '__same_type'
19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:327:3: note: in expansion of macro 'container_of'
327 | container_of(work, struct led_netdev_data, work.work);
| ^~~~~~~~~~~~
include/linux/compiler_types.h:276:27: error: expression in static assertion is not an integer
276 | #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:56: note: in definition of macro '__static_assert'
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
include/linux/container_of.h:19:2: note: in expansion of macro 'static_assert'
19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~~~
include/linux/container_of.h:19:16: note: in expansion of macro '__same_type'
19 | static_assert(__same_type(*(ptr), ((type *)0)->member) || \
| ^~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:327:3: note: in expansion of macro 'container_of'
327 | container_of(work, struct led_netdev_data, work.work);
| ^~~~~~~~~~~~
In file included from <command-line>:
include/linux/compiler_types.h:140:35: error: invalid use of undefined type 'struct led_netdev_data'
140 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^~~~~~~~~~~~~~~~~~
include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
17 | #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
| ^~~~~~~~~~~~~~~~~~~
include/linux/container_of.h:22:21: note: in expansion of macro 'offsetof'
22 | ((type *)(__mptr - offsetof(type, member))); })
| ^~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:327:3: note: in expansion of macro 'container_of'
327 | container_of(work, struct led_netdev_data, work.work);
| ^~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:341:16: error: 'TRIGGER_NETDEV_TX' undeclared (first use in this function)
341 | if (!test_bit(TRIGGER_NETDEV_TX, &trigger_data->mode) &&
| ^~~~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:342:16: error: 'TRIGGER_NETDEV_RX' undeclared (first use in this function)
342 | !test_bit(TRIGGER_NETDEV_RX, &trigger_data->mode))
| ^~~~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c:355:21: error: 'TRIGGER_NETDEV_LINK' undeclared (first use in this function)
355 | invert = test_bit(TRIGGER_NETDEV_LINK, &trigger_data->mode);
| ^~~~~~~~~~~~~~~~~~~
drivers/leds/trigger/ledtrig-netdev.c: In function 'netdev_trig_activate':
drivers/leds/trigger/ledtrig-netdev.c:375:32: error: invalid application of 'sizeof' to incomplete type 'struct led_netdev_data'
375 | trigger_data = kzalloc(sizeof(struct led_netdev_data), GFP_KERNEL);
| ^~~~~~
In file included from include/linux/wait.h:9,
from include/linux/pid.h:6,
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 drivers/leds/trigger/ledtrig-netdev.c:15:
drivers/leds/trigger/ledtrig-netdev.c:379:30: error: dereferencing pointer to incomplete type 'struct led_netdev_data'
379 | spin_lock_init(&trigger_data->lock);
| ^~
include/linux/spinlock.h:333:38: note: in definition of macro 'spin_lock_init'
333 | __raw_spin_lock_init(spinlock_check(lock), \
| ^~~~
drivers/leds/trigger/ledtrig-netdev.c: In function 'netdev_trig_deactivate':
drivers/leds/trigger/ledtrig-netdev.c:407:45: error: dereferencing pointer to incomplete type 'struct led_netdev_data'
407 | unregister_netdevice_notifier(&trigger_data->notifier);
| ^~
drivers/leds/trigger/ledtrig-netdev.c: In function 'interval_show':
drivers/leds/trigger/ledtrig-netdev.c:238:1: error: control reaches end of non-void function [-Werror=return-type]
238 | }
| ^
drivers/leds/trigger/ledtrig-netdev.c: In function 'netdev_led_attr_show':
drivers/leds/trigger/ledtrig-netdev.c:149:1: error: control reaches end of non-void function [-Werror=return-type]
149 | }
| ^
cc1: some warnings being treated as errors
vim +48 drivers/leds/trigger/ledtrig-netdev.c
06f502f57d0d77 Ben Whitten 2017-12-10 44
06f502f57d0d77 Ben Whitten 2017-12-10 45 static void set_baseline_state(struct led_netdev_data *trigger_data)
06f502f57d0d77 Ben Whitten 2017-12-10 46 {
06f502f57d0d77 Ben Whitten 2017-12-10 47 int current_brightness;
06f502f57d0d77 Ben Whitten 2017-12-10 @48 struct led_classdev *led_cdev = trigger_data->led_cdev;
06f502f57d0d77 Ben Whitten 2017-12-10 49
06f502f57d0d77 Ben Whitten 2017-12-10 50 current_brightness = led_cdev->brightness;
06f502f57d0d77 Ben Whitten 2017-12-10 51 if (current_brightness)
06f502f57d0d77 Ben Whitten 2017-12-10 52 led_cdev->blink_brightness = current_brightness;
06f502f57d0d77 Ben Whitten 2017-12-10 53 if (!led_cdev->blink_brightness)
06f502f57d0d77 Ben Whitten 2017-12-10 54 led_cdev->blink_brightness = led_cdev->max_brightness;
06f502f57d0d77 Ben Whitten 2017-12-10 55
df437de7347286 Ansuel Smith 2021-11-12 56 if (!trigger_data->carrier_link_up) {
06f502f57d0d77 Ben Whitten 2017-12-10 57 led_set_brightness(led_cdev, LED_OFF);
df437de7347286 Ansuel Smith 2021-11-12 58 } else {
4aa7005c8428f8 Ansuel Smith 2021-11-12 59 if (test_bit(TRIGGER_NETDEV_LINK, &trigger_data->mode))
06f502f57d0d77 Ben Whitten 2017-12-10 60 led_set_brightness(led_cdev,
06f502f57d0d77 Ben Whitten 2017-12-10 61 led_cdev->blink_brightness);
06f502f57d0d77 Ben Whitten 2017-12-10 62 else
06f502f57d0d77 Ben Whitten 2017-12-10 63 led_set_brightness(led_cdev, LED_OFF);
06f502f57d0d77 Ben Whitten 2017-12-10 64
06f502f57d0d77 Ben Whitten 2017-12-10 65 /* If we are looking for RX/TX start periodically
06f502f57d0d77 Ben Whitten 2017-12-10 66 * checking stats
06f502f57d0d77 Ben Whitten 2017-12-10 67 */
4aa7005c8428f8 Ansuel Smith 2021-11-12 68 if (test_bit(TRIGGER_NETDEV_TX, &trigger_data->mode) ||
4aa7005c8428f8 Ansuel Smith 2021-11-12 69 test_bit(TRIGGER_NETDEV_RX, &trigger_data->mode))
06f502f57d0d77 Ben Whitten 2017-12-10 70 schedule_delayed_work(&trigger_data->work, 0);
06f502f57d0d77 Ben Whitten 2017-12-10 71 }
06f502f57d0d77 Ben Whitten 2017-12-10 72 }
06f502f57d0d77 Ben Whitten 2017-12-10 73
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
[jolsa-perf:bpf/batch 13/29] kernel/bpf/syscall.c:2858:24: warning: assignment to 'struct bpf_tramp_attach *' from 'int' makes pointer from integer without a cast
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git bpf/batch
head: 5f1f613266bf58f8424a93e1f8b99c4ac8fa6c2b
commit: c04eb2ad90ed0981f4dc7d04249a9c84726f9ef0 [13/29] bpf: Add bpf_tramp_attach layer for trampoline attachment
config: sh-randconfig-r025-20211118 (attached as .config)
compiler: sh4-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/jolsa/perf.git/commit/?id...
git remote add jolsa-perf https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
git fetch --no-tags jolsa-perf bpf/batch
git checkout c04eb2ad90ed0981f4dc7d04249a9c84726f9ef0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=sh
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 >>):
cc1: warning: arch/sh/include/mach-rsk: No such file or directory [-Wmissing-include-dirs]
cc1: warning: arch/sh/include/mach-rsk: No such file or directory [-Wmissing-include-dirs]
In file included from arch/sh/include/asm/bug.h:112,
from include/linux/ktime.h:26,
from include/linux/timer.h:6,
from include/linux/workqueue.h:9,
from include/linux/bpf.h:9,
from kernel/bpf/syscall.c:4:
kernel/bpf/syscall.c: In function 'bpf_tracing_link_release':
kernel/bpf/syscall.c:2668:22: error: implicit declaration of function 'bpf_tramp_attach_unlink'; did you mean 'bpf_cgroup_storage_unlink'? [-Werror=implicit-function-declaration]
2668 | WARN_ON_ONCE(bpf_tramp_attach_unlink(attach));
| ^~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/bug.h:166:32: note: in definition of macro 'WARN_ON'
166 | int __ret_warn_on = !!(condition); \
| ^~~~~~~~~
kernel/bpf/syscall.c:2668:9: note: in expansion of macro 'WARN_ON_ONCE'
2668 | WARN_ON_ONCE(bpf_tramp_attach_unlink(attach));
| ^~~~~~~~~~~~
kernel/bpf/syscall.c:2672:9: error: implicit declaration of function 'bpf_tramp_detach' [-Werror=implicit-function-declaration]
2672 | bpf_tramp_detach(attach);
| ^~~~~~~~~~~~~~~~
kernel/bpf/syscall.c: In function 'bpf_tracing_prog_attach':
kernel/bpf/syscall.c:2769:22: error: implicit declaration of function 'bpf_tramp_id_alloc'; did you mean 'bpf_map_kzalloc'? [-Werror=implicit-function-declaration]
2769 | id = bpf_tramp_id_alloc();
| ^~~~~~~~~~~~~~~~~~
| bpf_map_kzalloc
kernel/bpf/syscall.c:2769:20: warning: assignment to 'struct bpf_tramp_id *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
2769 | id = bpf_tramp_id_alloc();
| ^
kernel/bpf/syscall.c:2782:17: error: implicit declaration of function 'bpf_tramp_id_init' [-Werror=implicit-function-declaration]
2782 | bpf_tramp_id_init(id, tgt_prog, NULL, btf_id);
| ^~~~~~~~~~~~~~~~~
kernel/bpf/syscall.c:2832:20: warning: assignment to 'struct bpf_tramp_id *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
2832 | id = bpf_tramp_id_alloc();
| ^
kernel/bpf/syscall.c:2843:15: error: implicit declaration of function 'bpf_tramp_id_is_empty' [-Werror=implicit-function-declaration]
2843 | (!bpf_tramp_id_is_empty(id) &&
| ^~~~~~~~~~~~~~~~~~~~~
kernel/bpf/syscall.c:2844:15: error: implicit declaration of function 'bpf_tramp_id_is_equal' [-Werror=implicit-function-declaration]
2844 | bpf_tramp_id_is_equal(id, prog->aux->dst_attach->id))) {
| ^~~~~~~~~~~~~~~~~~~~~
kernel/bpf/syscall.c:2858:26: error: implicit declaration of function 'bpf_tramp_attach'; did you mean 'bpf_iter_link_attach'? [-Werror=implicit-function-declaration]
2858 | attach = bpf_tramp_attach(id, tgt_prog, prog);
| ^~~~~~~~~~~~~~~~
| bpf_iter_link_attach
>> kernel/bpf/syscall.c:2858:24: warning: assignment to 'struct bpf_tramp_attach *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
2858 | attach = bpf_tramp_attach(id, tgt_prog, prog);
| ^
kernel/bpf/syscall.c:2879:15: error: implicit declaration of function 'bpf_tramp_attach_link' [-Werror=implicit-function-declaration]
2879 | err = bpf_tramp_attach_link(attach);
| ^~~~~~~~~~~~~~~~~~~~~
kernel/bpf/syscall.c:2917:9: error: implicit declaration of function 'bpf_tramp_id_free' [-Werror=implicit-function-declaration]
2917 | bpf_tramp_id_free(id);
| ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
cc1: warning: arch/sh/include/mach-rsk: No such file or directory [-Wmissing-include-dirs]
cc1: warning: arch/sh/include/mach-rsk: No such file or directory [-Wmissing-include-dirs]
kernel/bpf/verifier.c: In function 'check_attach_btf_id':
kernel/bpf/verifier.c:13998:14: error: implicit declaration of function 'bpf_tramp_id_alloc'; did you mean 'bpf_map_kzalloc'? [-Werror=implicit-function-declaration]
13998 | id = bpf_tramp_id_alloc();
| ^~~~~~~~~~~~~~~~~~
| bpf_map_kzalloc
kernel/bpf/verifier.c:13998:12: warning: assignment to 'struct bpf_tramp_id *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
13998 | id = bpf_tramp_id_alloc();
| ^
kernel/bpf/verifier.c:14002:9: error: implicit declaration of function 'bpf_tramp_id_init' [-Werror=implicit-function-declaration]
14002 | bpf_tramp_id_init(id, tgt_prog, prog->aux->attach_btf, btf_id);
| ^~~~~~~~~~~~~~~~~
kernel/bpf/verifier.c:14005:18: error: implicit declaration of function 'bpf_tramp_attach'; did you mean 'bpf_iter_link_attach'? [-Werror=implicit-function-declaration]
14005 | attach = bpf_tramp_attach(id, tgt_prog, prog);
| ^~~~~~~~~~~~~~~~
| bpf_iter_link_attach
>> kernel/bpf/verifier.c:14005:16: warning: assignment to 'struct bpf_tramp_attach *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
14005 | attach = bpf_tramp_attach(id, tgt_prog, prog);
| ^
kernel/bpf/verifier.c:14007:17: error: implicit declaration of function 'bpf_tramp_id_free' [-Werror=implicit-function-declaration]
14007 | bpf_tramp_id_free(id);
| ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +2858 kernel/bpf/syscall.c
2718
2719 static int bpf_tracing_prog_attach(struct bpf_prog *prog,
2720 int tgt_prog_fd,
2721 u32 btf_id)
2722 {
2723 bool prog_extension = prog->type == BPF_PROG_TYPE_EXT;
2724 struct bpf_tramp_attach *attach = NULL;
2725 struct bpf_link_primer link_primer;
2726 struct bpf_prog *tgt_prog = NULL;
2727 struct bpf_tracing_link *link;
2728 struct bpf_tramp_id *id = NULL;
2729 int err;
2730
2731 switch (prog->type) {
2732 case BPF_PROG_TYPE_TRACING:
2733 if (prog->expected_attach_type != BPF_TRACE_FENTRY &&
2734 prog->expected_attach_type != BPF_TRACE_FEXIT &&
2735 prog->expected_attach_type != BPF_MODIFY_RETURN) {
2736 err = -EINVAL;
2737 goto out_put_prog;
2738 }
2739 break;
2740 case BPF_PROG_TYPE_EXT:
2741 if (prog->expected_attach_type != 0) {
2742 err = -EINVAL;
2743 goto out_put_prog;
2744 }
2745 break;
2746 case BPF_PROG_TYPE_LSM:
2747 if (prog->expected_attach_type != BPF_LSM_MAC) {
2748 err = -EINVAL;
2749 goto out_put_prog;
2750 }
2751 break;
2752 default:
2753 err = -EINVAL;
2754 goto out_put_prog;
2755 }
2756
2757 if (!!tgt_prog_fd != !!btf_id) {
2758 err = -EINVAL;
2759 goto out_put_prog;
2760 }
2761
2762 if (tgt_prog_fd) {
2763 /* For now we only allow new targets for BPF_PROG_TYPE_EXT */
2764 if (prog->type != BPF_PROG_TYPE_EXT) {
2765 err = -EINVAL;
2766 goto out_put_prog;
2767 }
2768
2769 id = bpf_tramp_id_alloc();
2770 if (!id) {
2771 err = -ENOMEM;
2772 goto out_put_prog;
2773 }
2774
2775 tgt_prog = bpf_prog_get(tgt_prog_fd);
2776 if (IS_ERR(tgt_prog)) {
2777 err = PTR_ERR(tgt_prog);
2778 tgt_prog = NULL;
2779 goto out_put_prog;
2780 }
2781
2782 bpf_tramp_id_init(id, tgt_prog, NULL, btf_id);
2783 }
2784
2785 link = kzalloc(sizeof(*link), GFP_USER);
2786 if (!link) {
2787 err = -ENOMEM;
2788 goto out_put_prog;
2789 }
2790 bpf_link_init(&link->link, BPF_LINK_TYPE_TRACING,
2791 &bpf_tracing_link_lops, prog);
2792 link->attach_type = prog->expected_attach_type;
2793
2794 mutex_lock(&prog->aux->dst_mutex);
2795
2796 if (!prog_extension && prog->aux->attach) {
2797 err = -EBUSY;
2798 goto out_unlock;
2799 }
2800
2801 /* There are a few possible cases here:
2802 *
2803 * - if prog->aux->dst_trampoline is set, the program was just loaded
2804 * and not yet attached to anything, so we can use the values stored
2805 * in prog->aux
2806 *
2807 * - if prog->aux->dst_trampoline is NULL, the program has already been
2808 * attached to a target and its initial target was cleared (below)
2809 *
2810 * - if tgt_prog != NULL, the caller specified tgt_prog_fd +
2811 * target_btf_id using the link_create API.
2812 *
2813 * - if tgt_prog == NULL when this function was called using the old
2814 * raw_tracepoint_open API, and we need a target from prog->aux
2815 *
2816 * - if prog->aux->dst_trampoline and tgt_prog is NULL, the program
2817 * was detached and is going for re-attachment.
2818 */
2819 if (!prog->aux->dst_attach && !tgt_prog) {
2820 /*
2821 * Allow re-attach for TRACING and LSM programs. If it's
2822 * currently linked, bpf_trampoline_link_prog will fail.
2823 * EXT programs need to specify tgt_prog_fd, so they
2824 * re-attach in separate code path.
2825 */
2826 if (prog->type != BPF_PROG_TYPE_TRACING &&
2827 prog->type != BPF_PROG_TYPE_LSM) {
2828 err = -EINVAL;
2829 goto out_unlock;
2830 }
2831
2832 id = bpf_tramp_id_alloc();
2833 if (!id) {
2834 err = -ENOMEM;
2835 goto out_unlock;
2836 }
2837
2838 btf_id = prog->aux->attach_btf_id;
2839 bpf_tramp_id_init(id, NULL, prog->aux->attach_btf, btf_id);
2840 }
2841
2842 if (!prog->aux->dst_attach ||
2843 (!bpf_tramp_id_is_empty(id) &&
> 2844 bpf_tramp_id_is_equal(id, prog->aux->dst_attach->id))) {
2845 /* If there is no saved target, or the specified target is
2846 * different from the destination specified at load time, we
2847 * need a new trampoline and a check for compatibility
2848 */
2849 struct bpf_attach_target_info tgt_info = {};
2850
2851 err = bpf_check_attach_target(NULL, prog, tgt_prog, btf_id,
2852 &tgt_info);
2853 if (err)
2854 goto out_unlock;
2855
2856 id->addr = (void *) tgt_info.tgt_addr;
2857
> 2858 attach = bpf_tramp_attach(id, tgt_prog, prog);
2859 if (IS_ERR(attach)) {
2860 err = PTR_ERR(attach);
2861 goto out_unlock;
2862 }
2863 } else {
2864 /* The caller didn't specify a target, or the target was the
2865 * same as the destination supplied during program load. This
2866 * means we can reuse the trampoline and reference from program
2867 * load time, and there is no need to allocate a new one. This
2868 * can only happen once for any program, as the saved values in
2869 * prog->aux are cleared below.
2870 */
2871 attach = prog->aux->dst_attach;
2872 tgt_prog = prog->aux->dst_prog;
2873 }
2874
2875 err = bpf_link_prime(&link->link, &link_primer);
2876 if (err)
2877 goto out_unlock;
2878
2879 err = bpf_tramp_attach_link(attach);
2880 if (err) {
2881 bpf_link_cleanup(&link_primer);
2882 link = NULL;
2883 goto out_unlock;
2884 }
2885
2886 link->tgt_prog = tgt_prog;
2887 if (prog_extension)
2888 link->attach = attach;
2889 else
2890 prog->aux->attach = attach;
2891
2892 /* Always clear the trampoline and target prog from prog->aux to make
2893 * sure the original attach destination is not kept alive after a
2894 * program is (re-)attached to another target.
2895 */
2896 if (prog->aux->dst_prog &&
2897 (tgt_prog_fd || attach != prog->aux->dst_attach))
2898 /* got extra prog ref from syscall, or attaching to different prog */
2899 bpf_prog_put(prog->aux->dst_prog);
2900 if (prog->aux->dst_attach && attach != prog->aux->dst_attach)
2901 /* we allocated a new trampoline, so free the old one */
2902 bpf_tramp_detach(prog->aux->dst_attach);
2903
2904 prog->aux->dst_prog = NULL;
2905 prog->aux->dst_attach = NULL;
2906 mutex_unlock(&prog->aux->dst_mutex);
2907
2908 return bpf_link_settle(&link_primer);
2909 out_unlock:
2910 if (attach && attach != prog->aux->dst_attach)
2911 bpf_tramp_detach(attach);
2912 mutex_unlock(&prog->aux->dst_mutex);
2913 kfree(link);
2914 out_put_prog:
2915 if (tgt_prog_fd && tgt_prog)
2916 bpf_prog_put(tgt_prog);
2917 bpf_tramp_id_free(id);
2918 return err;
2919 }
2920
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
Re: [PATCH v13 2/3] fpga: bridge: Use standard dev_release for class driver
by kernel test robot
Hi Russ,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linux/master]
[also build test ERROR on linus/master v5.16-rc1 next-20211118]
[cannot apply to xilinx-xlnx/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/Russ-Weight/fpga-Use-standard-cl...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 8ab774587903771821b59471cc723bba6d893942
config: arm-randconfig-r021-20211118 (attached as .config)
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://github.com/0day-ci/linux/commit/cbab51e5108b1de0ce5fca9901f5b462c...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Russ-Weight/fpga-Use-standard-class-dev_release-function/20211117-092426
git checkout cbab51e5108b1de0ce5fca9901f5b462cc62a71d
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/fpga/
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/fpga/altera-fpga2sdram.c:127:18: error: use of undeclared identifier 'mgr'
return PTR_ERR(mgr);
^
1 error generated.
vim +/mgr +127 drivers/fpga/altera-fpga2sdram.c
93
94 static int alt_fpga_bridge_probe(struct platform_device *pdev)
95 {
96 struct device *dev = &pdev->dev;
97 struct alt_fpga2sdram_data *priv;
98 struct fpga_bridge *br;
99 u32 enable;
100 struct regmap *sysmgr;
101 int ret = 0;
102
103 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
104 if (!priv)
105 return -ENOMEM;
106
107 priv->dev = dev;
108
109 priv->sdrctl = syscon_regmap_lookup_by_compatible("altr,sdr-ctl");
110 if (IS_ERR(priv->sdrctl)) {
111 dev_err(dev, "regmap for altr,sdr-ctl lookup failed.\n");
112 return PTR_ERR(priv->sdrctl);
113 }
114
115 sysmgr = syscon_regmap_lookup_by_compatible("altr,sys-mgr");
116 if (IS_ERR(sysmgr)) {
117 dev_err(dev, "regmap for altr,sys-mgr lookup failed.\n");
118 return PTR_ERR(sysmgr);
119 }
120
121 /* Get f2s bridge configuration saved in handoff register */
122 regmap_read(sysmgr, SYSMGR_ISWGRP_HANDOFF3, &priv->mask);
123
124 br = fpga_bridge_register(dev, F2S_BRIDGE_NAME,
125 &altera_fpga2sdram_br_ops, priv);
126 if (IS_ERR(br))
> 127 return PTR_ERR(mgr);
128
129 platform_set_drvdata(pdev, br);
130
131 dev_info(dev, "driver initialized with handoff %08x\n", priv->mask);
132
133 if (!of_property_read_u32(dev->of_node, "bridge-enable", &enable)) {
134 if (enable > 1) {
135 dev_warn(dev, "invalid bridge-enable %u > 1\n", enable);
136 } else {
137 dev_info(dev, "%s bridge\n",
138 (enable ? "enabling" : "disabling"));
139 ret = _alt_fpga2sdram_enable_set(priv, enable);
140 if (ret) {
141 fpga_bridge_unregister(br);
142 return ret;
143 }
144 }
145 }
146
147 return ret;
148 }
149
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
[android-common:android12-5.10-2021-09 6732/10851] arch/arm64/kvm/hyp/nvhe/hyp-main.c:245:3: error: implicit declaration of function 'sve_cond_update_zcr_vq'
by kernel test robot
Hi Marc,
FYI, the error/warning still remains.
tree: https://android.googlesource.com/kernel/common android12-5.10-2021-09
head: 0a07ca4e42c839ccc8cfcfa63078c9cb580c7d3b
commit: 194fd166b5d5f6694047b45dc409f9620a8a9646 [6732/10851] BACKPORT: FROMGIT: KVM: arm64: Trap host SVE accesses when the FPSIMD state is dirty
config: arm64-buildonly-randconfig-r004-20211004 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c0039de2953d15815448b4b3c3bafb45607781e0)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-5.10-2021-09
git checkout 194fd166b5d5f6694047b45dc409f9620a8a9646
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm64
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/arm64/kvm/hyp/nvhe/hyp-main.c:7:
arch/arm64/kvm/hyp/include/hyp/switch.h:216:2: error: implicit declaration of function 'sve_cond_update_zcr_vq' [-Werror,-Wimplicit-function-declaration]
sve_cond_update_zcr_vq(vcpu_sve_max_vq(vcpu) - 1, SYS_ZCR_EL2);
^
>> arch/arm64/kvm/hyp/nvhe/hyp-main.c:245:3: error: implicit declaration of function 'sve_cond_update_zcr_vq' [-Werror,-Wimplicit-function-declaration]
sve_cond_update_zcr_vq(ZCR_ELx_LEN_MASK, SYS_ZCR_EL2);
^
arch/arm64/kvm/hyp/nvhe/hyp-main.c:233:6: warning: no previous prototype for function 'handle_trap' [-Wmissing-prototypes]
void handle_trap(struct kvm_cpu_context *host_ctxt)
^
arch/arm64/kvm/hyp/nvhe/hyp-main.c:233:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void handle_trap(struct kvm_cpu_context *host_ctxt)
^
static
1 warning and 2 errors generated.
vim +/sve_cond_update_zcr_vq +245 arch/arm64/kvm/hyp/nvhe/hyp-main.c
232
233 void handle_trap(struct kvm_cpu_context *host_ctxt)
234 {
235 u64 esr = read_sysreg_el2(SYS_ESR);
236
237 switch (ESR_ELx_EC(esr)) {
238 case ESR_ELx_EC_HVC64:
239 handle_host_hcall(host_ctxt);
240 break;
241 case ESR_ELx_EC_SMC64:
242 handle_host_smc(host_ctxt);
243 break;
244 case ESR_ELx_EC_SVE:
> 245 sve_cond_update_zcr_vq(ZCR_ELx_LEN_MASK, SYS_ZCR_EL2);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months