[peterz-queue:x86/fpu 5/9] arch/x86/kernel/jump_label.c:42:31: error: 'init' undeclared; did you mean
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git x86/fpu
head: 42088f5f7dcaf5e6d51b71cb32097ca4dad9b225
commit: ea9a8a73e58ed8b9a24d6c84c033c7064fe2a05c [5/9] jump_label, x86: Improve error when we fail expected text
config: x86_64-rhel-8.3 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?...
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue x86/fpu
git checkout ea9a8a73e58ed8b9a24d6c84c033c7064fe2a05c
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
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 include/linux/kernel.h:16,
from arch/x86/include/asm/percpu.h:27,
from arch/x86/include/asm/current.h:6,
from include/linux/sched.h:12,
from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from include/linux/node.h:18,
from include/linux/memory.h:19,
from arch/x86/kernel/jump_label.c:9:
arch/x86/kernel/jump_label.c: In function '__jump_label_set_jump_code':
>> arch/x86/kernel/jump_label.c:42:31: error: 'init' undeclared (first use in this function); did you mean 'int'?
42 | addr, addr, addr, expect, init, type);
| ^~~~
include/linux/printk.h:333:34: note: in definition of macro 'pr_crit'
333 | printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~
arch/x86/kernel/jump_label.c:42:31: note: each undeclared identifier is reported only once for each function it appears in
42 | addr, addr, addr, expect, init, type);
| ^~~~
include/linux/printk.h:333:34: note: in definition of macro 'pr_crit'
333 | printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~
vim +42 arch/x86/kernel/jump_label.c
18
19 static const void *
20 __jump_label_set_jump_code(struct jump_entry *entry, enum jump_label_type type)
21 {
22 const void *expect, *code;
23 const void *addr, *dest;
24
25 addr = (void *)jump_entry_code(entry);
26 dest = (void *)jump_entry_target(entry);
27
28 code = text_gen_insn(JMP32_INSN_OPCODE, addr, dest);
29
30 if (type == JUMP_LABEL_JMP)
31 expect = x86_nops[5];
32 else
33 expect = code;
34
35 if (memcmp(addr, expect, JUMP_LABEL_NOP_SIZE)) {
36 /*
37 * The location is not an op that we were expecting.
38 * Something went wrong. Crash the box, as something could be
39 * corrupting the kernel.
40 */
41 pr_crit("jump_label: Fatal kernel bug, unexpected op at %pS [%p] (%5ph != %5ph)) init:%d type:%d\n",
> 42 addr, addr, addr, expect, init, type);
43 BUG();
44 }
45
46 if (type == JUMP_LABEL_NOP)
47 code = x86_nops[5];
48
49 return code;
50 }
51
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH 3/7] tracing: Pass buffer of event to trigger operations
by kernel test robot
Hi Steven,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linux/master]
[also build test ERROR on linus/master v5.12-rc2 next-20210312]
[cannot apply to tip/perf/core hnaz-linux-mm/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/Steven-Rostedt/tracing-Have-ring...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a74e6a014c9d4d4161061f770c9b4f98372ac778
config: x86_64-randconfig-a004-20210312 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project dfd27ebbd0eb137c9a439b7c537bb87ba903efd3)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/e0953acfef6e9234feed2877ed1b0a796...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Steven-Rostedt/tracing-Have-ring_buffer_event_time_stamp-work-for-all-events/20210313-051807
git checkout e0953acfef6e9234feed2877ed1b0a796755ceb6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> kernel/trace/trace_events_hist.c:3191:30: error: incompatible function pointer types assigning to 'action_fn_t' (aka 'void (*)(struct hist_trigger_data *, struct tracing_map_elt *, struct trace_buffer *, void *, struct ring_buffer_event *, void *, struct action_data *, unsigned long long *)') from 'void (struct hist_trigger_data *, struct tracing_map_elt *, void *, struct ring_buffer_event *, void *, struct action_data *, u64 *)' (aka 'void (struct hist_trigger_data *, struct tracing_map_elt *, void *, struct ring_buffer_event *, void *, struct action_data *, unsigned long long *)') [-Werror,-Wincompatible-function-pointer-types]
data->track_data.save_data = save_track_data_snapshot;
^ ~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
vim +3191 kernel/trace/trace_events_hist.c
50450603ec9cb8 Tom Zanussi 2018-01-15 3125
d0cd871ba0d613 Steven Rostedt (VMware 2019-04-01 3126) static int action_parse(struct trace_array *tr, char *str, struct action_data *data,
7d18a10c316783 Tom Zanussi 2019-02-13 3127 enum handler_id handler)
7d18a10c316783 Tom Zanussi 2019-02-13 3128 {
7d18a10c316783 Tom Zanussi 2019-02-13 3129 char *action_name;
7d18a10c316783 Tom Zanussi 2019-02-13 3130 int ret = 0;
7d18a10c316783 Tom Zanussi 2019-02-13 3131
7d18a10c316783 Tom Zanussi 2019-02-13 3132 strsep(&str, ".");
7d18a10c316783 Tom Zanussi 2019-02-13 3133 if (!str) {
d0cd871ba0d613 Steven Rostedt (VMware 2019-04-01 3134) hist_err(tr, HIST_ERR_ACTION_NOT_FOUND, 0);
7d18a10c316783 Tom Zanussi 2019-02-13 3135 ret = -EINVAL;
7d18a10c316783 Tom Zanussi 2019-02-13 3136 goto out;
7d18a10c316783 Tom Zanussi 2019-02-13 3137 }
7d18a10c316783 Tom Zanussi 2019-02-13 3138
7d18a10c316783 Tom Zanussi 2019-02-13 3139 action_name = strsep(&str, "(");
7d18a10c316783 Tom Zanussi 2019-02-13 3140 if (!action_name || !str) {
d0cd871ba0d613 Steven Rostedt (VMware 2019-04-01 3141) hist_err(tr, HIST_ERR_ACTION_NOT_FOUND, 0);
7d18a10c316783 Tom Zanussi 2019-02-13 3142 ret = -EINVAL;
7d18a10c316783 Tom Zanussi 2019-02-13 3143 goto out;
7d18a10c316783 Tom Zanussi 2019-02-13 3144 }
7d18a10c316783 Tom Zanussi 2019-02-13 3145
7d18a10c316783 Tom Zanussi 2019-02-13 3146 if (str_has_prefix(action_name, "save")) {
7d18a10c316783 Tom Zanussi 2019-02-13 3147 char *params = strsep(&str, ")");
7d18a10c316783 Tom Zanussi 2019-02-13 3148
7d18a10c316783 Tom Zanussi 2019-02-13 3149 if (!params) {
d0cd871ba0d613 Steven Rostedt (VMware 2019-04-01 3150) hist_err(tr, HIST_ERR_NO_SAVE_PARAMS, 0);
7d18a10c316783 Tom Zanussi 2019-02-13 3151 ret = -EINVAL;
7d18a10c316783 Tom Zanussi 2019-02-13 3152 goto out;
7d18a10c316783 Tom Zanussi 2019-02-13 3153 }
7d18a10c316783 Tom Zanussi 2019-02-13 3154
d0cd871ba0d613 Steven Rostedt (VMware 2019-04-01 3155) ret = parse_action_params(tr, params, data);
7d18a10c316783 Tom Zanussi 2019-02-13 3156 if (ret)
7d18a10c316783 Tom Zanussi 2019-02-13 3157 goto out;
7d18a10c316783 Tom Zanussi 2019-02-13 3158
7d18a10c316783 Tom Zanussi 2019-02-13 3159 if (handler == HANDLER_ONMAX)
466f4528fbc692 Tom Zanussi 2019-02-13 3160 data->track_data.check_val = check_track_val_max;
dff81f559285b5 Tom Zanussi 2019-02-13 3161 else if (handler == HANDLER_ONCHANGE)
dff81f559285b5 Tom Zanussi 2019-02-13 3162 data->track_data.check_val = check_track_val_changed;
466f4528fbc692 Tom Zanussi 2019-02-13 3163 else {
d0cd871ba0d613 Steven Rostedt (VMware 2019-04-01 3164) hist_err(tr, HIST_ERR_ACTION_MISMATCH, errpos(action_name));
466f4528fbc692 Tom Zanussi 2019-02-13 3165 ret = -EINVAL;
466f4528fbc692 Tom Zanussi 2019-02-13 3166 goto out;
466f4528fbc692 Tom Zanussi 2019-02-13 3167 }
7d18a10c316783 Tom Zanussi 2019-02-13 3168
466f4528fbc692 Tom Zanussi 2019-02-13 3169 data->track_data.save_data = save_track_data_vars;
466f4528fbc692 Tom Zanussi 2019-02-13 3170 data->fn = ontrack_action;
7d18a10c316783 Tom Zanussi 2019-02-13 3171 data->action = ACTION_SAVE;
a3785b7eca8fd4 Tom Zanussi 2019-02-13 3172 } else if (str_has_prefix(action_name, "snapshot")) {
a3785b7eca8fd4 Tom Zanussi 2019-02-13 3173 char *params = strsep(&str, ")");
a3785b7eca8fd4 Tom Zanussi 2019-02-13 3174
a3785b7eca8fd4 Tom Zanussi 2019-02-13 3175 if (!str) {
d0cd871ba0d613 Steven Rostedt (VMware 2019-04-01 3176) hist_err(tr, HIST_ERR_NO_CLOSING_PAREN, errpos(params));
a3785b7eca8fd4 Tom Zanussi 2019-02-13 3177 ret = -EINVAL;
a3785b7eca8fd4 Tom Zanussi 2019-02-13 3178 goto out;
a3785b7eca8fd4 Tom Zanussi 2019-02-13 3179 }
a3785b7eca8fd4 Tom Zanussi 2019-02-13 3180
a3785b7eca8fd4 Tom Zanussi 2019-02-13 3181 if (handler == HANDLER_ONMAX)
a3785b7eca8fd4 Tom Zanussi 2019-02-13 3182 data->track_data.check_val = check_track_val_max;
dff81f559285b5 Tom Zanussi 2019-02-13 3183 else if (handler == HANDLER_ONCHANGE)
dff81f559285b5 Tom Zanussi 2019-02-13 3184 data->track_data.check_val = check_track_val_changed;
a3785b7eca8fd4 Tom Zanussi 2019-02-13 3185 else {
d0cd871ba0d613 Steven Rostedt (VMware 2019-04-01 3186) hist_err(tr, HIST_ERR_ACTION_MISMATCH, errpos(action_name));
a3785b7eca8fd4 Tom Zanussi 2019-02-13 3187 ret = -EINVAL;
a3785b7eca8fd4 Tom Zanussi 2019-02-13 3188 goto out;
a3785b7eca8fd4 Tom Zanussi 2019-02-13 3189 }
a3785b7eca8fd4 Tom Zanussi 2019-02-13 3190
a3785b7eca8fd4 Tom Zanussi 2019-02-13 @3191 data->track_data.save_data = save_track_data_snapshot;
a3785b7eca8fd4 Tom Zanussi 2019-02-13 3192 data->fn = ontrack_action;
a3785b7eca8fd4 Tom Zanussi 2019-02-13 3193 data->action = ACTION_SNAPSHOT;
7d18a10c316783 Tom Zanussi 2019-02-13 3194 } else {
7d18a10c316783 Tom Zanussi 2019-02-13 3195 char *params = strsep(&str, ")");
7d18a10c316783 Tom Zanussi 2019-02-13 3196
e91eefd731d933 Tom Zanussi 2019-02-13 3197 if (str_has_prefix(action_name, "trace"))
e91eefd731d933 Tom Zanussi 2019-02-13 3198 data->use_trace_keyword = true;
e91eefd731d933 Tom Zanussi 2019-02-13 3199
7d18a10c316783 Tom Zanussi 2019-02-13 3200 if (params) {
d0cd871ba0d613 Steven Rostedt (VMware 2019-04-01 3201) ret = parse_action_params(tr, params, data);
7d18a10c316783 Tom Zanussi 2019-02-13 3202 if (ret)
7d18a10c316783 Tom Zanussi 2019-02-13 3203 goto out;
7d18a10c316783 Tom Zanussi 2019-02-13 3204 }
7d18a10c316783 Tom Zanussi 2019-02-13 3205
466f4528fbc692 Tom Zanussi 2019-02-13 3206 if (handler == HANDLER_ONMAX)
466f4528fbc692 Tom Zanussi 2019-02-13 3207 data->track_data.check_val = check_track_val_max;
dff81f559285b5 Tom Zanussi 2019-02-13 3208 else if (handler == HANDLER_ONCHANGE)
dff81f559285b5 Tom Zanussi 2019-02-13 3209 data->track_data.check_val = check_track_val_changed;
466f4528fbc692 Tom Zanussi 2019-02-13 3210
466f4528fbc692 Tom Zanussi 2019-02-13 3211 if (handler != HANDLER_ONMATCH) {
466f4528fbc692 Tom Zanussi 2019-02-13 3212 data->track_data.save_data = action_trace;
466f4528fbc692 Tom Zanussi 2019-02-13 3213 data->fn = ontrack_action;
466f4528fbc692 Tom Zanussi 2019-02-13 3214 } else
7d18a10c316783 Tom Zanussi 2019-02-13 3215 data->fn = action_trace;
466f4528fbc692 Tom Zanussi 2019-02-13 3216
7d18a10c316783 Tom Zanussi 2019-02-13 3217 data->action = ACTION_TRACE;
7d18a10c316783 Tom Zanussi 2019-02-13 3218 }
7d18a10c316783 Tom Zanussi 2019-02-13 3219
7d18a10c316783 Tom Zanussi 2019-02-13 3220 data->action_name = kstrdup(action_name, GFP_KERNEL);
7d18a10c316783 Tom Zanussi 2019-02-13 3221 if (!data->action_name) {
7d18a10c316783 Tom Zanussi 2019-02-13 3222 ret = -ENOMEM;
7d18a10c316783 Tom Zanussi 2019-02-13 3223 goto out;
7d18a10c316783 Tom Zanussi 2019-02-13 3224 }
7d18a10c316783 Tom Zanussi 2019-02-13 3225
7d18a10c316783 Tom Zanussi 2019-02-13 3226 data->handler = handler;
7d18a10c316783 Tom Zanussi 2019-02-13 3227 out:
7d18a10c316783 Tom Zanussi 2019-02-13 3228 return ret;
7d18a10c316783 Tom Zanussi 2019-02-13 3229 }
7d18a10c316783 Tom Zanussi 2019-02-13 3230
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[chrome-os:chromeos-4.19 1/1] drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_if.c:497:18: error: variable 'dpb_fields' set but not used
by kernel test robot
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-4.19
head: 6c21ad6b2e8c303ad5c1f7c0fbeec2dcb2590584
commit: 6c21ad6b2e8c303ad5c1f7c0fbeec2dcb2590584 [1/1] CHROMIUM: media: align H.264 stateless interface with upstream
config: arm64-chromiumos-arm64-customedconfig-chrome-os:chromeos-4.19:6c21ad6b2e8c303ad5c1f7c0fbeec2dcb2590584 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-4.19
git checkout 6c21ad6b2e8c303ad5c1f7c0fbeec2dcb2590584
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross 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 >>):
drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_if.c: In function 'get_vdec_decode_parameters':
>> drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_if.c:497:18: error: variable 'dpb_fields' set but not used [-Werror=unused-but-set-variable]
497 | enum v4l2_field dpb_fields[V4L2_H264_NUM_DPB_ENTRIES];
| ^~~~~~~~~~
drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_if.c: In function 'get_pic_info':
drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_if.c:602:27: error: parameter 'pic' set but not used [-Werror=unused-but-set-parameter]
602 | struct vdec_pic_info *pic)
| ~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_if.c: In function 'vdec_h264_slice_decode':
drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_if.c:736:28: error: variable 'dst_buf_info' set but not used [-Werror=unused-but-set-variable]
736 | struct mtk_video_dec_buf *dst_buf_info;
| ^~~~~~~~~~~~
drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_if.c:735:28: error: variable 'src_buf_info' set but not used [-Werror=unused-but-set-variable]
735 | struct mtk_video_dec_buf *src_buf_info;
| ^~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/dpb_fields +497 drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_if.c
700c75679aed6f Alexandre Courbot 2019-11-14 482
31f9ea2329ceef Yunfei Dong 2019-05-17 483 static void get_vdec_decode_parameters(struct vdec_h264_slice_inst *inst)
31f9ea2329ceef Yunfei Dong 2019-05-17 484 {
700c75679aed6f Alexandre Courbot 2019-11-14 485 const struct v4l2_ctrl_h264_decode_params *dec_params =
6c21ad6b2e8c30 Alexandre Courbot 2021-02-24 486 get_ctrl_ptr(inst->ctx, V4L2_CID_STATELESS_H264_DECODE_PARAMS);
2533b049b95777 Alexandre Courbot 2021-02-19 487 const struct v4l2_ctrl_h264_sps *sps =
6c21ad6b2e8c30 Alexandre Courbot 2021-02-24 488 get_ctrl_ptr(inst->ctx, V4L2_CID_STATELESS_H264_SPS);
2533b049b95777 Alexandre Courbot 2021-02-19 489 const struct v4l2_ctrl_h264_pps *pps =
6c21ad6b2e8c30 Alexandre Courbot 2021-02-24 490 get_ctrl_ptr(inst->ctx, V4L2_CID_STATELESS_H264_PPS);
6c21ad6b2e8c30 Alexandre Courbot 2021-02-24 491 const struct v4l2_ctrl_h264_scaling_matrix *scaling_matrix =
6c21ad6b2e8c30 Alexandre Courbot 2021-02-24 492 get_ctrl_ptr(inst->ctx, V4L2_CID_STATELESS_H264_SCALING_MATRIX);
6c21ad6b2e8c30 Alexandre Courbot 2021-02-24 493 struct mtk_h264_dec_slice_param *slice_param = &inst->h264_slice_param;
700c75679aed6f Alexandre Courbot 2019-11-14 494 struct v4l2_ctrl_h264_decode_params fixed_params = *dec_params;
2533b049b95777 Alexandre Courbot 2021-02-19 495 u8 translation_table[V4L2_H264_NUM_DPB_ENTRIES] = { 0x20, };
2533b049b95777 Alexandre Courbot 2021-02-19 496 struct v4l2_h264_reflist_builder reflist_builder;
2533b049b95777 Alexandre Courbot 2021-02-19 @497 enum v4l2_field dpb_fields[V4L2_H264_NUM_DPB_ENTRIES];
2533b049b95777 Alexandre Courbot 2021-02-19 498 u8 *p0_reflist = slice_param->decode_params.ref_pic_list_p0;
2533b049b95777 Alexandre Courbot 2021-02-19 499 u8 *b0_reflist = slice_param->decode_params.ref_pic_list_b0;
2533b049b95777 Alexandre Courbot 2021-02-19 500 u8 *b1_reflist = slice_param->decode_params.ref_pic_list_b1;
2533b049b95777 Alexandre Courbot 2021-02-19 501 int i;
700c75679aed6f Alexandre Courbot 2019-11-14 502
700c75679aed6f Alexandre Courbot 2019-11-14 503 update_dpb(dec_params, inst->dpb, translation_table);
700c75679aed6f Alexandre Courbot 2019-11-14 504 memcpy(fixed_params.dpb, inst->dpb, sizeof(inst->dpb));
700c75679aed6f Alexandre Courbot 2019-11-14 505
2533b049b95777 Alexandre Courbot 2021-02-19 506 get_h264_sps_parameters(&slice_param->sps, sps);
2533b049b95777 Alexandre Courbot 2021-02-19 507 get_h264_pps_parameters(&slice_param->pps, pps);
6c21ad6b2e8c30 Alexandre Courbot 2021-02-24 508 get_h264_scaling_matrix(&slice_param->scaling_matrix, scaling_matrix);
700c75679aed6f Alexandre Courbot 2019-11-14 509 get_h264_decode_parameters(&slice_param->decode_params, &fixed_params);
17c95456b9a923 Alexandre Courbot 2019-10-11 510 get_h264_dpb_list(inst, slice_param);
17c95456b9a923 Alexandre Courbot 2019-10-11 511
2533b049b95777 Alexandre Courbot 2021-02-19 512 /* Prepare the fields for our reference lists */
2533b049b95777 Alexandre Courbot 2021-02-19 513 for (i = 0; i < V4L2_H264_NUM_DPB_ENTRIES; i++)
2533b049b95777 Alexandre Courbot 2021-02-19 514 dpb_fields[i] = slice_param->h264_dpb_info[i].field;
2533b049b95777 Alexandre Courbot 2021-02-19 515 /* Build the reference lists */
6c21ad6b2e8c30 Alexandre Courbot 2021-02-24 516 v4l2_h264_init_reflist_builder(&reflist_builder, &fixed_params, sps,
6c21ad6b2e8c30 Alexandre Courbot 2021-02-24 517 dec_params->dpb);
2533b049b95777 Alexandre Courbot 2021-02-19 518 v4l2_h264_build_p_ref_list(&reflist_builder, p0_reflist);
2533b049b95777 Alexandre Courbot 2021-02-19 519 v4l2_h264_build_b_ref_lists(&reflist_builder, b0_reflist, b1_reflist);
2533b049b95777 Alexandre Courbot 2021-02-19 520 /* Adapt the built lists to the firmware's expectations */
2533b049b95777 Alexandre Courbot 2021-02-19 521 fixup_ref_list(p0_reflist, translation_table, reflist_builder.num_valid);
2533b049b95777 Alexandre Courbot 2021-02-19 522 fixup_ref_list(b0_reflist, translation_table, reflist_builder.num_valid);
2533b049b95777 Alexandre Courbot 2021-02-19 523 fixup_ref_list(b1_reflist, translation_table, reflist_builder.num_valid);
2533b049b95777 Alexandre Courbot 2021-02-19 524
cff93e7cfaa386 Alexandre Courbot 2020-02-10 525 memcpy(&inst->vsi_ctx.h264_slice_params, slice_param,
cff93e7cfaa386 Alexandre Courbot 2020-02-10 526 sizeof(inst->vsi_ctx.h264_slice_params));
31f9ea2329ceef Yunfei Dong 2019-05-17 527 }
31f9ea2329ceef Yunfei Dong 2019-05-17 528
:::::: The code at line 497 was first introduced by commit
:::::: 2533b049b957778892305d1efd59ce7dd749f2d0 CHROMIUM: media: mtk-vcodec: compute P/B0/B1 reflists in-driver
:::::: TO: Alexandre Courbot <acourbot(a)chromium.org>
:::::: CC: Commit Bot <commit-bot(a)chromium.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[ast:fexit_fix 2/2] kernel/bpf/trampoline.c:199:30: warning: no previous prototype for function 'bpf_trampoline_image_alloc'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git fexit_fix
head: d0953e3c28d70fa9d39e6db07d2cffbe7ce1f0e2
commit: d0953e3c28d70fa9d39e6db07d2cffbe7ce1f0e2 [2/2] bpf: Fix fexit trampoline.
config: x86_64-randconfig-a001-20210312 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project dfd27ebbd0eb137c9a439b7c537bb87ba903efd3)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git/commit/?id=d0...
git remote add ast https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git
git fetch --no-tags ast fexit_fix
git checkout d0953e3c28d70fa9d39e6db07d2cffbe7ce1f0e2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> kernel/bpf/trampoline.c:199:30: warning: no previous prototype for function 'bpf_trampoline_image_alloc' [-Wmissing-prototypes]
struct bpf_trampoline_image *bpf_trampoline_image_alloc(u64 key, u32 idx)
^
kernel/bpf/trampoline.c:199:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
struct bpf_trampoline_image *bpf_trampoline_image_alloc(u64 key, u32 idx)
^
static
1 warning generated.
vim +/bpf_trampoline_image_alloc +199 kernel/bpf/trampoline.c
198
> 199 struct bpf_trampoline_image *bpf_trampoline_image_alloc(u64 key, u32 idx)
200 {
201 struct bpf_trampoline_image *im;
202 struct bpf_ksym *ksym;
203 void *image;
204 int err = -ENOMEM;
205
206 im = kzalloc(sizeof(*im), GFP_KERNEL);
207 if (!im)
208 goto out;
209
210 err = bpf_jit_charge_modmem(1);
211 if (err)
212 goto out_free_im;
213
214 err = -ENOMEM;
215 im->image = image = bpf_jit_alloc_exec_page();
216 if (!image)
217 goto out_uncharge;
218
219 ksym = &im->ksym;
220 INIT_LIST_HEAD_RCU(&ksym->lnode);
221 snprintf(ksym->name, KSYM_NAME_LEN, "bpf_trampoline_%llu_%u", key, idx);
222 bpf_image_ksym_add(image, ksym);
223 return im;
224
225 out_uncharge:
226 bpf_jit_uncharge_modmem(1);
227 out_free_im:
228 kfree(im);
229 out:
230 return ERR_PTR(err);
231 }
232
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[hch-block:block-bounce-cleanup 4/11] BusLogic.c:undefined reference to `request_dma'
by kernel test robot
tree: git://git.infradead.org/users/hch/block.git block-bounce-cleanup
head: bb6d941be26e508030279546206273d4864a2581
commit: 36e17b3bca7ea147c81ada2a639593800a179255 [4/11] Buslogic: remove ISA support
config: mips-allyesconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add hch-block git://git.infradead.org/users/hch/block.git
git fetch --no-tags hch-block block-bounce-cleanup
git checkout 36e17b3bca7ea147c81ada2a639593800a179255
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/mips/kernel/head.o: in function `kernel_entry':
(.ref.text+0xac): relocation truncated to fit: R_MIPS_26 against `start_kernel'
init/main.o: in function `set_reset_devices':
main.c:(.init.text+0x20): relocation truncated to fit: R_MIPS_26 against `_mcount'
main.c:(.init.text+0x30): relocation truncated to fit: R_MIPS_26 against `__sanitizer_cov_trace_pc'
init/main.o: in function `debug_kernel':
main.c:(.init.text+0x9c): relocation truncated to fit: R_MIPS_26 against `_mcount'
main.c:(.init.text+0xac): relocation truncated to fit: R_MIPS_26 against `__sanitizer_cov_trace_pc'
init/main.o: in function `quiet_kernel':
main.c:(.init.text+0x118): relocation truncated to fit: R_MIPS_26 against `_mcount'
main.c:(.init.text+0x128): relocation truncated to fit: R_MIPS_26 against `__sanitizer_cov_trace_pc'
init/main.o: in function `init_setup':
main.c:(.init.text+0x1ac): relocation truncated to fit: R_MIPS_26 against `_mcount'
main.c:(.init.text+0x1cc): relocation truncated to fit: R_MIPS_26 against `__sanitizer_cov_trace_pc'
main.c:(.init.text+0x204): relocation truncated to fit: R_MIPS_26 against `__sanitizer_cov_trace_pc'
main.c:(.init.text+0x22c): additional relocation overflows omitted from the output
mips-linux-ld: drivers/scsi/BusLogic.o: in function `blogic_init':
>> BusLogic.c:(.init.text+0x6d30): undefined reference to `request_dma'
mips-linux-ld: drivers/scsi/BusLogic.o: in function `blogic_relres':
>> BusLogic.c:(.text.unlikely.blogic_relres+0x80): undefined reference to `free_dma'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[linux-next:master 2408/4141] drivers/scsi/sg.c:2198:1: warning: the frame size of 2144 bytes is larger than 2048 bytes
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: d98f554b318f57ded14684c04b3337a1975cf490
commit: ed130bcd75fe26da9165d0a9f9df931aa8c47fc9 [2408/4141] scsi: sg: Track lowest inactive and await indexes
config: arm-randconfig-r036-20210312 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout ed130bcd75fe26da9165d0a9f9df931aa8c47fc9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.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 >>):
drivers/scsi/sg.c: In function 'sg_ioctl_common':
>> drivers/scsi/sg.c:2198:1: warning: the frame size of 2144 bytes is larger than 2048 bytes [-Wframe-larger-than=]
2198 | }
| ^
vim +2198 drivers/scsi/sg.c
c99d01af2aa92f Douglas Gilbert 2021-02-19 1978
37b9d1e0017b2d Jörn Engel 2012-04-12 1979 static long
da0b8f731b3ccc Douglas Gilbert 2021-02-19 1980 sg_ioctl_common(struct file *filp, struct sg_device *sdp, struct sg_fd *sfp,
d320a9551e394c Arnd Bergmann 2019-03-15 1981 unsigned int cmd_in, void __user *p)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1982 {
c99d01af2aa92f Douglas Gilbert 2021-02-19 1983 bool read_only = O_RDWR != (filp->f_flags & O_ACCMODE);
c99d01af2aa92f Douglas Gilbert 2021-02-19 1984 int val;
c99d01af2aa92f Douglas Gilbert 2021-02-19 1985 int result = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1986 int __user *ip = p;
da0b8f731b3ccc Douglas Gilbert 2021-02-19 1987 struct sg_request *srp;
c99d01af2aa92f Douglas Gilbert 2021-02-19 1988 struct scsi_device *sdev;
763d5d3c1d381f Douglas Gilbert 2021-02-19 1989 unsigned long idx;
c99d01af2aa92f Douglas Gilbert 2021-02-19 1990 __maybe_unused const char *pmlp = ", pass to mid-level";
^1da177e4c3f41 Linus Torvalds 2005-04-16 1991
b0d532124dd2c2 Douglas Gilbert 2021-02-19 1992 SG_LOG(6, sfp, "%s: cmd=0x%x, O_NONBLOCK=%d\n", __func__, cmd_in,
b0d532124dd2c2 Douglas Gilbert 2021-02-19 1993 !!(filp->f_flags & O_NONBLOCK));
c99d01af2aa92f Douglas Gilbert 2021-02-19 1994 if (unlikely(SG_IS_DETACHING(sdp)))
c99d01af2aa92f Douglas Gilbert 2021-02-19 1995 return -ENODEV;
c99d01af2aa92f Douglas Gilbert 2021-02-19 1996 sdev = sdp->device;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1997
^1da177e4c3f41 Linus Torvalds 2005-04-16 1998 switch (cmd_in) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 1999 case SG_IO:
c99d01af2aa92f Douglas Gilbert 2021-02-19 2000 return sg_ctl_sg_io(filp, sdp, sfp, p);
bb2e50421582c8 Douglas Gilbert 2021-02-19 2001 case SG_IOSUBMIT:
bb2e50421582c8 Douglas Gilbert 2021-02-19 2002 SG_LOG(3, sfp, "%s: SG_IOSUBMIT\n", __func__);
bb2e50421582c8 Douglas Gilbert 2021-02-19 2003 return sg_ctl_iosubmit(filp, sfp, p);
ba044fa1d5f428 Douglas Gilbert 2021-02-19 2004 case SG_IOSUBMIT_V3:
ba044fa1d5f428 Douglas Gilbert 2021-02-19 2005 SG_LOG(3, sfp, "%s: SG_IOSUBMIT_V3\n", __func__);
ba044fa1d5f428 Douglas Gilbert 2021-02-19 2006 return sg_ctl_iosubmit_v3(filp, sfp, p);
bb2e50421582c8 Douglas Gilbert 2021-02-19 2007 case SG_IORECEIVE:
bb2e50421582c8 Douglas Gilbert 2021-02-19 2008 SG_LOG(3, sfp, "%s: SG_IORECEIVE\n", __func__);
bb2e50421582c8 Douglas Gilbert 2021-02-19 2009 return sg_ctl_ioreceive(filp, sfp, p);
ba044fa1d5f428 Douglas Gilbert 2021-02-19 2010 case SG_IORECEIVE_V3:
ba044fa1d5f428 Douglas Gilbert 2021-02-19 2011 SG_LOG(3, sfp, "%s: SG_IORECEIVE_V3\n", __func__);
ba044fa1d5f428 Douglas Gilbert 2021-02-19 2012 return sg_ctl_ioreceive_v3(filp, sfp, p);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2013 case SG_GET_SCSI_ID:
c99d01af2aa92f Douglas Gilbert 2021-02-19 2014 return sg_ctl_scsi_id(sdev, sfp, p);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2015 case SG_SET_FORCE_PACK_ID:
c99d01af2aa92f Douglas Gilbert 2021-02-19 2016 SG_LOG(3, sfp, "%s: SG_SET_FORCE_PACK_ID\n", __func__);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2017 result = get_user(val, ip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2018 if (result)
^1da177e4c3f41 Linus Torvalds 2005-04-16 2019 return result;
af1fc95db44560 Douglas Gilbert 2021-02-19 2020 assign_bit(SG_FFD_FORCE_PACKID, sfp->ffd_bm, !!val);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2021 return 0;
89c0e50330bd6d Douglas Gilbert 2021-02-19 2022 case SG_GET_PACK_ID: /* or tag of oldest "read"-able, -1 if none */
c99d01af2aa92f Douglas Gilbert 2021-02-19 2023 val = -1;
763d5d3c1d381f Douglas Gilbert 2021-02-19 2024 xa_for_each_marked(&sfp->srp_arr, idx, srp, SG_XA_RQ_AWAIT) {
763d5d3c1d381f Douglas Gilbert 2021-02-19 2025 if (!srp)
763d5d3c1d381f Douglas Gilbert 2021-02-19 2026 continue;
af1fc95db44560 Douglas Gilbert 2021-02-19 2027 val = srp->pack_id;
c99d01af2aa92f Douglas Gilbert 2021-02-19 2028 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2029 }
c99d01af2aa92f Douglas Gilbert 2021-02-19 2030 SG_LOG(3, sfp, "%s: SG_GET_PACK_ID=%d\n", __func__, val);
c99d01af2aa92f Douglas Gilbert 2021-02-19 2031 return put_user(val, ip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2032 case SG_GET_NUM_WAITING:
ed130bcd75fe26 Douglas Gilbert 2021-02-19 2033 val = atomic_read(&sfp->waiting);
ed130bcd75fe26 Douglas Gilbert 2021-02-19 2034 if (val)
ed130bcd75fe26 Douglas Gilbert 2021-02-19 2035 return put_user(val, ip);
ed130bcd75fe26 Douglas Gilbert 2021-02-19 2036 return put_user(atomic_read_acquire(&sfp->waiting), ip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2037 case SG_GET_SG_TABLESIZE:
c99d01af2aa92f Douglas Gilbert 2021-02-19 2038 SG_LOG(3, sfp, "%s: SG_GET_SG_TABLESIZE=%d\n", __func__,
c99d01af2aa92f Douglas Gilbert 2021-02-19 2039 sdp->max_sgat_sz);
48a7350dda38dc Douglas Gilbert 2021-02-19 2040 return put_user(sdp->max_sgat_sz, ip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2041 case SG_SET_RESERVED_SIZE:
c99d01af2aa92f Douglas Gilbert 2021-02-19 2042 result = get_user(val, ip);
c99d01af2aa92f Douglas Gilbert 2021-02-19 2043 if (!result) {
c99d01af2aa92f Douglas Gilbert 2021-02-19 2044 if (val >= 0 && val <= (1024 * 1024 * 1024)) {
af1fc95db44560 Douglas Gilbert 2021-02-19 2045 mutex_lock(&sfp->f_mutex);
c99d01af2aa92f Douglas Gilbert 2021-02-19 2046 result = sg_set_reserved_sz(sfp, val);
af1fc95db44560 Douglas Gilbert 2021-02-19 2047 mutex_unlock(&sfp->f_mutex);
c99d01af2aa92f Douglas Gilbert 2021-02-19 2048 } else {
c99d01af2aa92f Douglas Gilbert 2021-02-19 2049 SG_LOG(3, sfp, "%s: invalid size\n", __func__);
c99d01af2aa92f Douglas Gilbert 2021-02-19 2050 result = -EINVAL;
1bc0eb0446158c Hannes Reinecke 2017-04-07 2051 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 2052 }
c99d01af2aa92f Douglas Gilbert 2021-02-19 2053 return result;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2054 case SG_GET_RESERVED_SIZE:
af1fc95db44560 Douglas Gilbert 2021-02-19 2055 mutex_lock(&sfp->f_mutex);
af1fc95db44560 Douglas Gilbert 2021-02-19 2056 val = min_t(int, sfp->rsv_srp->sgat_h.buflen,
af1fc95db44560 Douglas Gilbert 2021-02-19 2057 sdp->max_sgat_sz);
af1fc95db44560 Douglas Gilbert 2021-02-19 2058 mutex_unlock(&sfp->f_mutex);
c99d01af2aa92f Douglas Gilbert 2021-02-19 2059 SG_LOG(3, sfp, "%s: SG_GET_RESERVED_SIZE=%d\n",
c99d01af2aa92f Douglas Gilbert 2021-02-19 2060 __func__, val);
af1fc95db44560 Douglas Gilbert 2021-02-19 2061 result = put_user(val, ip);
af1fc95db44560 Douglas Gilbert 2021-02-19 2062 return result;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2063 case SG_SET_COMMAND_Q:
c99d01af2aa92f Douglas Gilbert 2021-02-19 2064 SG_LOG(3, sfp, "%s: SG_SET_COMMAND_Q\n", __func__);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2065 result = get_user(val, ip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2066 if (result)
^1da177e4c3f41 Linus Torvalds 2005-04-16 2067 return result;
af1fc95db44560 Douglas Gilbert 2021-02-19 2068 assign_bit(SG_FFD_CMD_Q, sfp->ffd_bm, !!val);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2069 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2070 case SG_GET_COMMAND_Q:
c99d01af2aa92f Douglas Gilbert 2021-02-19 2071 SG_LOG(3, sfp, "%s: SG_GET_COMMAND_Q\n", __func__);
af1fc95db44560 Douglas Gilbert 2021-02-19 2072 return put_user(test_bit(SG_FFD_CMD_Q, sfp->ffd_bm), ip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2073 case SG_SET_KEEP_ORPHAN:
c99d01af2aa92f Douglas Gilbert 2021-02-19 2074 SG_LOG(3, sfp, "%s: SG_SET_KEEP_ORPHAN\n", __func__);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2075 result = get_user(val, ip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2076 if (result)
^1da177e4c3f41 Linus Torvalds 2005-04-16 2077 return result;
af1fc95db44560 Douglas Gilbert 2021-02-19 2078 assign_bit(SG_FFD_KEEP_ORPHAN, sfp->ffd_bm, !!val);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2079 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2080 case SG_GET_KEEP_ORPHAN:
c99d01af2aa92f Douglas Gilbert 2021-02-19 2081 SG_LOG(3, sfp, "%s: SG_GET_KEEP_ORPHAN\n", __func__);
af1fc95db44560 Douglas Gilbert 2021-02-19 2082 return put_user(test_bit(SG_FFD_KEEP_ORPHAN, sfp->ffd_bm),
af1fc95db44560 Douglas Gilbert 2021-02-19 2083 ip);
c99d01af2aa92f Douglas Gilbert 2021-02-19 2084 case SG_GET_VERSION_NUM:
c99d01af2aa92f Douglas Gilbert 2021-02-19 2085 SG_LOG(3, sfp, "%s: SG_GET_VERSION_NUM\n", __func__);
c99d01af2aa92f Douglas Gilbert 2021-02-19 2086 return put_user(sg_version_num, ip);
c99d01af2aa92f Douglas Gilbert 2021-02-19 2087 case SG_GET_REQUEST_TABLE:
c99d01af2aa92f Douglas Gilbert 2021-02-19 2088 return sg_ctl_req_tbl(sfp, p);
c99d01af2aa92f Douglas Gilbert 2021-02-19 2089 case SG_SCSI_RESET:
c99d01af2aa92f Douglas Gilbert 2021-02-19 2090 SG_LOG(3, sfp, "%s: SG_SCSI_RESET\n", __func__);
c99d01af2aa92f Douglas Gilbert 2021-02-19 2091 break;
c99d01af2aa92f Douglas Gilbert 2021-02-19 2092 case SG_SET_TIMEOUT:
c99d01af2aa92f Douglas Gilbert 2021-02-19 2093 SG_LOG(3, sfp, "%s: SG_SET_TIMEOUT\n", __func__);
c99d01af2aa92f Douglas Gilbert 2021-02-19 2094 result = get_user(val, ip);
c99d01af2aa92f Douglas Gilbert 2021-02-19 2095 if (result)
c99d01af2aa92f Douglas Gilbert 2021-02-19 2096 return result;
c99d01af2aa92f Douglas Gilbert 2021-02-19 2097 if (val < 0)
c99d01af2aa92f Douglas Gilbert 2021-02-19 2098 return -EIO;
c99d01af2aa92f Douglas Gilbert 2021-02-19 2099 if (val >= mult_frac((s64)INT_MAX, USER_HZ, HZ))
c99d01af2aa92f Douglas Gilbert 2021-02-19 2100 val = min_t(s64, mult_frac((s64)INT_MAX, USER_HZ, HZ),
c99d01af2aa92f Douglas Gilbert 2021-02-19 2101 INT_MAX);
c99d01af2aa92f Douglas Gilbert 2021-02-19 2102 sfp->timeout_user = val;
c99d01af2aa92f Douglas Gilbert 2021-02-19 2103 sfp->timeout = mult_frac(val, HZ, USER_HZ);
c99d01af2aa92f Douglas Gilbert 2021-02-19 2104 return 0;
c99d01af2aa92f Douglas Gilbert 2021-02-19 2105 case SG_GET_TIMEOUT: /* N.B. User receives timeout as return value */
c99d01af2aa92f Douglas Gilbert 2021-02-19 2106 /* strange ..., for backward compatibility */
c99d01af2aa92f Douglas Gilbert 2021-02-19 2107 SG_LOG(3, sfp, "%s: SG_GET_TIMEOUT\n", __func__);
c99d01af2aa92f Douglas Gilbert 2021-02-19 2108 return sfp->timeout_user;
c99d01af2aa92f Douglas Gilbert 2021-02-19 2109 case SG_SET_FORCE_LOW_DMA:
c99d01af2aa92f Douglas Gilbert 2021-02-19 2110 /*
c99d01af2aa92f Douglas Gilbert 2021-02-19 2111 * N.B. This ioctl never worked properly, but failed to
c99d01af2aa92f Douglas Gilbert 2021-02-19 2112 * return an error value. So returning '0' to keep
c99d01af2aa92f Douglas Gilbert 2021-02-19 2113 * compatibility with legacy applications.
c99d01af2aa92f Douglas Gilbert 2021-02-19 2114 */
c99d01af2aa92f Douglas Gilbert 2021-02-19 2115 SG_LOG(3, sfp, "%s: SG_SET_FORCE_LOW_DMA\n", __func__);
c99d01af2aa92f Douglas Gilbert 2021-02-19 2116 return 0;
c99d01af2aa92f Douglas Gilbert 2021-02-19 2117 case SG_GET_LOW_DMA:
c99d01af2aa92f Douglas Gilbert 2021-02-19 2118 SG_LOG(3, sfp, "%s: SG_GET_LOW_DMA\n", __func__);
c99d01af2aa92f Douglas Gilbert 2021-02-19 2119 return put_user((int)sdev->host->unchecked_isa_dma, ip);
7ba0ec6097b45c Douglas Gilbert 2021-02-19 2120 case SG_NEXT_CMD_LEN: /* active only in v2 interface */
c99d01af2aa92f Douglas Gilbert 2021-02-19 2121 SG_LOG(3, sfp, "%s: SG_NEXT_CMD_LEN\n", __func__);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2122 result = get_user(val, ip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2123 if (result)
^1da177e4c3f41 Linus Torvalds 2005-04-16 2124 return result;
bf33f87dd04c37 peter chang 2017-02-15 2125 if (val > SG_MAX_CDB_SIZE)
bf33f87dd04c37 peter chang 2017-02-15 2126 return -ENOMEM;
c4aaf4c540d32a Douglas Gilbert 2021-02-19 2127 mutex_lock(&sfp->f_mutex);
c4aaf4c540d32a Douglas Gilbert 2021-02-19 2128 sfp->next_cmd_len = max_t(int, val, 0);
c4aaf4c540d32a Douglas Gilbert 2021-02-19 2129 mutex_unlock(&sfp->f_mutex);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2130 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2131 case SG_GET_ACCESS_COUNT:
c99d01af2aa92f Douglas Gilbert 2021-02-19 2132 SG_LOG(3, sfp, "%s: SG_GET_ACCESS_COUNT\n", __func__);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2133 /* faked - we don't have a real access count anymore */
c99d01af2aa92f Douglas Gilbert 2021-02-19 2134 val = (sdev ? 1 : 0);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2135 return put_user(val, ip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2136 case SG_EMULATED_HOST:
c99d01af2aa92f Douglas Gilbert 2021-02-19 2137 SG_LOG(3, sfp, "%s: SG_EMULATED_HOST\n", __func__);
af1fc95db44560 Douglas Gilbert 2021-02-19 2138 if (unlikely(SG_IS_DETACHING(sdp)))
af1fc95db44560 Douglas Gilbert 2021-02-19 2139 return -ENODEV;
c99d01af2aa92f Douglas Gilbert 2021-02-19 2140 return put_user(sdev->host->hostt->emulated, ip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2141 case SCSI_IOCTL_SEND_COMMAND:
c99d01af2aa92f Douglas Gilbert 2021-02-19 2142 SG_LOG(3, sfp, "%s: SCSI_IOCTL_SEND_COMMAND\n", __func__);
c99d01af2aa92f Douglas Gilbert 2021-02-19 2143 return sg_scsi_ioctl(sdev->request_queue, NULL, filp->f_mode,
c99d01af2aa92f Douglas Gilbert 2021-02-19 2144 p);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2145 case SG_SET_DEBUG:
c99d01af2aa92f Douglas Gilbert 2021-02-19 2146 SG_LOG(3, sfp, "%s: SG_SET_DEBUG\n", __func__);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2147 result = get_user(val, ip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2148 if (result)
^1da177e4c3f41 Linus Torvalds 2005-04-16 2149 return result;
af1fc95db44560 Douglas Gilbert 2021-02-19 2150 assign_bit(SG_FDEV_LOG_SENSE, sdp->fdev_bm, !!val);
0a3245bc182560 Douglas Gilbert 2021-02-19 2151 if (val == 0) /* user can force recalculation */
0a3245bc182560 Douglas Gilbert 2021-02-19 2152 sg_calc_sgat_param(sdp);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2153 return 0;
44ec95425c1d9d Alan Stern 2007-02-20 2154 case BLKSECTGET:
c99d01af2aa92f Douglas Gilbert 2021-02-19 2155 SG_LOG(3, sfp, "%s: BLKSECTGET\n", __func__);
c99d01af2aa92f Douglas Gilbert 2021-02-19 2156 return put_user(max_sectors_bytes(sdev->request_queue), ip);
6da127ad0918f9 Christof Schmitt 2008-01-11 2157 case BLKTRACESETUP:
c99d01af2aa92f Douglas Gilbert 2021-02-19 2158 SG_LOG(3, sfp, "%s: BLKTRACESETUP\n", __func__);
c99d01af2aa92f Douglas Gilbert 2021-02-19 2159 return blk_trace_setup(sdev->request_queue,
6da127ad0918f9 Christof Schmitt 2008-01-11 2160 sdp->disk->disk_name,
76e3a19d0691bb Martin Peschke 2009-01-30 2161 MKDEV(SCSI_GENERIC_MAJOR, sdp->index),
7475c8ae1b7bfc Bart Van Assche 2017-08-25 2162 NULL, p);
6da127ad0918f9 Christof Schmitt 2008-01-11 2163 case BLKTRACESTART:
c99d01af2aa92f Douglas Gilbert 2021-02-19 2164 SG_LOG(3, sfp, "%s: BLKTRACESTART\n", __func__);
c99d01af2aa92f Douglas Gilbert 2021-02-19 2165 return blk_trace_startstop(sdev->request_queue, 1);
6da127ad0918f9 Christof Schmitt 2008-01-11 2166 case BLKTRACESTOP:
c99d01af2aa92f Douglas Gilbert 2021-02-19 2167 SG_LOG(3, sfp, "%s: BLKTRACESTOP\n", __func__);
c99d01af2aa92f Douglas Gilbert 2021-02-19 2168 return blk_trace_startstop(sdev->request_queue, 0);
6da127ad0918f9 Christof Schmitt 2008-01-11 2169 case BLKTRACETEARDOWN:
c99d01af2aa92f Douglas Gilbert 2021-02-19 2170 SG_LOG(3, sfp, "%s: BLKTRACETEARDOWN\n", __func__);
c99d01af2aa92f Douglas Gilbert 2021-02-19 2171 return blk_trace_remove(sdev->request_queue);
906d15fbd23c12 Christoph Hellwig 2014-10-11 2172 case SCSI_IOCTL_GET_IDLUN:
c99d01af2aa92f Douglas Gilbert 2021-02-19 2173 SG_LOG(3, sfp, "%s: SCSI_IOCTL_GET_IDLUN %s\n", __func__,
c99d01af2aa92f Douglas Gilbert 2021-02-19 2174 pmlp);
c99d01af2aa92f Douglas Gilbert 2021-02-19 2175 break;
906d15fbd23c12 Christoph Hellwig 2014-10-11 2176 case SCSI_IOCTL_GET_BUS_NUMBER:
c99d01af2aa92f Douglas Gilbert 2021-02-19 2177 SG_LOG(3, sfp, "%s: SCSI_IOCTL_GET_BUS_NUMBER%s\n",
c99d01af2aa92f Douglas Gilbert 2021-02-19 2178 __func__, pmlp);
c99d01af2aa92f Douglas Gilbert 2021-02-19 2179 break;
906d15fbd23c12 Christoph Hellwig 2014-10-11 2180 case SCSI_IOCTL_PROBE_HOST:
c99d01af2aa92f Douglas Gilbert 2021-02-19 2181 SG_LOG(3, sfp, "%s: SCSI_IOCTL_PROBE_HOST%s",
c99d01af2aa92f Douglas Gilbert 2021-02-19 2182 __func__, pmlp);
c99d01af2aa92f Douglas Gilbert 2021-02-19 2183 break;
906d15fbd23c12 Christoph Hellwig 2014-10-11 2184 case SG_GET_TRANSFORM:
c99d01af2aa92f Douglas Gilbert 2021-02-19 2185 SG_LOG(3, sfp, "%s: SG_GET_TRANSFORM%s\n", __func__, pmlp);
906d15fbd23c12 Christoph Hellwig 2014-10-11 2186 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2187 default:
c99d01af2aa92f Douglas Gilbert 2021-02-19 2188 SG_LOG(3, sfp, "%s: unrecognized ioctl [0x%x]%s\n",
c99d01af2aa92f Douglas Gilbert 2021-02-19 2189 __func__, cmd_in, pmlp);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2190 if (read_only)
c99d01af2aa92f Douglas Gilbert 2021-02-19 2191 return -EPERM; /* don't know, so take safer approach */
906d15fbd23c12 Christoph Hellwig 2014-10-11 2192 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2193 }
f24c409c880d71 Douglas Gilbert 2021-02-19 2194 result = sg_allow_if_err_recovery(sdp, filp->f_flags & O_NDELAY);
af1fc95db44560 Douglas Gilbert 2021-02-19 2195 if (unlikely(result))
906d15fbd23c12 Christoph Hellwig 2014-10-11 2196 return result;
d320a9551e394c Arnd Bergmann 2019-03-15 2197 return -ENOIOCTLCMD;
^1da177e4c3f41 Linus Torvalds 2005-04-16 @2198 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 2199
:::::: The code at line 2198 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH] gpio: mpc8xxx: Add ACPI support
by kernel test robot
Hi Ran,
I love your patch! Perhaps something to improve:
[auto build test WARNING on gpio/for-next]
[also build test WARNING on v5.12-rc2 next-20210312]
[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/Ran-Wang/gpio-mpc8xxx-Add-ACPI-s...
base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git for-next
config: arm-randconfig-m031-20210312 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
smatch warnings:
drivers/gpio/gpio-mpc8xxx.c:356 mpc8xxx_probe() error: uninitialized symbol 'devtype'.
vim +/devtype +356 drivers/gpio/gpio-mpc8xxx.c
e39d5ef678045d arch/powerpc/sysdev/mpc8xxx_gpio.c Anatolij Gustschin 2010-08-09 299
98686d9a52eeea drivers/gpio/gpio-mpc8xxx.c Ricardo Ribalda 2015-01-18 300 static int mpc8xxx_probe(struct platform_device *pdev)
1e16dfc1baa745 arch/powerpc/sysdev/mpc8xxx_gpio.c Peter Korsgaard 2008-09-23 301 {
98686d9a52eeea drivers/gpio/gpio-mpc8xxx.c Ricardo Ribalda 2015-01-18 302 struct device_node *np = pdev->dev.of_node;
1e16dfc1baa745 arch/powerpc/sysdev/mpc8xxx_gpio.c Peter Korsgaard 2008-09-23 303 struct mpc8xxx_gpio_chip *mpc8xxx_gc;
1e16dfc1baa745 arch/powerpc/sysdev/mpc8xxx_gpio.c Peter Korsgaard 2008-09-23 304 struct gpio_chip *gc;
f6481b7d46fa21 drivers/gpio/gpio-mpc8xxx.c Ran Wang 2021-03-12 305 const struct mpc8xxx_gpio_devtype *devtype;
f6481b7d46fa21 drivers/gpio/gpio-mpc8xxx.c Ran Wang 2021-03-12 306 const struct acpi_device_id *acpi_id;
1e16dfc1baa745 arch/powerpc/sysdev/mpc8xxx_gpio.c Peter Korsgaard 2008-09-23 307 int ret;
1e16dfc1baa745 arch/powerpc/sysdev/mpc8xxx_gpio.c Peter Korsgaard 2008-09-23 308
f6481b7d46fa21 drivers/gpio/gpio-mpc8xxx.c Ran Wang 2021-03-12 309 if (pdev->dev.of_node) {
f6481b7d46fa21 drivers/gpio/gpio-mpc8xxx.c Ran Wang 2021-03-12 310 devtype = of_device_get_match_data(&pdev->dev);
f6481b7d46fa21 drivers/gpio/gpio-mpc8xxx.c Ran Wang 2021-03-12 311 } else {
f6481b7d46fa21 drivers/gpio/gpio-mpc8xxx.c Ran Wang 2021-03-12 312 acpi_id = acpi_match_device(pdev->dev.driver->acpi_match_table,
f6481b7d46fa21 drivers/gpio/gpio-mpc8xxx.c Ran Wang 2021-03-12 313 &pdev->dev);
f6481b7d46fa21 drivers/gpio/gpio-mpc8xxx.c Ran Wang 2021-03-12 314 if (acpi_id)
f6481b7d46fa21 drivers/gpio/gpio-mpc8xxx.c Ran Wang 2021-03-12 315 devtype = (struct mpc8xxx_gpio_devtype *) acpi_id->driver_data;
f6481b7d46fa21 drivers/gpio/gpio-mpc8xxx.c Ran Wang 2021-03-12 316 }
f6481b7d46fa21 drivers/gpio/gpio-mpc8xxx.c Ran Wang 2021-03-12 317
98686d9a52eeea drivers/gpio/gpio-mpc8xxx.c Ricardo Ribalda 2015-01-18 318 mpc8xxx_gc = devm_kzalloc(&pdev->dev, sizeof(*mpc8xxx_gc), GFP_KERNEL);
98686d9a52eeea drivers/gpio/gpio-mpc8xxx.c Ricardo Ribalda 2015-01-18 319 if (!mpc8xxx_gc)
98686d9a52eeea drivers/gpio/gpio-mpc8xxx.c Ricardo Ribalda 2015-01-18 320 return -ENOMEM;
1e16dfc1baa745 arch/powerpc/sysdev/mpc8xxx_gpio.c Peter Korsgaard 2008-09-23 321
257e10752c13f2 drivers/gpio/gpio-mpc8xxx.c Ricardo Ribalda 2015-01-18 322 platform_set_drvdata(pdev, mpc8xxx_gc);
257e10752c13f2 drivers/gpio/gpio-mpc8xxx.c Ricardo Ribalda 2015-01-18 323
505936131ea71e drivers/gpio/gpio-mpc8xxx.c Alexander Stein 2015-07-21 324 raw_spin_lock_init(&mpc8xxx_gc->lock);
1e16dfc1baa745 arch/powerpc/sysdev/mpc8xxx_gpio.c Peter Korsgaard 2008-09-23 325
f6481b7d46fa21 drivers/gpio/gpio-mpc8xxx.c Ran Wang 2021-03-12 326 mpc8xxx_gc->regs = devm_platform_ioremap_resource(pdev, 0);
42178e2a1e42b4 drivers/gpio/gpio-mpc8xxx.c Liu Gang 2016-02-03 327 if (!mpc8xxx_gc->regs)
42178e2a1e42b4 drivers/gpio/gpio-mpc8xxx.c Liu Gang 2016-02-03 328 return -ENOMEM;
42178e2a1e42b4 drivers/gpio/gpio-mpc8xxx.c Liu Gang 2016-02-03 329
42178e2a1e42b4 drivers/gpio/gpio-mpc8xxx.c Liu Gang 2016-02-03 330 gc = &mpc8xxx_gc->gc;
322f6a3182d42d drivers/gpio/gpio-mpc8xxx.c Johnson CH Chen (陳昭勳 2019-11-26 331) gc->parent = &pdev->dev;
42178e2a1e42b4 drivers/gpio/gpio-mpc8xxx.c Liu Gang 2016-02-03 332
f6481b7d46fa21 drivers/gpio/gpio-mpc8xxx.c Ran Wang 2021-03-12 333 if (device_property_read_bool(&pdev->dev, "little-endian")) {
42178e2a1e42b4 drivers/gpio/gpio-mpc8xxx.c Liu Gang 2016-02-03 334 ret = bgpio_init(gc, &pdev->dev, 4,
42178e2a1e42b4 drivers/gpio/gpio-mpc8xxx.c Liu Gang 2016-02-03 335 mpc8xxx_gc->regs + GPIO_DAT,
42178e2a1e42b4 drivers/gpio/gpio-mpc8xxx.c Liu Gang 2016-02-03 336 NULL, NULL,
42178e2a1e42b4 drivers/gpio/gpio-mpc8xxx.c Liu Gang 2016-02-03 337 mpc8xxx_gc->regs + GPIO_DIR, NULL,
42178e2a1e42b4 drivers/gpio/gpio-mpc8xxx.c Liu Gang 2016-02-03 338 BGPIOF_BIG_ENDIAN);
42178e2a1e42b4 drivers/gpio/gpio-mpc8xxx.c Liu Gang 2016-02-03 339 if (ret)
42178e2a1e42b4 drivers/gpio/gpio-mpc8xxx.c Liu Gang 2016-02-03 340 goto err;
42178e2a1e42b4 drivers/gpio/gpio-mpc8xxx.c Liu Gang 2016-02-03 341 dev_dbg(&pdev->dev, "GPIO registers are LITTLE endian\n");
42178e2a1e42b4 drivers/gpio/gpio-mpc8xxx.c Liu Gang 2016-02-03 342 } else {
42178e2a1e42b4 drivers/gpio/gpio-mpc8xxx.c Liu Gang 2016-02-03 343 ret = bgpio_init(gc, &pdev->dev, 4,
42178e2a1e42b4 drivers/gpio/gpio-mpc8xxx.c Liu Gang 2016-02-03 344 mpc8xxx_gc->regs + GPIO_DAT,
42178e2a1e42b4 drivers/gpio/gpio-mpc8xxx.c Liu Gang 2016-02-03 345 NULL, NULL,
42178e2a1e42b4 drivers/gpio/gpio-mpc8xxx.c Liu Gang 2016-02-03 346 mpc8xxx_gc->regs + GPIO_DIR, NULL,
42178e2a1e42b4 drivers/gpio/gpio-mpc8xxx.c Liu Gang 2016-02-03 347 BGPIOF_BIG_ENDIAN
42178e2a1e42b4 drivers/gpio/gpio-mpc8xxx.c Liu Gang 2016-02-03 348 | BGPIOF_BIG_ENDIAN_BYTE_ORDER);
42178e2a1e42b4 drivers/gpio/gpio-mpc8xxx.c Liu Gang 2016-02-03 349 if (ret)
42178e2a1e42b4 drivers/gpio/gpio-mpc8xxx.c Liu Gang 2016-02-03 350 goto err;
42178e2a1e42b4 drivers/gpio/gpio-mpc8xxx.c Liu Gang 2016-02-03 351 dev_dbg(&pdev->dev, "GPIO registers are BIG endian\n");
42178e2a1e42b4 drivers/gpio/gpio-mpc8xxx.c Liu Gang 2016-02-03 352 }
1e16dfc1baa745 arch/powerpc/sysdev/mpc8xxx_gpio.c Peter Korsgaard 2008-09-23 353
fa4007ca06e4c8 drivers/gpio/gpio-mpc8xxx.c Axel Lin 2016-02-22 354 mpc8xxx_gc->direction_output = gc->direction_output;
82e39b0d8566fa drivers/gpio/gpio-mpc8xxx.c Uwe Kleine-König 2015-07-16 355
82e39b0d8566fa drivers/gpio/gpio-mpc8xxx.c Uwe Kleine-König 2015-07-16 @356 if (!devtype)
82e39b0d8566fa drivers/gpio/gpio-mpc8xxx.c Uwe Kleine-König 2015-07-16 357 devtype = &mpc8xxx_gpio_devtype_default;
82e39b0d8566fa drivers/gpio/gpio-mpc8xxx.c Uwe Kleine-König 2015-07-16 358
82e39b0d8566fa drivers/gpio/gpio-mpc8xxx.c Uwe Kleine-König 2015-07-16 359 /*
82e39b0d8566fa drivers/gpio/gpio-mpc8xxx.c Uwe Kleine-König 2015-07-16 360 * It's assumed that only a single type of gpio controller is available
82e39b0d8566fa drivers/gpio/gpio-mpc8xxx.c Uwe Kleine-König 2015-07-16 361 * on the current machine, so overwriting global data is fine.
82e39b0d8566fa drivers/gpio/gpio-mpc8xxx.c Uwe Kleine-König 2015-07-16 362 */
4e50573f39229d drivers/gpio/gpio-mpc8xxx.c Vladimir Oltean 2019-11-15 363 if (devtype->irq_set_type)
82e39b0d8566fa drivers/gpio/gpio-mpc8xxx.c Uwe Kleine-König 2015-07-16 364 mpc8xxx_irq_chip.irq_set_type = devtype->irq_set_type;
82e39b0d8566fa drivers/gpio/gpio-mpc8xxx.c Uwe Kleine-König 2015-07-16 365
adf32eaa053234 drivers/gpio/gpio-mpc8xxx.c Axel Lin 2016-02-22 366 if (devtype->gpio_dir_out)
adf32eaa053234 drivers/gpio/gpio-mpc8xxx.c Axel Lin 2016-02-22 367 gc->direction_output = devtype->gpio_dir_out;
adf32eaa053234 drivers/gpio/gpio-mpc8xxx.c Axel Lin 2016-02-22 368 if (devtype->gpio_get)
adf32eaa053234 drivers/gpio/gpio-mpc8xxx.c Axel Lin 2016-02-22 369 gc->get = devtype->gpio_get;
adf32eaa053234 drivers/gpio/gpio-mpc8xxx.c Axel Lin 2016-02-22 370
345e5c8a1cc30e arch/powerpc/sysdev/mpc8xxx_gpio.c Peter Korsgaard 2010-01-07 371 gc->to_irq = mpc8xxx_gpio_to_irq;
1e16dfc1baa745 arch/powerpc/sysdev/mpc8xxx_gpio.c Peter Korsgaard 2008-09-23 372
3795d7cc4fe132 drivers/gpio/gpio-mpc8xxx.c Michael Walle 2020-09-30 373 /*
3795d7cc4fe132 drivers/gpio/gpio-mpc8xxx.c Michael Walle 2020-09-30 374 * The GPIO Input Buffer Enable register(GPIO_IBE) is used to control
3795d7cc4fe132 drivers/gpio/gpio-mpc8xxx.c Michael Walle 2020-09-30 375 * the input enable of each individual GPIO port. When an individual
3795d7cc4fe132 drivers/gpio/gpio-mpc8xxx.c Michael Walle 2020-09-30 376 * GPIO port’s direction is set to input (GPIO_GPDIR[DRn=0]), the
3795d7cc4fe132 drivers/gpio/gpio-mpc8xxx.c Michael Walle 2020-09-30 377 * associated input enable must be set (GPIOxGPIE[IEn]=1) to propagate
3795d7cc4fe132 drivers/gpio/gpio-mpc8xxx.c Michael Walle 2020-09-30 378 * the port value to the GPIO Data Register.
3795d7cc4fe132 drivers/gpio/gpio-mpc8xxx.c Michael Walle 2020-09-30 379 */
f6481b7d46fa21 drivers/gpio/gpio-mpc8xxx.c Ran Wang 2021-03-12 380 if (pdev->dev.of_node) {
f6481b7d46fa21 drivers/gpio/gpio-mpc8xxx.c Ran Wang 2021-03-12 381 if (of_device_is_compatible(np, "fsl,qoriq-gpio"))
787b64a43f7aca drivers/gpio/gpio-mpc8xxx.c Russell King 2019-11-19 382 gc->write_reg(mpc8xxx_gc->regs + GPIO_IBE, 0xffffffff);
f6481b7d46fa21 drivers/gpio/gpio-mpc8xxx.c Ran Wang 2021-03-12 383 } else {
f6481b7d46fa21 drivers/gpio/gpio-mpc8xxx.c Ran Wang 2021-03-12 384 if (acpi_match_device(pdev->dev.driver->acpi_match_table,
f6481b7d46fa21 drivers/gpio/gpio-mpc8xxx.c Ran Wang 2021-03-12 385 &pdev->dev))
f6481b7d46fa21 drivers/gpio/gpio-mpc8xxx.c Ran Wang 2021-03-12 386 gc->write_reg(mpc8xxx_gc->regs + GPIO_IBE, 0xffffffff);
f6481b7d46fa21 drivers/gpio/gpio-mpc8xxx.c Ran Wang 2021-03-12 387 }
787b64a43f7aca drivers/gpio/gpio-mpc8xxx.c Russell King 2019-11-19 388
42178e2a1e42b4 drivers/gpio/gpio-mpc8xxx.c Liu Gang 2016-02-03 389 ret = gpiochip_add_data(gc, mpc8xxx_gc);
42178e2a1e42b4 drivers/gpio/gpio-mpc8xxx.c Liu Gang 2016-02-03 390 if (ret) {
7eb6ce2f272336 drivers/gpio/gpio-mpc8xxx.c Rob Herring 2017-07-18 391 pr_err("%pOF: GPIO chip registration failed with status %d\n",
7eb6ce2f272336 drivers/gpio/gpio-mpc8xxx.c Rob Herring 2017-07-18 392 np, ret);
42178e2a1e42b4 drivers/gpio/gpio-mpc8xxx.c Liu Gang 2016-02-03 393 goto err;
42178e2a1e42b4 drivers/gpio/gpio-mpc8xxx.c Liu Gang 2016-02-03 394 }
1e16dfc1baa745 arch/powerpc/sysdev/mpc8xxx_gpio.c Peter Korsgaard 2008-09-23 395
f6481b7d46fa21 drivers/gpio/gpio-mpc8xxx.c Ran Wang 2021-03-12 396 mpc8xxx_gc->irqn = platform_get_irq(pdev, 0);
42178e2a1e42b4 drivers/gpio/gpio-mpc8xxx.c Liu Gang 2016-02-03 397 if (!mpc8xxx_gc->irqn)
98686d9a52eeea drivers/gpio/gpio-mpc8xxx.c Ricardo Ribalda 2015-01-18 398 return 0;
345e5c8a1cc30e arch/powerpc/sysdev/mpc8xxx_gpio.c Peter Korsgaard 2010-01-07 399
f6481b7d46fa21 drivers/gpio/gpio-mpc8xxx.c Ran Wang 2021-03-12 400 mpc8xxx_gc->irq = irq_domain_create_linear(dev_fwnode(&pdev->dev),
f6481b7d46fa21 drivers/gpio/gpio-mpc8xxx.c Ran Wang 2021-03-12 401 MPC8XXX_GPIO_PINS,
f6481b7d46fa21 drivers/gpio/gpio-mpc8xxx.c Ran Wang 2021-03-12 402 &mpc8xxx_gpio_irq_ops,
f6481b7d46fa21 drivers/gpio/gpio-mpc8xxx.c Ran Wang 2021-03-12 403 mpc8xxx_gc);
f6481b7d46fa21 drivers/gpio/gpio-mpc8xxx.c Ran Wang 2021-03-12 404
345e5c8a1cc30e arch/powerpc/sysdev/mpc8xxx_gpio.c Peter Korsgaard 2010-01-07 405 if (!mpc8xxx_gc->irq)
98686d9a52eeea drivers/gpio/gpio-mpc8xxx.c Ricardo Ribalda 2015-01-18 406 return 0;
345e5c8a1cc30e arch/powerpc/sysdev/mpc8xxx_gpio.c Peter Korsgaard 2010-01-07 407
345e5c8a1cc30e arch/powerpc/sysdev/mpc8xxx_gpio.c Peter Korsgaard 2010-01-07 408 /* ack and mask all irqs */
cd0d3f58a0ca05 drivers/gpio/gpio-mpc8xxx.c Axel Lin 2016-02-22 409 gc->write_reg(mpc8xxx_gc->regs + GPIO_IER, 0xffffffff);
cd0d3f58a0ca05 drivers/gpio/gpio-mpc8xxx.c Axel Lin 2016-02-22 410 gc->write_reg(mpc8xxx_gc->regs + GPIO_IMR, 0);
345e5c8a1cc30e arch/powerpc/sysdev/mpc8xxx_gpio.c Peter Korsgaard 2010-01-07 411
698b8eeaed7287 drivers/gpio/gpio-mpc8xxx.c Song Hui 2019-10-11 412 ret = devm_request_irq(&pdev->dev, mpc8xxx_gc->irqn,
698b8eeaed7287 drivers/gpio/gpio-mpc8xxx.c Song Hui 2019-10-11 413 mpc8xxx_gpio_irq_cascade,
3d5bfbd9716318 drivers/gpio/gpio-mpc8xxx.c Song Hui 2020-06-11 414 IRQF_SHARED, "gpio-cascade",
698b8eeaed7287 drivers/gpio/gpio-mpc8xxx.c Song Hui 2019-10-11 415 mpc8xxx_gc);
698b8eeaed7287 drivers/gpio/gpio-mpc8xxx.c Song Hui 2019-10-11 416 if (ret) {
698b8eeaed7287 drivers/gpio/gpio-mpc8xxx.c Song Hui 2019-10-11 417 dev_err(&pdev->dev, "%s: failed to devm_request_irq(%d), ret = %d\n",
698b8eeaed7287 drivers/gpio/gpio-mpc8xxx.c Song Hui 2019-10-11 418 np->full_name, mpc8xxx_gc->irqn, ret);
698b8eeaed7287 drivers/gpio/gpio-mpc8xxx.c Song Hui 2019-10-11 419 goto err;
698b8eeaed7287 drivers/gpio/gpio-mpc8xxx.c Song Hui 2019-10-11 420 }
698b8eeaed7287 drivers/gpio/gpio-mpc8xxx.c Song Hui 2019-10-11 421
257e10752c13f2 drivers/gpio/gpio-mpc8xxx.c Ricardo Ribalda 2015-01-18 422 return 0;
42178e2a1e42b4 drivers/gpio/gpio-mpc8xxx.c Liu Gang 2016-02-03 423 err:
42178e2a1e42b4 drivers/gpio/gpio-mpc8xxx.c Liu Gang 2016-02-03 424 iounmap(mpc8xxx_gc->regs);
42178e2a1e42b4 drivers/gpio/gpio-mpc8xxx.c Liu Gang 2016-02-03 425 return ret;
257e10752c13f2 drivers/gpio/gpio-mpc8xxx.c Ricardo Ribalda 2015-01-18 426 }
257e10752c13f2 drivers/gpio/gpio-mpc8xxx.c Ricardo Ribalda 2015-01-18 427
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[ast:fexit_fix 2/2] kernel/bpf/trampoline.c:199:30: warning: no previous prototype for 'bpf_trampoline_image_alloc'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git fexit_fix
head: d0953e3c28d70fa9d39e6db07d2cffbe7ce1f0e2
commit: d0953e3c28d70fa9d39e6db07d2cffbe7ce1f0e2 [2/2] bpf: Fix fexit trampoline.
config: mips-allyesconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git/commit/?id=d0...
git remote add ast https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git
git fetch --no-tags ast fexit_fix
git checkout d0953e3c28d70fa9d39e6db07d2cffbe7ce1f0e2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> kernel/bpf/trampoline.c:199:30: warning: no previous prototype for 'bpf_trampoline_image_alloc' [-Wmissing-prototypes]
199 | struct bpf_trampoline_image *bpf_trampoline_image_alloc(u64 key, u32 idx)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/bpf_trampoline_image_alloc +199 kernel/bpf/trampoline.c
198
> 199 struct bpf_trampoline_image *bpf_trampoline_image_alloc(u64 key, u32 idx)
200 {
201 struct bpf_trampoline_image *im;
202 struct bpf_ksym *ksym;
203 void *image;
204 int err = -ENOMEM;
205
206 im = kzalloc(sizeof(*im), GFP_KERNEL);
207 if (!im)
208 goto out;
209
210 err = bpf_jit_charge_modmem(1);
211 if (err)
212 goto out_free_im;
213
214 err = -ENOMEM;
215 im->image = image = bpf_jit_alloc_exec_page();
216 if (!image)
217 goto out_uncharge;
218
219 ksym = &im->ksym;
220 INIT_LIST_HEAD_RCU(&ksym->lnode);
221 snprintf(ksym->name, KSYM_NAME_LEN, "bpf_trampoline_%llu_%u", key, idx);
222 bpf_image_ksym_add(image, ksym);
223 return im;
224
225 out_uncharge:
226 bpf_jit_uncharge_modmem(1);
227 out_free_im:
228 kfree(im);
229 out:
230 return ERR_PTR(err);
231 }
232
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months