Re: [RESEND PATCH v10 07/10] phy: samsung-ufs: add UFS PHY driver for samsung SoC
by kernel test robot
Hi Alim,
I love your patch! Perhaps something to improve:
[auto build test WARNING on 0e698dfa282211e414076f9dc7e83c1c288314fd]
url: https://github.com/0day-ci/linux/commits/Alim-Akhtar/exynos-ufs-Add-suppo...
base: 0e698dfa282211e414076f9dc7e83c1c288314fd
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project d7e6f116f4517952fbdf5ad4b5ff67e378600c60)
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
# 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 >>, old ones prefixed by <<):
>> drivers/phy/samsung/phy-samsung-ufs.c:47:5: warning: no previous prototype for function 'samsung_ufs_phy_wait_for_lock_acq' [-Wmissing-prototypes]
int samsung_ufs_phy_wait_for_lock_acq(struct phy *phy)
^
drivers/phy/samsung/phy-samsung-ufs.c:47:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int samsung_ufs_phy_wait_for_lock_acq(struct phy *phy)
^
static
>> drivers/phy/samsung/phy-samsung-ufs.c:77:5: warning: no previous prototype for function 'samsung_ufs_phy_calibrate' [-Wmissing-prototypes]
int samsung_ufs_phy_calibrate(struct phy *phy)
^
drivers/phy/samsung/phy-samsung-ufs.c:77:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int samsung_ufs_phy_calibrate(struct phy *phy)
^
static
2 warnings generated.
vim +/samsung_ufs_phy_wait_for_lock_acq +47 drivers/phy/samsung/phy-samsung-ufs.c
46
> 47 int samsung_ufs_phy_wait_for_lock_acq(struct phy *phy)
48 {
49 struct samsung_ufs_phy *ufs_phy = get_samsung_ufs_phy(phy);
50 const unsigned int timeout_us = 100000;
51 const unsigned int sleep_us = 10;
52 u32 val;
53 int err;
54
55 err = readl_poll_timeout(
56 ufs_phy->reg_pma + PHY_APB_ADDR(PHY_PLL_LOCK_STATUS),
57 val, (val & PHY_PLL_LOCK_BIT), sleep_us, timeout_us);
58 if (err) {
59 dev_err(ufs_phy->dev,
60 "failed to get phy pll lock acquisition %d\n", err);
61 goto out;
62 }
63
64 err = readl_poll_timeout(
65 ufs_phy->reg_pma + PHY_APB_ADDR(PHY_CDR_LOCK_STATUS),
66 val, (val & PHY_CDR_LOCK_BIT), sleep_us, timeout_us);
67 if (err) {
68 dev_err(ufs_phy->dev,
69 "failed to get phy cdr lock acquisition %d\n", err);
70 goto out;
71 }
72
73 out:
74 return err;
75 }
76
> 77 int samsung_ufs_phy_calibrate(struct phy *phy)
78 {
79 struct samsung_ufs_phy *ufs_phy = get_samsung_ufs_phy(phy);
80 struct samsung_ufs_phy_cfg **cfgs = ufs_phy->cfg;
81 const struct samsung_ufs_phy_cfg *cfg;
82 int i;
83 int err = 0;
84
85 if (unlikely(ufs_phy->ufs_phy_state < CFG_PRE_INIT ||
86 ufs_phy->ufs_phy_state >= CFG_TAG_MAX)) {
87 dev_err(ufs_phy->dev, "invalid phy config index %d\n",
88 ufs_phy->ufs_phy_state);
89 return -EINVAL;
90 }
91
92 if (ufs_phy->is_pre_init)
93 ufs_phy->is_pre_init = false;
94 if (ufs_phy->is_post_init) {
95 ufs_phy->is_post_init = false;
96 ufs_phy->ufs_phy_state = CFG_POST_INIT;
97 }
98 if (ufs_phy->is_pre_pmc) {
99 ufs_phy->is_pre_pmc = false;
100 ufs_phy->ufs_phy_state = CFG_PRE_PWR_HS;
101 }
102 if (ufs_phy->is_post_pmc) {
103 ufs_phy->is_post_pmc = false;
104 ufs_phy->ufs_phy_state = CFG_POST_PWR_HS;
105 }
106
107 switch (ufs_phy->ufs_phy_state) {
108 case CFG_PRE_INIT:
109 ufs_phy->is_post_init = true;
110 break;
111 case CFG_POST_INIT:
112 ufs_phy->is_pre_pmc = true;
113 break;
114 case CFG_PRE_PWR_HS:
115 ufs_phy->is_post_pmc = true;
116 break;
117 case CFG_POST_PWR_HS:
118 break;
119 default:
120 dev_err(ufs_phy->dev, "wrong state for phy calibration\n");
121 }
122
123 cfg = cfgs[ufs_phy->ufs_phy_state];
124 if (!cfg)
125 goto out;
126
127 for_each_phy_cfg(cfg) {
128 for_each_phy_lane(ufs_phy, i) {
129 samsung_ufs_phy_config(ufs_phy, cfg, i);
130 }
131 }
132
133 if (ufs_phy->ufs_phy_state == CFG_POST_PWR_HS)
134 err = samsung_ufs_phy_wait_for_lock_acq(phy);
135 out:
136 return err;
137 }
138
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[peterz-queue:sched/urgent 7/7] arch/mips/kernel/process.c:690:69: error: 'handle_backtrace' undeclared here (not in a function)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/urgent
head: 0602ec6c74e25dcb8a43961b00eef168fafb8e5e
commit: 0602ec6c74e25dcb8a43961b00eef168fafb8e5e [7/7] smp: Cleanup smp_call_function*()
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 checkout 0602ec6c74e25dcb8a43961b00eef168fafb8e5e
# 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 >>, old ones prefixed by <<):
arch/mips/kernel/process.c:96:5: warning: no previous prototype for 'arch_dup_task_struct' [-Wmissing-prototypes]
96 | int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
| ^~~~~~~~~~~~~~~~~~~~
arch/mips/kernel/process.c:682:15: warning: no previous prototype for 'arch_align_stack' [-Wmissing-prototypes]
682 | unsigned long arch_align_stack(unsigned long sp)
| ^~~~~~~~~~~~~~~~
In file included from arch/mips/include/asm/cpu-type.h:12,
from arch/mips/include/asm/timex.h:19,
from include/linux/timex.h:65,
from include/linux/time32.h:13,
from include/linux/time.h:74,
from include/linux/ktime.h:24,
from include/linux/timer.h:6,
from include/linux/workqueue.h:9,
from include/linux/rhashtable-types.h:15,
from include/linux/ipc.h:7,
from include/uapi/linux/sem.h:5,
from include/linux/sem.h:5,
from include/linux/sched.h:15,
from arch/mips/kernel/process.c:13:
>> arch/mips/kernel/process.c:690:69: error: 'handle_backtrace' undeclared here (not in a function)
690 | static DEFINE_PER_CPU(call_single_data_t, backtrace_csd) = CSD_INIT(handle_backtrace, NULL);
| ^~~~~~~~~~~~~~~~
include/linux/smp.h:30:40: note: in definition of macro 'CSD_INIT'
30 | (struct __call_single_data){ .func = (_func), .info = (_info), }
| ^~~~~
arch/mips/kernel/process.c:693:13: warning: 'handle_backtrace' defined but not used [-Wunused-function]
693 | static void handle_backtrace(void *info)
| ^~~~~~~~~~~~~~~~
vim +/handle_backtrace +690 arch/mips/kernel/process.c
689
> 690 static DEFINE_PER_CPU(call_single_data_t, backtrace_csd) = CSD_INIT(handle_backtrace, NULL);
691 static struct cpumask backtrace_csd_busy;
692
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH] media: i2c: adv748x: add enuminput control to adv748x hdmi subdev
by kernel test robot
Hi Ramzi,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linuxtv-media/master]
[also build test ERROR on v5.8-rc1 next-20200615]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Ramzi-BEN-MEFTAH/media-i2c-adv74...
base: git://linuxtv.org/media_tree.git master
config: i386-randconfig-a016-20200615 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>, old ones prefixed by <<):
>> drivers/media/i2c/adv748x/adv748x-hdmi.c:405:3: error: 'const struct v4l2_subdev_video_ops' has no member named 'enuminput'
405 | .enuminput = adv748x_hdmi_enuminput,
| ^~~~~~~~~
>> drivers/media/i2c/adv748x/adv748x-hdmi.c:405:15: error: initialization of 'int (*)(struct v4l2_subdev *, int)' from incompatible pointer type 'int (*)(struct v4l2_subdev *, struct v4l2_input *)' [-Werror=incompatible-pointer-types]
405 | .enuminput = adv748x_hdmi_enuminput,
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/adv748x/adv748x-hdmi.c:405:15: note: (near initialization for 'adv748x_video_ops_hdmi.s_stream')
>> drivers/media/i2c/adv748x/adv748x-hdmi.c:406:14: warning: initialized field overwritten [-Woverride-init]
406 | .s_stream = adv748x_hdmi_s_stream,
| ^~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/adv748x/adv748x-hdmi.c:406:14: note: (near initialization for 'adv748x_video_ops_hdmi.s_stream')
cc1: some warnings being treated as errors
vim +405 drivers/media/i2c/adv748x/adv748x-hdmi.c
399
400 static const struct v4l2_subdev_video_ops adv748x_video_ops_hdmi = {
401 .s_dv_timings = adv748x_hdmi_s_dv_timings,
402 .g_dv_timings = adv748x_hdmi_g_dv_timings,
403 .query_dv_timings = adv748x_hdmi_query_dv_timings,
404 .g_input_status = adv748x_hdmi_g_input_status,
> 405 .enuminput = adv748x_hdmi_enuminput,
> 406 .s_stream = adv748x_hdmi_s_stream,
407 .g_pixelaspect = adv748x_hdmi_g_pixelaspect,
408 };
409
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[peterz-queue:sched/urgent 6/7] kernel/bpf/stackmap.c:296:21: error: called object type 'bool' (aka '_Bool') is not a function or function pointer
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/urgent
head: 0602ec6c74e25dcb8a43961b00eef168fafb8e5e
commit: 2726fde5f3900552fcae2d2ac07a05ffba11a491 [6/7] irq_work: Cleanup
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 3d8149c2a1228609fd7d7c91a04681304a2f0ca9)
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
git checkout 2726fde5f3900552fcae2d2ac07a05ffba11a491
# 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 >>, old ones prefixed by <<):
>> kernel/bpf/stackmap.c:296:21: error: called object type 'bool' (aka '_Bool') is not a function or function pointer
if (irq_work_busy(&work->irq_work)) {
~~~~~~~~~~~~~^
1 error generated.
vim +296 kernel/bpf/stackmap.c
284
285 static void stack_map_get_build_id_offset(struct bpf_stack_build_id *id_offs,
286 u64 *ips, u32 trace_nr, bool user)
287 {
288 int i;
289 struct vm_area_struct *vma;
290 bool irq_work_busy = false;
291 struct stack_map_irq_work *work = NULL;
292
293 if (irqs_disabled()) {
294 if (!IS_ENABLED(CONFIG_PREEMPT_RT)) {
295 work = this_cpu_ptr(&up_read_work);
> 296 if (irq_work_busy(&work->irq_work)) {
297 /* cannot queue more up_read, fallback */
298 irq_work_busy = true;
299 }
300 } else {
301 /*
302 * PREEMPT_RT does not allow to trylock mmap sem in
303 * interrupt disabled context. Force the fallback code.
304 */
305 irq_work_busy = true;
306 }
307 }
308
309 /*
310 * We cannot do up_read() when the irq is disabled, because of
311 * risk to deadlock with rq_lock. To do build_id lookup when the
312 * irqs are disabled, we need to run up_read() in irq_work. We use
313 * a percpu variable to do the irq_work. If the irq_work is
314 * already used by another lookup, we fall back to report ips.
315 *
316 * Same fallback is used for kernel stack (!user) on a stackmap
317 * with build_id.
318 */
319 if (!user || !current || !current->mm || irq_work_busy ||
320 down_read_trylock(¤t->mm->mmap_sem) == 0) {
321 /* cannot access current->mm, fall back to ips */
322 for (i = 0; i < trace_nr; i++) {
323 id_offs[i].status = BPF_STACK_BUILD_ID_IP;
324 id_offs[i].ip = ips[i];
325 memset(id_offs[i].build_id, 0, BPF_BUILD_ID_SIZE);
326 }
327 return;
328 }
329
330 for (i = 0; i < trace_nr; i++) {
331 vma = find_vma(current->mm, ips[i]);
332 if (!vma || stack_map_get_build_id(vma, id_offs[i].build_id)) {
333 /* per entry fall back to ips */
334 id_offs[i].status = BPF_STACK_BUILD_ID_IP;
335 id_offs[i].ip = ips[i];
336 memset(id_offs[i].build_id, 0, BPF_BUILD_ID_SIZE);
337 continue;
338 }
339 id_offs[i].offset = (vma->vm_pgoff << PAGE_SHIFT) + ips[i]
340 - vma->vm_start;
341 id_offs[i].status = BPF_STACK_BUILD_ID_VALID;
342 }
343
344 if (!work) {
345 up_read(¤t->mm->mmap_sem);
346 } else {
347 work->sem = ¤t->mm->mmap_sem;
348 irq_work_queue(&work->irq_work);
349 /*
350 * The irq_work will release the mmap_sem with
351 * up_read_non_owner(). The rwsem_release() is called
352 * here to release the lock from lockdep's perspective.
353 */
354 rwsem_release(¤t->mm->mmap_sem.dep_map, _RET_IP_);
355 }
356 }
357
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH v1 2/3] drivers: input: misc: Add mtk vibrator driver
by kernel test robot
Hi Fengping,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on arm64/for-next/core]
[also build test WARNING on pavel-linux-leds/for-next v5.8-rc1 next-20200615]
[cannot apply to input/next]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Fengping-Yu/dt-bindings-Add-vibr...
base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 3d8149c2a1228609fd7d7c91a04681304a2f0ca9)
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
# 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 >>, old ones prefixed by <<):
>> drivers/input/misc/regulator-vibrator.c:71:4: warning: format specifies type 'int' but the argument has type 'long' [-Wformat]
PTR_ERR(vibr_conf->reg));
^~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:104:32: note: expanded from macro 'dev_err'
_dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
>> drivers/input/misc/regulator-vibrator.c:97:9: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
return ret;
^~~
drivers/input/misc/regulator-vibrator.c:50:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
2 warnings generated.
vim +71 drivers/input/misc/regulator-vibrator.c
46
47 static int mt_vibra_parse_dt(struct device *dev,
48 struct reg_vibr_config *vibr_conf)
49 {
50 int ret;
51
52 if (device_property_read_u32(dev, "min-limit",
53 &vibr_conf->min_limit))
54 vibr_conf->min_limit = DEFAULT_MIN_LIMIT;
55 vibr_conf->min_limit = max_t(unsigned int,
56 vibr_conf->min_limit, DEFAULT_MIN_LIMIT);
57
58 if (device_property_read_u32(dev, "max-limit",
59 &vibr_conf->max_limit))
60 vibr_conf->max_limit = 0;
61
62 if (!vibr_conf->max_limit &&
63 vibr_conf->max_limit < vibr_conf->min_limit) {
64 dev_err(dev, "error load dts: get error limitation(min > max)\n");
65 return -EINVAL;
66 }
67
68 vibr_conf->reg = devm_regulator_get(dev, "vib");
69 if (IS_ERR(vibr_conf->reg)) {
70 dev_err(dev, "error load dts: get regulator return %d\n",
> 71 PTR_ERR(vibr_conf->reg));
72 vibr_conf->reg = NULL;
73 return PTR_ERR(vibr_conf->reg);
74 }
75
76 if (device_property_read_u32(dev, "max-volt",
77 &vibr_conf->max_volt)) {
78 dev_err(dev, "error load dts: get max-volt failed\n");
79 return -EINVAL;
80 }
81
82 if (device_property_read_u32(dev, "min-volt",
83 &vibr_conf->min_volt)) {
84 dev_err(dev, "error load dts: get min-volt failed!\n");
85 return -EINVAL;
86 }
87
88 if (vibr_conf->min_volt > vibr_conf->max_volt) {
89 dev_err(dev, "error load dts: get error voltage(min > max)\n");
90 return -EINVAL;
91 }
92
93 dev_info(dev, "vibr_conf = %u, %u, %u-%u\n",
94 vibr_conf->min_limit, vibr_conf->max_limit,
95 vibr_conf->min_volt, vibr_conf->max_volt);
96
> 97 return ret;
98 }
99
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[hch-block:block-fs.h-cleanup 10/10] block/partitions/ibm.c:307:5: error: assignment to 'int gendisk dasd_information2_t {aka 'int gendisk struct dasd_information2_t from incompatible pointer type 'int gendisk dasd_information2_t {aka 'i...
by kernel test robot
tree: git://git.infradead.org/users/hch/block.git block-fs.h-cleanup
head: 1261c655dd25c5a21aafc9912a2b09a4956cf818
commit: 1261c655dd25c5a21aafc9912a2b09a4956cf818 [10/10] block: move struct block_device to blk_types.h
config: s390-allyesconfig (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 1261c655dd25c5a21aafc9912a2b09a4956cf818
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>, old ones prefixed by <<):
In file included from drivers/s390/block/dasd_ioctl.c:25:
>> include/linux/dasd_mod.h:7:36: warning: 'struct gendisk' declared inside parameter list will not be visible outside of this definition or declaration
7 | extern int dasd_biodasdinfo(struct gendisk *disk, dasd_information2_t *info);
| ^~~~~~~
drivers/s390/block/dasd_ioctl.c:684:5: error: conflicting types for 'dasd_biodasdinfo'
684 | int dasd_biodasdinfo(struct gendisk *disk, struct dasd_information2_t *info)
| ^~~~~~~~~~~~~~~~
In file included from drivers/s390/block/dasd_ioctl.c:25:
include/linux/dasd_mod.h:7:12: note: previous declaration of 'dasd_biodasdinfo' was here
7 | extern int dasd_biodasdinfo(struct gendisk *disk, dasd_information2_t *info);
| ^~~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from include/linux/interrupt.h:6,
from drivers/s390/block/dasd_ioctl.c:15:
drivers/s390/block/dasd_ioctl.c:700:19: error: conflicting types for 'dasd_biodasdinfo'
700 | EXPORT_SYMBOL_GPL(dasd_biodasdinfo);
| ^~~~~~~~~~~~~~~~
include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
98 | extern typeof(sym) sym; | ^~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:159:33: note: in expansion of macro '_EXPORT_SYMBOL'
159 | #define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
| ^~~~~~~~~~~~~~
>> drivers/s390/block/dasd_ioctl.c:700:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
700 | EXPORT_SYMBOL_GPL(dasd_biodasdinfo);
| ^~~~~~~~~~~~~~~~~
In file included from drivers/s390/block/dasd_ioctl.c:25:
include/linux/dasd_mod.h:7:12: note: previous declaration of 'dasd_biodasdinfo' was here
7 | extern int dasd_biodasdinfo(struct gendisk *disk, dasd_information2_t *info);
| ^~~~~~~~~~~~~~~~
--
In file included from block/partitions/ibm.c:17:
>> include/linux/dasd_mod.h:7:36: warning: 'struct gendisk' declared inside parameter list will not be visible outside of this definition or declaration
7 | extern int dasd_biodasdinfo(struct gendisk *disk, dasd_information2_t *info);
| ^~~~~~~
block/partitions/ibm.c: In function 'ibm_partition':
>> block/partitions/ibm.c:307:5: error: assignment to 'int (*)(struct gendisk *, dasd_information2_t *)' {aka 'int (*)(struct gendisk *, struct dasd_information2_t *)'} from incompatible pointer type 'int (*)(struct gendisk *, dasd_information2_t *)' {aka 'int (*)(struct gendisk *, struct dasd_information2_t *)'} [-Werror=incompatible-pointer-types]
307 | fn = symbol_get(dasd_biodasdinfo);
| ^
cc1: some warnings being treated as errors
vim +307 block/partitions/ibm.c
46e8894786327c Stefan Weinhuber 2012-08-31 285
46e8894786327c Stefan Weinhuber 2012-08-31 286
46e8894786327c Stefan Weinhuber 2012-08-31 287 /*
46e8894786327c Stefan Weinhuber 2012-08-31 288 * This is the main function, called by check.c
46e8894786327c Stefan Weinhuber 2012-08-31 289 */
46e8894786327c Stefan Weinhuber 2012-08-31 290 int ibm_partition(struct parsed_partitions *state)
46e8894786327c Stefan Weinhuber 2012-08-31 291 {
26d7e28e38206b Stefan Haberland 2020-05-19 292 int (*fn)(struct gendisk *disk, dasd_information2_t *info);
46e8894786327c Stefan Weinhuber 2012-08-31 293 struct block_device *bdev = state->bdev;
26d7e28e38206b Stefan Haberland 2020-05-19 294 struct gendisk *disk = bdev->bd_disk;
46e8894786327c Stefan Weinhuber 2012-08-31 295 int blocksize, res;
46e8894786327c Stefan Weinhuber 2012-08-31 296 loff_t i_size, offset, size;
46e8894786327c Stefan Weinhuber 2012-08-31 297 dasd_information2_t *info;
46e8894786327c Stefan Weinhuber 2012-08-31 298 struct hd_geometry *geo;
46e8894786327c Stefan Weinhuber 2012-08-31 299 char type[5] = {0,};
46e8894786327c Stefan Weinhuber 2012-08-31 300 char name[7] = {0,};
46e8894786327c Stefan Weinhuber 2012-08-31 301 sector_t labelsect;
46e8894786327c Stefan Weinhuber 2012-08-31 302 union label_t *label;
46e8894786327c Stefan Weinhuber 2012-08-31 303
46e8894786327c Stefan Weinhuber 2012-08-31 304 res = 0;
26d7e28e38206b Stefan Haberland 2020-05-19 305 if (!disk->fops->getgeo)
26d7e28e38206b Stefan Haberland 2020-05-19 306 goto out_exit;
26d7e28e38206b Stefan Haberland 2020-05-19 @307 fn = symbol_get(dasd_biodasdinfo);
:::::: The code at line 307 was first introduced by commit
:::::: 26d7e28e38206b1b3207af1409eee2269ab36f82 s390/dasd: remove ioctl_by_bdev calls
:::::: TO: Stefan Haberland <sth(a)linux.ibm.com>
:::::: CC: Jens Axboe <axboe(a)kernel.dk>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[hch-block:block-fs.h-cleanup 10/10] drivers/s390/block/dasd_ioctl.c:684:5: error: conflicting types for 'dasd_biodasdinfo'
by kernel test robot
tree: git://git.infradead.org/users/hch/block.git block-fs.h-cleanup
head: 1261c655dd25c5a21aafc9912a2b09a4956cf818
commit: 1261c655dd25c5a21aafc9912a2b09a4956cf818 [10/10] block: move struct block_device to blk_types.h
config: s390-randconfig-r006-20200615 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 3d8149c2a1228609fd7d7c91a04681304a2f0ca9)
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 s390 cross compiling tool for clang build
# apt-get install binutils-s390-linux-gnu
git checkout 1261c655dd25c5a21aafc9912a2b09a4956cf818
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>, old ones prefixed by <<):
In file included from drivers/s390/block/dasd_ioctl.c:25:
>> include/linux/dasd_mod.h:7:36: warning: declaration of 'struct gendisk' will not be visible outside of this function [-Wvisibility]
extern int dasd_biodasdinfo(struct gendisk *disk, dasd_information2_t *info);
^
In file included from drivers/s390/block/dasd_ioctl.c:30:
In file included from drivers/s390/block/dasd_int.h:49:
In file included from include/linux/blkdev.h:25:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu(__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:36:59: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
^
include/uapi/linux/swab.h:105:32: note: expanded from macro '__swab16'
(__builtin_constant_p((__u16)(x)) ? ^
In file included from drivers/s390/block/dasd_ioctl.c:30:
In file included from drivers/s390/block/dasd_int.h:49:
In file included from include/linux/blkdev.h:25:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:477:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu(__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:36:59: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
^
include/uapi/linux/swab.h:106:21: note: expanded from macro '__swab16'
___constant_swab16(x) : ^
include/uapi/linux/swab.h:15:12: note: expanded from macro '___constant_swab16'
(((__u16)(x) & (__u16)0x00ffU) << 8) | ^
In file included from drivers/s390/block/dasd_ioctl.c:30:
In file included from drivers/s390/block/dasd_int.h:49:
In file included from include/linux/blkdev.h:25:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:477:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu(__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:36:59: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
^
include/uapi/linux/swab.h:106:21: note: expanded from macro '__swab16'
___constant_swab16(x) : ^
include/uapi/linux/swab.h:16:12: note: expanded from macro '___constant_swab16'
(((__u16)(x) & (__u16)0xff00U) >> 8)))
^
In file included from drivers/s390/block/dasd_ioctl.c:30:
In file included from drivers/s390/block/dasd_int.h:49:
In file included from include/linux/blkdev.h:25:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:477:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu(__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:36:59: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
^
include/uapi/linux/swab.h:107:12: note: expanded from macro '__swab16'
__fswab16(x))
^
In file included from drivers/s390/block/dasd_ioctl.c:30:
In file included from drivers/s390/block/dasd_int.h:49:
In file included from include/linux/blkdev.h:25:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:490:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:118:32: note: expanded from macro '__swab32'
(__builtin_constant_p((__u32)(x)) ? ^
In file included from drivers/s390/block/dasd_ioctl.c:30:
In file included from drivers/s390/block/dasd_int.h:49:
In file included from include/linux/blkdev.h:25:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:490:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : ^
include/uapi/linux/swab.h:19:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x000000ffUL) << 24) | ^
In file included from drivers/s390/block/dasd_ioctl.c:30:
In file included from drivers/s390/block/dasd_int.h:49:
In file included from include/linux/blkdev.h:25:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:490:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : ^
include/uapi/linux/swab.h:20:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x0000ff00UL) << 8) | ^
In file included from drivers/s390/block/dasd_ioctl.c:30:
In file included from drivers/s390/block/dasd_int.h:49:
In file included from include/linux/blkdev.h:25:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:490:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : ^
include/uapi/linux/swab.h:21:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | ^
In file included from drivers/s390/block/dasd_ioctl.c:30:
In file included from drivers/s390/block/dasd_int.h:49:
In file included from include/linux/blkdev.h:25:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:490:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : ^
include/uapi/linux/swab.h:22:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
^
In file included from drivers/s390/block/dasd_ioctl.c:30:
In file included from drivers/s390/block/dasd_int.h:49:
In file included from include/linux/blkdev.h:25:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:490:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
__fswab32(x))
^
In file included from drivers/s390/block/dasd_ioctl.c:30:
In file included from drivers/s390/block/dasd_int.h:49:
In file included from include/linux/blkdev.h:25:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:46: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew(cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:46: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel(cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
>> drivers/s390/block/dasd_ioctl.c:684:5: error: conflicting types for 'dasd_biodasdinfo'
int dasd_biodasdinfo(struct gendisk *disk, struct dasd_information2_t *info)
^
include/linux/dasd_mod.h:7:12: note: previous declaration is here
extern int dasd_biodasdinfo(struct gendisk *disk, dasd_information2_t *info);
^
21 warnings and 1 error generated.
vim +/dasd_biodasdinfo +684 drivers/s390/block/dasd_ioctl.c
26d7e28e38206b Stefan Haberland 2020-05-19 668
26d7e28e38206b Stefan Haberland 2020-05-19 669
26d7e28e38206b Stefan Haberland 2020-05-19 670 /**
26d7e28e38206b Stefan Haberland 2020-05-19 671 * dasd_biodasdinfo() - fill out the dasd information structure
26d7e28e38206b Stefan Haberland 2020-05-19 672 * @disk [in]: pointer to gendisk structure that references a DASD
26d7e28e38206b Stefan Haberland 2020-05-19 673 * @info [out]: pointer to the dasd_information2_t structure
26d7e28e38206b Stefan Haberland 2020-05-19 674 *
26d7e28e38206b Stefan Haberland 2020-05-19 675 * Provide access to DASD specific information.
26d7e28e38206b Stefan Haberland 2020-05-19 676 * The gendisk structure is checked if it belongs to the DASD driver by
26d7e28e38206b Stefan Haberland 2020-05-19 677 * comparing the gendisk->fops pointer.
26d7e28e38206b Stefan Haberland 2020-05-19 678 * If it does not belong to the DASD driver -EINVAL is returned.
26d7e28e38206b Stefan Haberland 2020-05-19 679 * Otherwise the provided dasd_information2_t structure is filled out.
26d7e28e38206b Stefan Haberland 2020-05-19 680 *
26d7e28e38206b Stefan Haberland 2020-05-19 681 * Returns:
26d7e28e38206b Stefan Haberland 2020-05-19 682 * %0 on success and a negative error value on failure.
26d7e28e38206b Stefan Haberland 2020-05-19 683 */
26d7e28e38206b Stefan Haberland 2020-05-19 @684 int dasd_biodasdinfo(struct gendisk *disk, struct dasd_information2_t *info)
:::::: The code at line 684 was first introduced by commit
:::::: 26d7e28e38206b1b3207af1409eee2269ab36f82 s390/dasd: remove ioctl_by_bdev calls
:::::: TO: Stefan Haberland <sth(a)linux.ibm.com>
:::::: CC: Jens Axboe <axboe(a)kernel.dk>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH v1 2/3] drivers: input: misc: Add mtk vibrator driver
by kernel test robot
Hi Fengping,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on arm64/for-next/core]
[also build test WARNING on pavel-linux-leds/for-next v5.8-rc1 next-20200615]
[cannot apply to input/next]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Fengping-Yu/dt-bindings-Add-vibr...
base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
config: m68k-allmodconfig (attached as .config)
compiler: m68k-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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
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 >>, old ones prefixed by <<):
In file included from include/linux/device.h:15,
from drivers/input/misc/regulator-vibrator.c:7:
drivers/input/misc/regulator-vibrator.c: In function 'mt_vibra_parse_dt':
>> drivers/input/misc/regulator-vibrator.c:70:16: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Wformat=]
70 | dev_err(dev, "error load dts: get regulator return %dn",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
19 | #define dev_fmt(fmt) fmt
| ^~~
>> drivers/input/misc/regulator-vibrator.c:70:3: note: in expansion of macro 'dev_err'
70 | dev_err(dev, "error load dts: get regulator return %dn",
| ^~~~~~~
drivers/input/misc/regulator-vibrator.c:70:55: note: format string is defined here
70 | dev_err(dev, "error load dts: get regulator return %dn",
| ~^
| |
| int
| %ld
drivers/input/misc/regulator-vibrator.c: In function 'vib_probe':
drivers/input/misc/regulator-vibrator.c:334:5: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
334 | if (ret) {
| ^
vim +70 drivers/input/misc/regulator-vibrator.c
46
47 static int mt_vibra_parse_dt(struct device *dev,
48 struct reg_vibr_config *vibr_conf)
49 {
50 int ret;
51
52 if (device_property_read_u32(dev, "min-limit",
53 &vibr_conf->min_limit))
54 vibr_conf->min_limit = DEFAULT_MIN_LIMIT;
55 vibr_conf->min_limit = max_t(unsigned int,
56 vibr_conf->min_limit, DEFAULT_MIN_LIMIT);
57
58 if (device_property_read_u32(dev, "max-limit",
59 &vibr_conf->max_limit))
60 vibr_conf->max_limit = 0;
61
62 if (!vibr_conf->max_limit &&
63 vibr_conf->max_limit < vibr_conf->min_limit) {
64 dev_err(dev, "error load dts: get error limitation(min > max)\n");
65 return -EINVAL;
66 }
67
68 vibr_conf->reg = devm_regulator_get(dev, "vib");
69 if (IS_ERR(vibr_conf->reg)) {
> 70 dev_err(dev, "error load dts: get regulator return %d\n",
71 PTR_ERR(vibr_conf->reg));
72 vibr_conf->reg = NULL;
73 return PTR_ERR(vibr_conf->reg);
74 }
75
76 if (device_property_read_u32(dev, "max-volt",
77 &vibr_conf->max_volt)) {
78 dev_err(dev, "error load dts: get max-volt failed\n");
79 return -EINVAL;
80 }
81
82 if (device_property_read_u32(dev, "min-volt",
83 &vibr_conf->min_volt)) {
84 dev_err(dev, "error load dts: get min-volt failed!\n");
85 return -EINVAL;
86 }
87
88 if (vibr_conf->min_volt > vibr_conf->max_volt) {
89 dev_err(dev, "error load dts: get error voltage(min > max)\n");
90 return -EINVAL;
91 }
92
93 dev_info(dev, "vibr_conf = %u, %u, %u-%u\n",
94 vibr_conf->min_limit, vibr_conf->max_limit,
95 vibr_conf->min_volt, vibr_conf->max_volt);
96
97 return ret;
98 }
99
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[drm-drm-misc:drm-misc-next 1/4] drivers/gpu/drm/bridge/ti-sn65dsi86.c:923:41: error: 'struct gpio_chip' has no member named 'of_gpio_n_cells'
by kernel test robot
tree: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
head: baef4d56195b6d6e0f681f6eac03d8c6db011d34
commit: 27ed2b3f22ed60295c74b4ca3e855823d0e7603b [1/4] drm/bridge: ti-sn65dsi86: Export bridge GPIOs to Linux
:::::: branch date: 4 weeks ago
:::::: commit date: 4 weeks ago
config: xtensa-randconfig-r011-20200612 (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 27ed2b3f22ed60295c74b4ca3e855823d0e7603b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa
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 >>, old ones prefixed by <<):
In file included from ./arch/xtensa/include/generated/asm/bug.h:1,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from arch/xtensa/include/asm/current.h:18,
from include/linux/mutex.h:14,
from include/linux/notifier.h:14,
from include/linux/clk.h:14,
from drivers/gpu/drm/bridge/ti-sn65dsi86.c:8:
drivers/gpu/drm/bridge/ti-sn65dsi86.c: In function 'tn_sn_bridge_of_xlate':
>> drivers/gpu/drm/bridge/ti-sn65dsi86.c:923:41: error: 'struct gpio_chip' has no member named 'of_gpio_n_cells'
923 | if (WARN_ON(gpiospec->args_count < chip->of_gpio_n_cells))
| ^~
include/asm-generic/bug.h:113:25: note: in definition of macro 'WARN_ON'
113 | int __ret_warn_on = !!(condition); | ^~~~~~~~~
drivers/gpu/drm/bridge/ti-sn65dsi86.c: In function 'ti_sn_bridge_gpio_set':
drivers/gpu/drm/bridge/ti-sn65dsi86.c:978:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
978 | int ret;
| ^~~
drivers/gpu/drm/bridge/ti-sn65dsi86.c: In function 'ti_sn_setup_gpio_controller':
>> drivers/gpu/drm/bridge/ti-sn65dsi86.c:1067:14: error: 'struct gpio_chip' has no member named 'of_xlate'
1067 | pdata->gchip.of_xlate = tn_sn_bridge_of_xlate;
| ^
drivers/gpu/drm/bridge/ti-sn65dsi86.c:1068:14: error: 'struct gpio_chip' has no member named 'of_gpio_n_cells'
1068 | pdata->gchip.of_gpio_n_cells = 2;
| ^
git remote add drm-drm-misc git://anongit.freedesktop.org/drm/drm-misc
git remote update drm-drm-misc
git checkout 27ed2b3f22ed60295c74b4ca3e855823d0e7603b
vim +923 drivers/gpu/drm/bridge/ti-sn65dsi86.c
a095f15c00e278 Sandeep Panda 2018-07-20 918
27ed2b3f22ed60 Douglas Anderson 2020-05-07 919 static int tn_sn_bridge_of_xlate(struct gpio_chip *chip,
27ed2b3f22ed60 Douglas Anderson 2020-05-07 920 const struct of_phandle_args *gpiospec,
27ed2b3f22ed60 Douglas Anderson 2020-05-07 921 u32 *flags)
27ed2b3f22ed60 Douglas Anderson 2020-05-07 922 {
27ed2b3f22ed60 Douglas Anderson 2020-05-07 @923 if (WARN_ON(gpiospec->args_count < chip->of_gpio_n_cells))
27ed2b3f22ed60 Douglas Anderson 2020-05-07 924 return -EINVAL;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 925
27ed2b3f22ed60 Douglas Anderson 2020-05-07 926 if (gpiospec->args[0] > chip->ngpio || gpiospec->args[0] < 1)
27ed2b3f22ed60 Douglas Anderson 2020-05-07 927 return -EINVAL;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 928
27ed2b3f22ed60 Douglas Anderson 2020-05-07 929 if (flags)
27ed2b3f22ed60 Douglas Anderson 2020-05-07 930 *flags = gpiospec->args[1];
27ed2b3f22ed60 Douglas Anderson 2020-05-07 931
27ed2b3f22ed60 Douglas Anderson 2020-05-07 932 return gpiospec->args[0] - SN_GPIO_PHYSICAL_OFFSET;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 933 }
27ed2b3f22ed60 Douglas Anderson 2020-05-07 934
27ed2b3f22ed60 Douglas Anderson 2020-05-07 935 static int ti_sn_bridge_gpio_get_direction(struct gpio_chip *chip,
27ed2b3f22ed60 Douglas Anderson 2020-05-07 936 unsigned int offset)
27ed2b3f22ed60 Douglas Anderson 2020-05-07 937 {
27ed2b3f22ed60 Douglas Anderson 2020-05-07 938 struct ti_sn_bridge *pdata = gpiochip_get_data(chip);
27ed2b3f22ed60 Douglas Anderson 2020-05-07 939
27ed2b3f22ed60 Douglas Anderson 2020-05-07 940 /*
27ed2b3f22ed60 Douglas Anderson 2020-05-07 941 * We already have to keep track of the direction because we use
27ed2b3f22ed60 Douglas Anderson 2020-05-07 942 * that to figure out whether we've powered the device. We can
27ed2b3f22ed60 Douglas Anderson 2020-05-07 943 * just return that rather than (maybe) powering up the device
27ed2b3f22ed60 Douglas Anderson 2020-05-07 944 * to ask its direction.
27ed2b3f22ed60 Douglas Anderson 2020-05-07 945 */
27ed2b3f22ed60 Douglas Anderson 2020-05-07 946 return test_bit(offset, pdata->gchip_output) ?
27ed2b3f22ed60 Douglas Anderson 2020-05-07 947 GPIO_LINE_DIRECTION_OUT : GPIO_LINE_DIRECTION_IN;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 948 }
27ed2b3f22ed60 Douglas Anderson 2020-05-07 949
27ed2b3f22ed60 Douglas Anderson 2020-05-07 950 static int ti_sn_bridge_gpio_get(struct gpio_chip *chip, unsigned int offset)
27ed2b3f22ed60 Douglas Anderson 2020-05-07 951 {
27ed2b3f22ed60 Douglas Anderson 2020-05-07 952 struct ti_sn_bridge *pdata = gpiochip_get_data(chip);
27ed2b3f22ed60 Douglas Anderson 2020-05-07 953 unsigned int val;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 954 int ret;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 955
27ed2b3f22ed60 Douglas Anderson 2020-05-07 956 /*
27ed2b3f22ed60 Douglas Anderson 2020-05-07 957 * When the pin is an input we don't forcibly keep the bridge
27ed2b3f22ed60 Douglas Anderson 2020-05-07 958 * powered--we just power it on to read the pin. NOTE: part of
27ed2b3f22ed60 Douglas Anderson 2020-05-07 959 * the reason this works is that the bridge defaults (when
27ed2b3f22ed60 Douglas Anderson 2020-05-07 960 * powered back on) to all 4 GPIOs being configured as GPIO input.
27ed2b3f22ed60 Douglas Anderson 2020-05-07 961 * Also note that if something else is keeping the chip powered the
27ed2b3f22ed60 Douglas Anderson 2020-05-07 962 * pm_runtime functions are lightweight increments of a refcount.
27ed2b3f22ed60 Douglas Anderson 2020-05-07 963 */
27ed2b3f22ed60 Douglas Anderson 2020-05-07 964 pm_runtime_get_sync(pdata->dev);
27ed2b3f22ed60 Douglas Anderson 2020-05-07 965 ret = regmap_read(pdata->regmap, SN_GPIO_IO_REG, &val);
27ed2b3f22ed60 Douglas Anderson 2020-05-07 966 pm_runtime_put(pdata->dev);
27ed2b3f22ed60 Douglas Anderson 2020-05-07 967
27ed2b3f22ed60 Douglas Anderson 2020-05-07 968 if (ret)
27ed2b3f22ed60 Douglas Anderson 2020-05-07 969 return ret;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 970
27ed2b3f22ed60 Douglas Anderson 2020-05-07 971 return !!(val & BIT(SN_GPIO_INPUT_SHIFT + offset));
27ed2b3f22ed60 Douglas Anderson 2020-05-07 972 }
27ed2b3f22ed60 Douglas Anderson 2020-05-07 973
27ed2b3f22ed60 Douglas Anderson 2020-05-07 974 static void ti_sn_bridge_gpio_set(struct gpio_chip *chip, unsigned int offset,
27ed2b3f22ed60 Douglas Anderson 2020-05-07 975 int val)
27ed2b3f22ed60 Douglas Anderson 2020-05-07 976 {
27ed2b3f22ed60 Douglas Anderson 2020-05-07 977 struct ti_sn_bridge *pdata = gpiochip_get_data(chip);
27ed2b3f22ed60 Douglas Anderson 2020-05-07 978 int ret;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 979
27ed2b3f22ed60 Douglas Anderson 2020-05-07 980 if (!test_bit(offset, pdata->gchip_output)) {
27ed2b3f22ed60 Douglas Anderson 2020-05-07 981 dev_err(pdata->dev, "Ignoring GPIO set while input\n");
27ed2b3f22ed60 Douglas Anderson 2020-05-07 982 return;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 983 }
27ed2b3f22ed60 Douglas Anderson 2020-05-07 984
27ed2b3f22ed60 Douglas Anderson 2020-05-07 985 val &= 1;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 986 ret = regmap_update_bits(pdata->regmap, SN_GPIO_IO_REG,
27ed2b3f22ed60 Douglas Anderson 2020-05-07 987 BIT(SN_GPIO_OUTPUT_SHIFT + offset),
27ed2b3f22ed60 Douglas Anderson 2020-05-07 988 val << (SN_GPIO_OUTPUT_SHIFT + offset));
27ed2b3f22ed60 Douglas Anderson 2020-05-07 989 }
27ed2b3f22ed60 Douglas Anderson 2020-05-07 990
27ed2b3f22ed60 Douglas Anderson 2020-05-07 991 static int ti_sn_bridge_gpio_direction_input(struct gpio_chip *chip,
27ed2b3f22ed60 Douglas Anderson 2020-05-07 992 unsigned int offset)
27ed2b3f22ed60 Douglas Anderson 2020-05-07 993 {
27ed2b3f22ed60 Douglas Anderson 2020-05-07 994 struct ti_sn_bridge *pdata = gpiochip_get_data(chip);
27ed2b3f22ed60 Douglas Anderson 2020-05-07 995 int shift = offset * 2;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 996 int ret;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 997
27ed2b3f22ed60 Douglas Anderson 2020-05-07 998 if (!test_and_clear_bit(offset, pdata->gchip_output))
27ed2b3f22ed60 Douglas Anderson 2020-05-07 999 return 0;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1000
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1001 ret = regmap_update_bits(pdata->regmap, SN_GPIO_CTRL_REG,
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1002 SN_GPIO_MUX_MASK << shift,
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1003 SN_GPIO_MUX_INPUT << shift);
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1004 if (ret) {
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1005 set_bit(offset, pdata->gchip_output);
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1006 return ret;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1007 }
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1008
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1009 /*
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1010 * NOTE: if nobody else is powering the device this may fully power
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1011 * it off and when it comes back it will have lost all state, but
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1012 * that's OK because the default is input and we're now an input.
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1013 */
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1014 pm_runtime_put(pdata->dev);
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1015
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1016 return 0;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1017 }
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1018
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1019 static int ti_sn_bridge_gpio_direction_output(struct gpio_chip *chip,
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1020 unsigned int offset, int val)
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1021 {
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1022 struct ti_sn_bridge *pdata = gpiochip_get_data(chip);
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1023 int shift = offset * 2;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1024 int ret;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1025
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1026 if (test_and_set_bit(offset, pdata->gchip_output))
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1027 return 0;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1028
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1029 pm_runtime_get_sync(pdata->dev);
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1030
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1031 /* Set value first to avoid glitching */
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1032 ti_sn_bridge_gpio_set(chip, offset, val);
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1033
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1034 /* Set direction */
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1035 ret = regmap_update_bits(pdata->regmap, SN_GPIO_CTRL_REG,
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1036 SN_GPIO_MUX_MASK << shift,
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1037 SN_GPIO_MUX_OUTPUT << shift);
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1038 if (ret) {
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1039 clear_bit(offset, pdata->gchip_output);
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1040 pm_runtime_put(pdata->dev);
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1041 }
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1042
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1043 return ret;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1044 }
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1045
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1046 static void ti_sn_bridge_gpio_free(struct gpio_chip *chip, unsigned int offset)
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1047 {
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1048 /* We won't keep pm_runtime if we're input, so switch there on free */
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1049 ti_sn_bridge_gpio_direction_input(chip, offset);
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1050 }
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1051
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1052 static const char * const ti_sn_bridge_gpio_names[SN_NUM_GPIOS] = {
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1053 "GPIO1", "GPIO2", "GPIO3", "GPIO4"
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1054 };
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1055
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1056 static int ti_sn_setup_gpio_controller(struct ti_sn_bridge *pdata)
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1057 {
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1058 int ret;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1059
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1060 /* Only init if someone is going to use us as a GPIO controller */
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1061 if (!of_property_read_bool(pdata->dev->of_node, "gpio-controller"))
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1062 return 0;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1063
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1064 pdata->gchip.label = dev_name(pdata->dev);
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1065 pdata->gchip.parent = pdata->dev;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1066 pdata->gchip.owner = THIS_MODULE;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 @1067 pdata->gchip.of_xlate = tn_sn_bridge_of_xlate;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1068 pdata->gchip.of_gpio_n_cells = 2;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1069 pdata->gchip.free = ti_sn_bridge_gpio_free;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1070 pdata->gchip.get_direction = ti_sn_bridge_gpio_get_direction;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1071 pdata->gchip.direction_input = ti_sn_bridge_gpio_direction_input;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1072 pdata->gchip.direction_output = ti_sn_bridge_gpio_direction_output;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1073 pdata->gchip.get = ti_sn_bridge_gpio_get;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1074 pdata->gchip.set = ti_sn_bridge_gpio_set;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1075 pdata->gchip.can_sleep = true;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1076 pdata->gchip.names = ti_sn_bridge_gpio_names;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1077 pdata->gchip.ngpio = SN_NUM_GPIOS;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1078 pdata->gchip.base = -1;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1079 ret = devm_gpiochip_add_data(pdata->dev, &pdata->gchip, pdata);
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1080 if (ret)
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1081 dev_err(pdata->dev, "can't add gpio chip\n");
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1082
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1083 return ret;
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1084 }
27ed2b3f22ed60 Douglas Anderson 2020-05-07 1085
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org
2 years, 3 months