arch/sh/kernel/traps_32.c:565:5: warning: no previous prototype for 'is_dsp_inst'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ab774587903771821b59471cc723bba6d893942
commit: ccbb5239d495923cb24b84a73eb814626c5bfa57 sh: remove -Werror from Makefiles
date: 1 year, 3 months ago
config: sh-randconfig-r031-20211116 (attached as .config)
compiler: sh4-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout ccbb5239d495923cb24b84a73eb814626c5bfa57
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=sh
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> arch/sh/kernel/traps_32.c:565:5: warning: no previous prototype for 'is_dsp_inst' [-Wmissing-prototypes]
565 | int is_dsp_inst(struct pt_regs *regs)
| ^~~~~~~~~~~
arch/sh/kernel/traps_32.c:729:6: warning: no previous prototype for 'per_cpu_trap_init' [-Wmissing-prototypes]
729 | void per_cpu_trap_init(void)
| ^~~~~~~~~~~~~~~~~
vim +/is_dsp_inst +565 arch/sh/kernel/traps_32.c
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 560
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 561 #ifdef CONFIG_SH_DSP
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 562 /*
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 563 * SH-DSP support gerg(a)snapgear.com.
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 564 */
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 @565 int is_dsp_inst(struct pt_regs *regs)
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 566 {
882c12c4e1a95e arch/sh/kernel/traps.c Paul Mundt 2007-05-14 567 unsigned short inst = 0;
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 568
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 569 /*
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 570 * Safe guard if DSP mode is already enabled or we're lacking
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 571 * the DSP altogether.
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 572 */
11c1965687b0a4 arch/sh/kernel/traps.c Paul Mundt 2006-12-25 573 if (!(current_cpu_data.flags & CPU_HAS_DSP) || (regs->sr & SR_DSP))
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 574 return 0;
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 575
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 576 get_user(inst, ((unsigned short *) regs->pc));
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 577
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 578 inst &= 0xf000;
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 579
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 580 /* Check for any type of DSP or support instruction */
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 581 if ((inst == 0xf000) || (inst == 0x4000))
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 582 return 1;
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 583
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 584 return 0;
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 585 }
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 586 #else
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 587 #define is_dsp_inst(regs) (0)
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 588 #endif /* CONFIG_SH_DSP */
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 589
:::::: The code at line 565 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
10 months, 1 week
arch/x86/kernel/fpu/xstate.c:1310:9: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ab774587903771821b59471cc723bba6d893942
commit: db8268df0983adc2bb1fb48c9e5f7bfbb5f617f3 x86/arch_prctl: Add controls for dynamic XSTATE components
date: 3 weeks ago
config: x86_64-randconfig-s021-20211116 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout db8268df0983adc2bb1fb48c9e5f7bfbb5f617f3
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> arch/x86/kernel/fpu/xstate.c:1310:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct lockdep_map const *lock @@ got struct lockdep_map [noderef] __rcu * @@
arch/x86/kernel/fpu/xstate.c:1310:9: sparse: expected struct lockdep_map const *lock
arch/x86/kernel/fpu/xstate.c:1310:9: sparse: got struct lockdep_map [noderef] __rcu *
>> arch/x86/kernel/fpu/xstate.c:1392:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
arch/x86/kernel/fpu/xstate.c:1392:31: sparse: expected struct spinlock [usertype] *lock
arch/x86/kernel/fpu/xstate.c:1392:31: sparse: got struct spinlock [noderef] __rcu *
arch/x86/kernel/fpu/xstate.c:1395:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
arch/x86/kernel/fpu/xstate.c:1395:33: sparse: expected struct spinlock [usertype] *lock
arch/x86/kernel/fpu/xstate.c:1395:33: sparse: got struct spinlock [noderef] __rcu *
vim +1310 arch/x86/kernel/fpu/xstate.c
1303
1304 #ifdef CONFIG_X86_64
1305 static int validate_sigaltstack(unsigned int usize)
1306 {
1307 struct task_struct *thread, *leader = current->group_leader;
1308 unsigned long framesize = get_sigframe_size();
1309
> 1310 lockdep_assert_held(¤t->sighand->siglock);
1311
1312 /* get_sigframe_size() is based on fpu_user_cfg.max_size */
1313 framesize -= fpu_user_cfg.max_size;
1314 framesize += usize;
1315 for_each_thread(leader, thread) {
1316 if (thread->sas_ss_size && thread->sas_ss_size < framesize)
1317 return -ENOSPC;
1318 }
1319 return 0;
1320 }
1321
1322 static int __xstate_request_perm(u64 permitted, u64 requested)
1323 {
1324 /*
1325 * This deliberately does not exclude !XSAVES as we still might
1326 * decide to optionally context switch XCR0 or talk the silicon
1327 * vendors into extending XFD for the pre AMX states.
1328 */
1329 bool compacted = cpu_feature_enabled(X86_FEATURE_XSAVES);
1330 struct fpu *fpu = ¤t->group_leader->thread.fpu;
1331 unsigned int ksize, usize;
1332 u64 mask;
1333 int ret;
1334
1335 /* Check whether fully enabled */
1336 if ((permitted & requested) == requested)
1337 return 0;
1338
1339 /* Calculate the resulting kernel state size */
1340 mask = permitted | requested;
1341 ksize = xstate_calculate_size(mask, compacted);
1342
1343 /* Calculate the resulting user state size */
1344 mask &= XFEATURE_MASK_USER_SUPPORTED;
1345 usize = xstate_calculate_size(mask, false);
1346
1347 ret = validate_sigaltstack(usize);
1348 if (ret)
1349 return ret;
1350
1351 /* Pairs with the READ_ONCE() in xstate_get_group_perm() */
1352 WRITE_ONCE(fpu->perm.__state_perm, requested);
1353 /* Protected by sighand lock */
1354 fpu->perm.__state_size = ksize;
1355 fpu->perm.__user_state_size = usize;
1356 return ret;
1357 }
1358
1359 /*
1360 * Permissions array to map facilities with more than one component
1361 */
1362 static const u64 xstate_prctl_req[XFEATURE_MAX] = {
1363 /* [XFEATURE_XTILE_DATA] = XFEATURE_MASK_XTILE, */
1364 };
1365
1366 static int xstate_request_perm(unsigned long idx)
1367 {
1368 u64 permitted, requested;
1369 int ret;
1370
1371 if (idx >= XFEATURE_MAX)
1372 return -EINVAL;
1373
1374 /*
1375 * Look up the facility mask which can require more than
1376 * one xstate component.
1377 */
1378 idx = array_index_nospec(idx, ARRAY_SIZE(xstate_prctl_req));
1379 requested = xstate_prctl_req[idx];
1380 if (!requested)
1381 return -EOPNOTSUPP;
1382
1383 if ((fpu_user_cfg.max_features & requested) != requested)
1384 return -EOPNOTSUPP;
1385
1386 /* Lockless quick check */
1387 permitted = xstate_get_host_group_perm();
1388 if ((permitted & requested) == requested)
1389 return 0;
1390
1391 /* Protect against concurrent modifications */
> 1392 spin_lock_irq(¤t->sighand->siglock);
1393 permitted = xstate_get_host_group_perm();
1394 ret = __xstate_request_perm(permitted, requested);
1395 spin_unlock_irq(¤t->sighand->siglock);
1396 return ret;
1397 }
1398 #else /* CONFIG_X86_64 */
1399 static inline int xstate_request_perm(unsigned long idx)
1400 {
1401 return -EPERM;
1402 }
1403 #endif /* !CONFIG_X86_64 */
1404
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
[tglx-devel:msi 12/89] drivers/gpu/drm/i915/gem/i915_gem_object.h:43:6: warning: shift count >= width of type
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git msi
head: c176cd1c88abe6b527b9fc0bc58585b4f1858079
commit: af8fff0d2612f31d67146cf55e3d98870ab2f069 [12/89] PCI/MSI: Make arch_restore_msi_irqs() less horrible.
config: x86_64-buildonly-randconfig-r006-20211116 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project fbe72e41b99dc7994daac300d208a955be3e4a0a)
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/tglx/devel.git/commit/?id...
git remote add tglx-devel https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git
git fetch --no-tags tglx-devel msi
git checkout af8fff0d2612f31d67146cf55e3d98870ab2f069
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 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 warnings (new ones prefixed by >>):
In file included from drivers/gpu/drm/i915/i915_drv.c:50:
In file included from drivers/gpu/drm/i915/display/intel_cdclk.h:11:
In file included from drivers/gpu/drm/i915/i915_drv.h:36:
In file included from arch/x86/include/asm/hypervisor.h:39:
arch/x86/include/asm/xen/hypervisor.h:78:2: error: #endif without #if
#endif /* _ASM_X86_XEN_HYPERVISOR_H */
^
In file included from drivers/gpu/drm/i915/i915_drv.c:50:
In file included from drivers/gpu/drm/i915/display/intel_cdclk.h:11:
In file included from drivers/gpu/drm/i915/i915_drv.h:84:
In file included from drivers/gpu/drm/i915/gt/intel_engine.h:18:
In file included from drivers/gpu/drm/i915/gt/intel_gt_types.h:18:
In file included from drivers/gpu/drm/i915/gt/uc/intel_uc.h:9:
In file included from drivers/gpu/drm/i915/gt/uc/intel_guc.h:19:
In file included from drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h:13:
In file included from drivers/gpu/drm/i915/i915_vma.h:34:
>> drivers/gpu/drm/i915/gem/i915_gem_object.h:43:6: warning: shift count >= width of type [-Wshift-count-overflow]
if (overflows_type(size, obj->base.size))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/i915_utils.h:126:32: note: expanded from macro 'overflows_type'
(sizeof(x) > sizeof(T) && (x) >> BITS_PER_TYPE(T))
^ ~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
--
In file included from drivers/gpu/drm/i915/i915_config.c:6:
In file included from drivers/gpu/drm/i915/i915_drv.h:36:
In file included from arch/x86/include/asm/hypervisor.h:39:
arch/x86/include/asm/xen/hypervisor.h:64:51: warning: declaration of 'struct pci_dev' will not be visible outside of this function [-Wvisibility]
static inline bool xen_initdom_restore_msi(struct pci_dev *dev) { return true; }
^
arch/x86/include/asm/xen/hypervisor.h:78:2: error: #endif without #if
#endif /* _ASM_X86_XEN_HYPERVISOR_H */
^
In file included from drivers/gpu/drm/i915/i915_config.c:6:
In file included from drivers/gpu/drm/i915/i915_drv.h:84:
In file included from drivers/gpu/drm/i915/gt/intel_engine.h:18:
In file included from drivers/gpu/drm/i915/gt/intel_gt_types.h:18:
In file included from drivers/gpu/drm/i915/gt/uc/intel_uc.h:9:
In file included from drivers/gpu/drm/i915/gt/uc/intel_guc.h:19:
In file included from drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h:13:
In file included from drivers/gpu/drm/i915/i915_vma.h:34:
>> drivers/gpu/drm/i915/gem/i915_gem_object.h:43:6: warning: shift count >= width of type [-Wshift-count-overflow]
if (overflows_type(size, obj->base.size))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/i915_utils.h:126:32: note: expanded from macro 'overflows_type'
(sizeof(x) > sizeof(T) && (x) >> BITS_PER_TYPE(T))
^ ~~~~~~~~~~~~~~~~
2 warnings and 1 error generated.
--
In file included from drivers/gpu/drm/i915/intel_pm.c:38:
In file included from drivers/gpu/drm/i915/display/intel_de.h:9:
In file included from drivers/gpu/drm/i915/i915_drv.h:36:
In file included from arch/x86/include/asm/hypervisor.h:39:
arch/x86/include/asm/xen/hypervisor.h:78:2: error: #endif without #if
#endif /* _ASM_X86_XEN_HYPERVISOR_H */
^
In file included from drivers/gpu/drm/i915/intel_pm.c:38:
In file included from drivers/gpu/drm/i915/display/intel_de.h:9:
In file included from drivers/gpu/drm/i915/i915_drv.h:84:
In file included from drivers/gpu/drm/i915/gt/intel_engine.h:18:
In file included from drivers/gpu/drm/i915/gt/intel_gt_types.h:18:
In file included from drivers/gpu/drm/i915/gt/uc/intel_uc.h:9:
In file included from drivers/gpu/drm/i915/gt/uc/intel_guc.h:19:
In file included from drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h:13:
In file included from drivers/gpu/drm/i915/i915_vma.h:34:
>> drivers/gpu/drm/i915/gem/i915_gem_object.h:43:6: warning: shift count >= width of type [-Wshift-count-overflow]
if (overflows_type(size, obj->base.size))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/i915_utils.h:126:32: note: expanded from macro 'overflows_type'
(sizeof(x) > sizeof(T) && (x) >> BITS_PER_TYPE(T))
^ ~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/intel_pm.c:3065:12: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical]
changed = ilk_increase_wm_latency(dev_priv, dev_priv->wm.pri_latency, 12) |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/intel_pm.c:3065:12: note: cast one or both operands to int to silence this warning
drivers/gpu/drm/i915/intel_pm.c:3065:12: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical]
changed = ilk_increase_wm_latency(dev_priv, dev_priv->wm.pri_latency, 12) |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
||
drivers/gpu/drm/i915/intel_pm.c:3065:12: note: cast one or both operands to int to silence this warning
3 warnings and 1 error generated.
--
In file included from drivers/gpu/drm/i915/gem/i915_gem_internal.c:11:
In file included from drivers/gpu/drm/i915/i915_drv.h:36:
In file included from arch/x86/include/asm/hypervisor.h:39:
arch/x86/include/asm/xen/hypervisor.h:78:2: error: #endif without #if
#endif /* _ASM_X86_XEN_HYPERVISOR_H */
^
In file included from drivers/gpu/drm/i915/gem/i915_gem_internal.c:11:
In file included from drivers/gpu/drm/i915/i915_drv.h:84:
In file included from drivers/gpu/drm/i915/gt/intel_engine.h:18:
In file included from drivers/gpu/drm/i915/gt/intel_gt_types.h:18:
In file included from drivers/gpu/drm/i915/gt/uc/intel_uc.h:9:
In file included from drivers/gpu/drm/i915/gt/uc/intel_guc.h:19:
In file included from drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h:13:
In file included from drivers/gpu/drm/i915/i915_vma.h:34:
>> drivers/gpu/drm/i915/gem/i915_gem_object.h:43:6: warning: shift count >= width of type [-Wshift-count-overflow]
if (overflows_type(size, obj->base.size))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/i915_utils.h:126:32: note: expanded from macro 'overflows_type'
(sizeof(x) > sizeof(T) && (x) >> BITS_PER_TYPE(T))
^ ~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/i915/gem/i915_gem_internal.c:174:6: warning: shift count >= width of type [-Wshift-count-overflow]
if (overflows_type(size, obj->base.size))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/i915_utils.h:126:32: note: expanded from macro 'overflows_type'
(sizeof(x) > sizeof(T) && (x) >> BITS_PER_TYPE(T))
^ ~~~~~~~~~~~~~~~~
2 warnings and 1 error generated.
--
In file included from drivers/gpu/drm/i915/i915_query.c:9:
In file included from drivers/gpu/drm/i915/i915_drv.h:36:
In file included from arch/x86/include/asm/hypervisor.h:39:
arch/x86/include/asm/xen/hypervisor.h:64:51: warning: declaration of 'struct pci_dev' will not be visible outside of this function [-Wvisibility]
static inline bool xen_initdom_restore_msi(struct pci_dev *dev) { return true; }
^
arch/x86/include/asm/xen/hypervisor.h:78:2: error: #endif without #if
#endif /* _ASM_X86_XEN_HYPERVISOR_H */
^
In file included from drivers/gpu/drm/i915/i915_query.c:9:
In file included from drivers/gpu/drm/i915/i915_drv.h:84:
In file included from drivers/gpu/drm/i915/gt/intel_engine.h:18:
In file included from drivers/gpu/drm/i915/gt/intel_gt_types.h:18:
In file included from drivers/gpu/drm/i915/gt/uc/intel_uc.h:9:
In file included from drivers/gpu/drm/i915/gt/uc/intel_guc.h:19:
In file included from drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h:13:
In file included from drivers/gpu/drm/i915/i915_vma.h:34:
>> drivers/gpu/drm/i915/gem/i915_gem_object.h:43:6: warning: shift count >= width of type [-Wshift-count-overflow]
if (overflows_type(size, obj->base.size))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/i915_utils.h:126:32: note: expanded from macro 'overflows_type'
(sizeof(x) > sizeof(T) && (x) >> BITS_PER_TYPE(T))
^ ~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/i915/i915_query.c:512:7: warning: shift count >= width of type [-Wshift-count-overflow]
if (overflows_type(item.query_id - 1, unsigned long))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/i915_utils.h:126:32: note: expanded from macro 'overflows_type'
(sizeof(x) > sizeof(T) && (x) >> BITS_PER_TYPE(T))
^ ~~~~~~~~~~~~~~~~
3 warnings and 1 error generated.
--
In file included from drivers/gpu/drm/i915/display/intel_fb.c:10:
In file included from drivers/gpu/drm/i915/display/intel_display_types.h:47:
In file included from drivers/gpu/drm/i915/i915_drv.h:36:
In file included from arch/x86/include/asm/hypervisor.h:39:
arch/x86/include/asm/xen/hypervisor.h:78:2: error: #endif without #if
#endif /* _ASM_X86_XEN_HYPERVISOR_H */
^
In file included from drivers/gpu/drm/i915/display/intel_fb.c:10:
In file included from drivers/gpu/drm/i915/display/intel_display_types.h:47:
In file included from drivers/gpu/drm/i915/i915_drv.h:84:
In file included from drivers/gpu/drm/i915/gt/intel_engine.h:18:
In file included from drivers/gpu/drm/i915/gt/intel_gt_types.h:18:
In file included from drivers/gpu/drm/i915/gt/uc/intel_uc.h:9:
In file included from drivers/gpu/drm/i915/gt/uc/intel_guc.h:19:
In file included from drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h:13:
In file included from drivers/gpu/drm/i915/i915_vma.h:34:
>> drivers/gpu/drm/i915/gem/i915_gem_object.h:43:6: warning: shift count >= width of type [-Wshift-count-overflow]
if (overflows_type(size, obj->base.size))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/i915_utils.h:126:32: note: expanded from macro 'overflows_type'
(sizeof(x) > sizeof(T) && (x) >> BITS_PER_TYPE(T))
^ ~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/i915/display/intel_fb.c:863:2: warning: shift count >= width of type [-Wshift-count-overflow]
assign_chk_ovf(i915, remap_info->offset, obj_offset);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/display/intel_fb.c:845:28: note: expanded from macro 'assign_chk_ovf'
drm_WARN_ON(&(i915)->drm, overflows_type(val, var)); \
~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/i915_utils.h:126:32: note: expanded from macro 'overflows_type'
(sizeof(x) > sizeof(T) && (x) >> BITS_PER_TYPE(T))
^
include/drm/drm_print.h:593:19: note: expanded from macro 'drm_WARN_ON'
drm_WARN((drm), (x), "%s", \
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/drm/drm_print.h:583:7: note: expanded from macro 'drm_WARN'
WARN(condition, "%s %s: " format, \
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/bug.h:130:25: note: expanded from macro 'WARN'
int __ret_warn_on = !!(condition); \
^~~~~~~~~
2 warnings and 1 error generated.
vim +43 drivers/gpu/drm/i915/gem/i915_gem_object.h
b6e913e19c54ed Thomas Hellström 2021-06-29 22
ae2fb480f32f65 Matthew Auld 2021-01-22 23 /*
ae2fb480f32f65 Matthew Auld 2021-01-22 24 * XXX: There is a prevalence of the assumption that we fit the
ae2fb480f32f65 Matthew Auld 2021-01-22 25 * object's page count inside a 32bit _signed_ variable. Let's document
ae2fb480f32f65 Matthew Auld 2021-01-22 26 * this and catch if we ever need to fix it. In the meantime, if you do
ae2fb480f32f65 Matthew Auld 2021-01-22 27 * spot such a local variable, please consider fixing!
ae2fb480f32f65 Matthew Auld 2021-01-22 28 *
ae2fb480f32f65 Matthew Auld 2021-01-22 29 * Aside from our own locals (for which we have no excuse!):
ae2fb480f32f65 Matthew Auld 2021-01-22 30 * - sg_table embeds unsigned int for num_pages
ae2fb480f32f65 Matthew Auld 2021-01-22 31 * - get_user_pages*() mixed ints with longs
ae2fb480f32f65 Matthew Auld 2021-01-22 32 */
ae2fb480f32f65 Matthew Auld 2021-01-22 33 #define GEM_CHECK_SIZE_OVERFLOW(sz) \
ae2fb480f32f65 Matthew Auld 2021-01-22 34 GEM_WARN_ON((sz) >> PAGE_SHIFT > INT_MAX)
ae2fb480f32f65 Matthew Auld 2021-01-22 35
ae2fb480f32f65 Matthew Auld 2021-01-22 36 static inline bool i915_gem_object_size_2big(u64 size)
ae2fb480f32f65 Matthew Auld 2021-01-22 37 {
ae2fb480f32f65 Matthew Auld 2021-01-22 38 struct drm_i915_gem_object *obj;
ae2fb480f32f65 Matthew Auld 2021-01-22 39
ae2fb480f32f65 Matthew Auld 2021-01-22 40 if (GEM_CHECK_SIZE_OVERFLOW(size))
ae2fb480f32f65 Matthew Auld 2021-01-22 41 return true;
ae2fb480f32f65 Matthew Auld 2021-01-22 42
ae2fb480f32f65 Matthew Auld 2021-01-22 @43 if (overflows_type(size, obj->base.size))
ae2fb480f32f65 Matthew Auld 2021-01-22 44 return true;
ae2fb480f32f65 Matthew Auld 2021-01-22 45
ae2fb480f32f65 Matthew Auld 2021-01-22 46 return false;
ae2fb480f32f65 Matthew Auld 2021-01-22 47 }
ae2fb480f32f65 Matthew Auld 2021-01-22 48
:::::: The code at line 43 was first introduced by commit
:::::: ae2fb480f32f657d896d78b6214c2efebfa61993 drm/i915/gem: consolidate 2big error checking for object sizes
:::::: TO: Matthew Auld <matthew.auld(a)intel.com>
:::::: CC: Daniel Vetter <daniel.vetter(a)ffwll.ch>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
drivers/firmware/efi/sysfb_efi.c:190:35: warning: unused variable 'efifb_dmi_system_table'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ab774587903771821b59471cc723bba6d893942
commit: 15d27b15de965043d6f8e23bc7f34386fcd1a772 efi: sysfb_efi: fix build when EFI is not set
date: 4 months ago
config: x86_64-randconfig-r005-20211116 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project fbe72e41b99dc7994daac300d208a955be3e4a0a)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 15d27b15de965043d6f8e23bc7f34386fcd1a772
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 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 warnings (new ones prefixed by >>):
drivers/firmware/efi/sysfb_efi.c:72:6: warning: no previous prototype for function 'efifb_setup_from_dmi' [-Wmissing-prototypes]
void efifb_setup_from_dmi(struct screen_info *si, const char *opt)
^
drivers/firmware/efi/sysfb_efi.c:72:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void efifb_setup_from_dmi(struct screen_info *si, const char *opt)
^
static
>> drivers/firmware/efi/sysfb_efi.c:190:35: warning: unused variable 'efifb_dmi_system_table' [-Wunused-const-variable]
static const struct dmi_system_id efifb_dmi_system_table[] __initconst = {
^
>> drivers/firmware/efi/sysfb_efi.c:240:35: warning: unused variable 'efifb_dmi_swap_width_height' [-Wunused-const-variable]
static const struct dmi_system_id efifb_dmi_swap_width_height[] __initconst = {
^
>> drivers/firmware/efi/sysfb_efi.c:331:39: warning: unused variable 'efifb_fwnode_ops' [-Wunused-const-variable]
static const struct fwnode_operations efifb_fwnode_ops = {
^
4 warnings generated.
vim +/efifb_dmi_system_table +190 drivers/firmware/efi/sysfb_efi.c
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 178
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 179 #define EFIFB_DMI_SYSTEM_ID(vendor, name, enumid) \
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 180 { \
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 181 efifb_set_system, \
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 182 name, \
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 183 { \
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 184 DMI_MATCH(DMI_BIOS_VENDOR, vendor), \
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 185 DMI_MATCH(DMI_PRODUCT_NAME, name) \
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 186 }, \
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 187 &efifb_dmi_list[enumid] \
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 188 }
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 189
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 @190 static const struct dmi_system_id efifb_dmi_system_table[] __initconst = {
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 191 EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "iMac4,1", M_I17),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 192 /* At least one of these two will be right; maybe both? */
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 193 EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "iMac5,1", M_I20),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 194 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "iMac5,1", M_I20),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 195 /* At least one of these two will be right; maybe both? */
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 196 EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "iMac6,1", M_I24),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 197 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "iMac6,1", M_I24),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 198 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "iMac7,1", M_I20_SR),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 199 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "iMac8,1", M_I24_8_1),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 200 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "iMac10,1", M_I24_10_1),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 201 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "iMac11,1", M_I27_11_1),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 202 EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "Macmini1,1", M_MINI),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 203 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "Macmini3,1", M_MINI_3_1),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 204 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "Macmini4,1", M_MINI_4_1),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 205 EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBook1,1", M_MB),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 206 /* At least one of these two will be right; maybe both? */
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 207 EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBook2,1", M_MB),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 208 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBook2,1", M_MB),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 209 /* At least one of these two will be right; maybe both? */
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 210 EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBook3,1", M_MB),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 211 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBook3,1", M_MB),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 212 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBook4,1", M_MB),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 213 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBook5,1", M_MB_5_1),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 214 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBook6,1", M_MB_6_1),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 215 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBook7,1", M_MB_7_1),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 216 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookAir1,1", M_MBA),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 217 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookAir3,1", M_MBA_3),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 218 EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBookPro1,1", M_MBP),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 219 EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBookPro2,1", M_MBP_2),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 220 EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBookPro2,2", M_MBP_2_2),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 221 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro2,1", M_MBP_2),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 222 EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBookPro3,1", M_MBP_SR),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 223 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro3,1", M_MBP_SR),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 224 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro4,1", M_MBP_4),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 225 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro5,1", M_MBP_5_1),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 226 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro5,2", M_MBP_5_2),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 227 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro5,3", M_MBP_5_3),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 228 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro6,1", M_MBP_6_1),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 229 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro6,2", M_MBP_6_2),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 230 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro7,1", M_MBP_7_1),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 231 EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro8,2", M_MBP_8_2),
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 232 {},
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 233 };
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 234
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 235 /*
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 236 * Some devices have a portrait LCD but advertise a landscape resolution (and
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 237 * pitch). We simply swap width and height for these devices so that we can
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 238 * correctly deal with some of them coming with multiple resolutions.
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 239 */
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 @240 static const struct dmi_system_id efifb_dmi_swap_width_height[] __initconst = {
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 241 {
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 242 /*
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 243 * Lenovo MIIX310-10ICR, only some batches have the troublesome
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 244 * 800x1280 portrait screen. Luckily the portrait version has
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 245 * its own BIOS version, so we match on that.
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 246 */
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 247 .matches = {
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 248 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"),
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 249 DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "MIIX 310-10ICR"),
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 250 DMI_EXACT_MATCH(DMI_BIOS_VERSION, "1HCN44WW"),
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 251 },
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 252 },
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 253 {
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 254 /* Lenovo MIIX 320-10ICR with 800x1280 portrait screen */
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 255 .matches = {
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 256 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"),
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 257 DMI_EXACT_MATCH(DMI_PRODUCT_VERSION,
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 258 "Lenovo MIIX 320-10ICR"),
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 259 },
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 260 },
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 261 {
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 262 /* Lenovo D330 with 800x1280 or 1200x1920 portrait screen */
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 263 .matches = {
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 264 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"),
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 265 DMI_EXACT_MATCH(DMI_PRODUCT_VERSION,
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 266 "Lenovo ideapad D330-10IGM"),
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 267 },
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 268 },
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 269 {},
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 270 };
d02f1aa39189e0 arch/x86/kernel/sysfb_efi.c Hans de Goede 2019-07-21 271
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 272 static bool efifb_overlaps_pci_range(const struct of_pci_range *range)
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 273 {
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 274 u64 fb_base = screen_info.lfb_base;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 275
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 276 if (screen_info.capabilities & VIDEO_CAPABILITY_64BIT_BASE)
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 277 fb_base |= (u64)(unsigned long)screen_info.ext_lfb_base << 32;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 278
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 279 return fb_base >= range->cpu_addr &&
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 280 fb_base < (range->cpu_addr + range->size);
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 281 }
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 282
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 283 static struct device_node *find_pci_overlap_node(void)
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 284 {
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 285 struct device_node *np;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 286
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 287 for_each_node_by_type(np, "pci") {
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 288 struct of_pci_range_parser parser;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 289 struct of_pci_range range;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 290 int err;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 291
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 292 err = of_pci_range_parser_init(&parser, np);
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 293 if (err) {
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 294 pr_warn("of_pci_range_parser_init() failed: %d\n", err);
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 295 continue;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 296 }
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 297
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 298 for_each_of_pci_range(&parser, &range)
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 299 if (efifb_overlaps_pci_range(&range))
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 300 return np;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 301 }
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 302 return NULL;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 303 }
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 304
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 305 /*
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 306 * If the efifb framebuffer is backed by a PCI graphics controller, we have
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 307 * to ensure that this relation is expressed using a device link when
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 308 * running in DT mode, or the probe order may be reversed, resulting in a
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 309 * resource reservation conflict on the memory window that the efifb
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 310 * framebuffer steals from the PCIe host bridge.
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 311 */
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 312 static int efifb_add_links(struct fwnode_handle *fwnode)
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 313 {
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 314 struct device_node *sup_np;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 315
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 316 sup_np = find_pci_overlap_node();
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 317
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 318 /*
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 319 * If there's no PCI graphics controller backing the efifb, we are
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 320 * done here.
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 321 */
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 322 if (!sup_np)
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 323 return 0;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 324
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 325 fwnode_link_add(fwnode, of_fwnode_handle(sup_np));
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 326 of_node_put(sup_np);
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 327
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 328 return 0;
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 329 }
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 330
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 @331 static const struct fwnode_operations efifb_fwnode_ops = {
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 332 .add_links = efifb_add_links,
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 333 };
8633ef82f101c0 drivers/firmware/efi/sysfb_efi.c Javier Martinez Canillas 2021-06-25 334
:::::: The code at line 190 was first introduced by commit
:::::: 2995e506276bfdc7311eb02db8b2aa1a61a4b849 x86: sysfb: move EFI quirks from efifb to sysfb
:::::: TO: David Herrmann <dh.herrmann(a)gmail.com>
:::::: CC: H. Peter Anvin <hpa(a)linux.intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
drivers/mmc/host/mxcmmc.c:1028:18: warning: cast to smaller integer type 'enum mxcmci_type' from 'const void *'
by kernel test robot
Hi Fabio,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ab774587903771821b59471cc723bba6d893942
commit: 8223e885e74b6424cd5b0ab1de4581ca017b7a4e mmc: mxc: Convert the driver to DT-only
date: 12 months ago
config: arm64-randconfig-r001-20211116 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project fbe72e41b99dc7994daac300d208a955be3e4a0a)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 8223e885e74b6424cd5b0ab1de4581ca017b7a4e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/mmc/host/mxcmmc.c:1028:18: warning: cast to smaller integer type 'enum mxcmci_type' from 'const void *' [-Wvoid-pointer-to-enum-cast]
host->devtype = (enum mxcmci_type)of_device_get_match_data(&pdev->dev);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for MTK_SCP
Depends on REMOTEPROC && (ARCH_MEDIATEK || COMPILE_TEST
Selected by
- VIDEO_MEDIATEK_VCODEC && MEDIA_SUPPORT && MEDIA_PLATFORM_SUPPORT && V4L_MEM2MEM_DRIVERS && (MTK_IOMMU || COMPILE_TEST && VIDEO_DEV && VIDEO_V4L2 && (ARCH_MEDIATEK || COMPILE_TEST
vim +1028 drivers/mmc/host/mxcmmc.c
979
980 static int mxcmci_probe(struct platform_device *pdev)
981 {
982 struct mmc_host *mmc;
983 struct mxcmci_host *host;
984 struct resource *res;
985 int ret = 0, irq;
986 bool dat3_card_detect = false;
987 dma_cap_mask_t mask;
988 struct imxmmc_platform_data *pdata = pdev->dev.platform_data;
989
990 pr_info("i.MX/MPC512x SDHC driver\n");
991
992 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
993 irq = platform_get_irq(pdev, 0);
994 if (irq < 0)
995 return irq;
996
997 mmc = mmc_alloc_host(sizeof(*host), &pdev->dev);
998 if (!mmc)
999 return -ENOMEM;
1000
1001 host = mmc_priv(mmc);
1002
1003 host->base = devm_ioremap_resource(&pdev->dev, res);
1004 if (IS_ERR(host->base)) {
1005 ret = PTR_ERR(host->base);
1006 goto out_free;
1007 }
1008
1009 host->phys_base = res->start;
1010
1011 ret = mmc_of_parse(mmc);
1012 if (ret)
1013 goto out_free;
1014 mmc->ops = &mxcmci_ops;
1015
1016 /* For devicetree parsing, the bus width is read from devicetree */
1017 if (pdata)
1018 mmc->caps = MMC_CAP_4_BIT_DATA | MMC_CAP_SDIO_IRQ;
1019 else
1020 mmc->caps |= MMC_CAP_SDIO_IRQ;
1021
1022 /* MMC core transfer sizes tunable parameters */
1023 mmc->max_blk_size = 2048;
1024 mmc->max_blk_count = 65535;
1025 mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count;
1026 mmc->max_seg_size = mmc->max_req_size;
1027
> 1028 host->devtype = (enum mxcmci_type)of_device_get_match_data(&pdev->dev);
1029
1030 /* adjust max_segs after devtype detection */
1031 if (!is_mpc512x_mmc(host))
1032 mmc->max_segs = 64;
1033
1034 host->mmc = mmc;
1035 host->pdata = pdata;
1036 spin_lock_init(&host->lock);
1037
1038 if (pdata)
1039 dat3_card_detect = pdata->dat3_card_detect;
1040 else if (mmc_card_is_removable(mmc)
1041 && !of_property_read_bool(pdev->dev.of_node, "cd-gpios"))
1042 dat3_card_detect = true;
1043
1044 ret = mmc_regulator_get_supply(mmc);
1045 if (ret)
1046 goto out_free;
1047
1048 if (!mmc->ocr_avail) {
1049 if (pdata && pdata->ocr_avail)
1050 mmc->ocr_avail = pdata->ocr_avail;
1051 else
1052 mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
1053 }
1054
1055 if (dat3_card_detect)
1056 host->default_irq_mask =
1057 INT_CARD_INSERTION_EN | INT_CARD_REMOVAL_EN;
1058 else
1059 host->default_irq_mask = 0;
1060
1061 host->clk_ipg = devm_clk_get(&pdev->dev, "ipg");
1062 if (IS_ERR(host->clk_ipg)) {
1063 ret = PTR_ERR(host->clk_ipg);
1064 goto out_free;
1065 }
1066
1067 host->clk_per = devm_clk_get(&pdev->dev, "per");
1068 if (IS_ERR(host->clk_per)) {
1069 ret = PTR_ERR(host->clk_per);
1070 goto out_free;
1071 }
1072
1073 ret = clk_prepare_enable(host->clk_per);
1074 if (ret)
1075 goto out_free;
1076
1077 ret = clk_prepare_enable(host->clk_ipg);
1078 if (ret)
1079 goto out_clk_per_put;
1080
1081 mxcmci_softreset(host);
1082
1083 host->rev_no = mxcmci_readw(host, MMC_REG_REV_NO);
1084 if (host->rev_no != 0x400) {
1085 ret = -ENODEV;
1086 dev_err(mmc_dev(host->mmc), "wrong rev.no. 0x%08x. aborting.\n",
1087 host->rev_no);
1088 goto out_clk_put;
1089 }
1090
1091 mmc->f_min = clk_get_rate(host->clk_per) >> 16;
1092 mmc->f_max = clk_get_rate(host->clk_per) >> 1;
1093
1094 /* recommended in data sheet */
1095 mxcmci_writew(host, 0x2db4, MMC_REG_READ_TO);
1096
1097 mxcmci_writel(host, host->default_irq_mask, MMC_REG_INT_CNTR);
1098
1099 if (!host->pdata) {
1100 host->dma = dma_request_chan(&pdev->dev, "rx-tx");
1101 if (IS_ERR(host->dma)) {
1102 if (PTR_ERR(host->dma) == -EPROBE_DEFER) {
1103 ret = -EPROBE_DEFER;
1104 goto out_clk_put;
1105 }
1106
1107 /* Ignore errors to fall back to PIO mode */
1108 host->dma = NULL;
1109 }
1110 } else {
1111 res = platform_get_resource(pdev, IORESOURCE_DMA, 0);
1112 if (res) {
1113 host->dmareq = res->start;
1114 host->dma_data.peripheral_type = IMX_DMATYPE_SDHC;
1115 host->dma_data.priority = DMA_PRIO_LOW;
1116 host->dma_data.dma_request = host->dmareq;
1117 dma_cap_zero(mask);
1118 dma_cap_set(DMA_SLAVE, mask);
1119 host->dma = dma_request_channel(mask, filter, host);
1120 }
1121 }
1122 if (host->dma)
1123 mmc->max_seg_size = dma_get_max_seg_size(
1124 host->dma->device->dev);
1125 else
1126 dev_info(mmc_dev(host->mmc), "dma not available. Using PIO\n");
1127
1128 INIT_WORK(&host->datawork, mxcmci_datawork);
1129
1130 ret = devm_request_irq(&pdev->dev, irq, mxcmci_irq, 0,
1131 dev_name(&pdev->dev), host);
1132 if (ret)
1133 goto out_free_dma;
1134
1135 platform_set_drvdata(pdev, mmc);
1136
1137 if (host->pdata && host->pdata->init) {
1138 ret = host->pdata->init(&pdev->dev, mxcmci_detect_irq,
1139 host->mmc);
1140 if (ret)
1141 goto out_free_dma;
1142 }
1143
1144 timer_setup(&host->watchdog, mxcmci_watchdog, 0);
1145
1146 mmc_add_host(mmc);
1147
1148 return 0;
1149
1150 out_free_dma:
1151 if (host->dma)
1152 dma_release_channel(host->dma);
1153
1154 out_clk_put:
1155 clk_disable_unprepare(host->clk_ipg);
1156 out_clk_per_put:
1157 clk_disable_unprepare(host->clk_per);
1158
1159 out_free:
1160 mmc_free_host(mmc);
1161
1162 return ret;
1163 }
1164
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
kernel/sched/rt.c:257:6: warning: no previous prototype for 'unregister_rt_sched_group'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ab774587903771821b59471cc723bba6d893942
commit: b027789e5e50494c2325cc70c8642e7fd6059479 sched/fair: Prevent dead task groups from regaining cfs_rq's
date: 5 days ago
config: arm-randconfig-r031-20211116 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout b027789e5e50494c2325cc70c8642e7fd6059479
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> kernel/sched/rt.c:257:6: warning: no previous prototype for 'unregister_rt_sched_group' [-Wmissing-prototypes]
257 | void unregister_rt_sched_group(struct task_group *tg) { }
| ^~~~~~~~~~~~~~~~~~~~~~~~~
kernel/sched/rt.c:259:6: warning: no previous prototype for 'free_rt_sched_group' [-Wmissing-prototypes]
259 | void free_rt_sched_group(struct task_group *tg) { }
| ^~~~~~~~~~~~~~~~~~~
kernel/sched/rt.c:261:5: warning: no previous prototype for 'alloc_rt_sched_group' [-Wmissing-prototypes]
261 | int alloc_rt_sched_group(struct task_group *tg, struct task_group *parent)
| ^~~~~~~~~~~~~~~~~~~~
kernel/sched/rt.c:675:6: warning: no previous prototype for 'sched_rt_bandwidth_account' [-Wmissing-prototypes]
675 | bool sched_rt_bandwidth_account(struct rt_rq *rt_rq)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/unregister_rt_sched_group +257 kernel/sched/rt.c
256
> 257 void unregister_rt_sched_group(struct task_group *tg) { }
258
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week
drivers/firmware/efi/sysfb_efi.c:70:6: warning: no previous prototype for function 'efifb_setup_from_dmi'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ab774587903771821b59471cc723bba6d893942
commit: d391c58271072d0b0fad93c82018d495b2633448 drivers/firmware: move x86 Generic System Framebuffers support
date: 4 months ago
config: x86_64-randconfig-r005-20211116 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project fbe72e41b99dc7994daac300d208a955be3e4a0a)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout d391c58271072d0b0fad93c82018d495b2633448
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 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 warnings (new ones prefixed by >>):
>> drivers/firmware/efi/sysfb_efi.c:70:6: warning: no previous prototype for function 'efifb_setup_from_dmi' [-Wmissing-prototypes]
void efifb_setup_from_dmi(struct screen_info *si, const char *opt)
^
drivers/firmware/efi/sysfb_efi.c:70:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void efifb_setup_from_dmi(struct screen_info *si, const char *opt)
^
static
drivers/firmware/efi/sysfb_efi.c:270:1: warning: attribute declaration must precede definition [-Wignored-attributes]
__init void sysfb_apply_efi_quirks(void)
^
include/linux/init.h:50:17: note: expanded from macro '__init'
#define __init __section(".init.text") __cold __latent_entropy __noinitretpoline __nocfi
^
include/linux/compiler_attributes.h:263:56: note: expanded from macro '__section'
#define __section(section) __attribute__((__section__(section)))
^
include/linux/sysfb.h:65:20: note: previous definition is here
static inline void sysfb_apply_efi_quirks(void)
^
drivers/firmware/efi/sysfb_efi.c:270:1: warning: attribute declaration must precede definition [-Wignored-attributes]
__init void sysfb_apply_efi_quirks(void)
^
include/linux/init.h:50:41: note: expanded from macro '__init'
#define __init __section(".init.text") __cold __latent_entropy __noinitretpoline __nocfi
^
include/linux/compiler_attributes.h:92:56: note: expanded from macro '__cold'
#define __cold __attribute__((__cold__))
^
include/linux/sysfb.h:65:20: note: previous definition is here
static inline void sysfb_apply_efi_quirks(void)
^
drivers/firmware/efi/sysfb_efi.c:270:1: warning: attribute declaration must precede definition [-Wignored-attributes]
__init void sysfb_apply_efi_quirks(void)
^
include/linux/init.h:50:84: note: expanded from macro '__init'
#define __init __section(".init.text") __cold __latent_entropy __noinitretpoline __nocfi
^
include/linux/compiler-clang.h:65:33: note: expanded from macro '__nocfi'
#define __nocfi __attribute__((__no_sanitize__("cfi")))
^
include/linux/sysfb.h:65:20: note: previous definition is here
static inline void sysfb_apply_efi_quirks(void)
^
drivers/firmware/efi/sysfb_efi.c:270:13: error: redefinition of 'sysfb_apply_efi_quirks'
__init void sysfb_apply_efi_quirks(void)
^
include/linux/sysfb.h:65:20: note: previous definition is here
static inline void sysfb_apply_efi_quirks(void)
^
4 warnings and 1 error generated.
vim +/efifb_setup_from_dmi +70 drivers/firmware/efi/sysfb_efi.c
2995e506276bfd arch/x86/kernel/sysfb_efi.c David Herrmann 2013-08-02 69
21289ec02b41c4 arch/x86/kernel/sysfb_efi.c Ard Biesheuvel 2016-04-25 @70 void efifb_setup_from_dmi(struct screen_info *si, const char *opt)
21289ec02b41c4 arch/x86/kernel/sysfb_efi.c Ard Biesheuvel 2016-04-25 71 {
21289ec02b41c4 arch/x86/kernel/sysfb_efi.c Ard Biesheuvel 2016-04-25 72 int i;
21289ec02b41c4 arch/x86/kernel/sysfb_efi.c Ard Biesheuvel 2016-04-25 73
21289ec02b41c4 arch/x86/kernel/sysfb_efi.c Ard Biesheuvel 2016-04-25 74 for (i = 0; i < M_UNKNOWN; i++) {
21289ec02b41c4 arch/x86/kernel/sysfb_efi.c Ard Biesheuvel 2016-04-25 75 if (efifb_dmi_list[i].base != 0 &&
21289ec02b41c4 arch/x86/kernel/sysfb_efi.c Ard Biesheuvel 2016-04-25 76 !strcmp(opt, efifb_dmi_list[i].optname)) {
21289ec02b41c4 arch/x86/kernel/sysfb_efi.c Ard Biesheuvel 2016-04-25 77 si->lfb_base = efifb_dmi_list[i].base;
21289ec02b41c4 arch/x86/kernel/sysfb_efi.c Ard Biesheuvel 2016-04-25 78 si->lfb_linelength = efifb_dmi_list[i].stride;
21289ec02b41c4 arch/x86/kernel/sysfb_efi.c Ard Biesheuvel 2016-04-25 79 si->lfb_width = efifb_dmi_list[i].width;
21289ec02b41c4 arch/x86/kernel/sysfb_efi.c Ard Biesheuvel 2016-04-25 80 si->lfb_height = efifb_dmi_list[i].height;
21289ec02b41c4 arch/x86/kernel/sysfb_efi.c Ard Biesheuvel 2016-04-25 81 }
21289ec02b41c4 arch/x86/kernel/sysfb_efi.c Ard Biesheuvel 2016-04-25 82 }
21289ec02b41c4 arch/x86/kernel/sysfb_efi.c Ard Biesheuvel 2016-04-25 83 }
21289ec02b41c4 arch/x86/kernel/sysfb_efi.c Ard Biesheuvel 2016-04-25 84
:::::: The code at line 70 was first introduced by commit
:::::: 21289ec02b41c4b928a0b3de1778b325d714eea3 x86/efi/efifb: Move DMI based quirks handling out of generic code
:::::: TO: Ard Biesheuvel <ard.biesheuvel(a)linaro.org>
:::::: CC: Ingo Molnar <mingo(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months, 1 week