[android-common:android12-5.4 4/9] drivers/dma-buf/heaps/page_pool.c:236:17: sparse: sparse: symbol 'pool_shrinker' was not declared. Should it be static?
by kernel test robot
Hi John,
First bad commit (maybe != root cause):
tree: https://android.googlesource.com/kernel/common android12-5.4
head: 82c67a98c7494b4e71dcbea03335509e9ccecfa5
commit: 44008f99d9ca0793e2562967e1da01fa74ee4a41 [4/9] ANDROID: dma-buf: system_heap: Add pagepool support to system heap
config: x86_64-rhel-8.3-kselftests (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
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-5.4
git checkout 44008f99d9ca0793e2562967e1da01fa74ee4a41
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/dma-buf/heaps/ tools/virtio/vhost_test/vhost_test.ko
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/dma-buf/heaps/page_pool.c:236:17: sparse: sparse: symbol 'pool_shrinker' was not declared. Should it be static?
drivers/dma-buf/heaps/page_pool.c:243:5: sparse: sparse: symbol 'dmabuf_page_pool_init_shrinker' was not declared. Should it be static?
vim +/pool_shrinker +236 drivers/dma-buf/heaps/page_pool.c
bd4db96bfc247a John Stultz 2020-10-02 235
bd4db96bfc247a John Stultz 2020-10-02 @236 struct shrinker pool_shrinker = {
bd4db96bfc247a John Stultz 2020-10-02 237 .count_objects = dmabuf_page_pool_shrink_count,
bd4db96bfc247a John Stultz 2020-10-02 238 .scan_objects = dmabuf_page_pool_shrink_scan,
bd4db96bfc247a John Stultz 2020-10-02 239 .seeks = DEFAULT_SEEKS,
bd4db96bfc247a John Stultz 2020-10-02 240 .batch = 0,
bd4db96bfc247a John Stultz 2020-10-02 241 };
bd4db96bfc247a John Stultz 2020-10-02 242
:::::: The code at line 236 was first introduced by commit
:::::: bd4db96bfc247afdaf7a4cfde85fd8147522f3e6 ANDROID: dma-buf: heaps: Add a shrinker controlled page pool
:::::: TO: John Stultz <john.stultz(a)linaro.org>
:::::: CC: John Stultz <john.stultz(a)linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[ardb:arm32-ti-in-task-v4 4/4] arch/arm/include/asm/switch_to.h:37:56: warning: passing argument 1 of 'task_thread_info' discards 'const' qualifier from pointer target type
by kernel test robot
tree: git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git arm32-ti-in-task-v4
head: 93cf46e56e4b898a98c156e5e0eb3233b4beea59
commit: 93cf46e56e4b898a98c156e5e0eb3233b4beea59 [4/4] ARM: enable THREAD_INFO_IN_TASK
config: arm-shmobile_defconfig (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/ardb/linux.git/commit/?id...
git remote add ardb git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git
git fetch --no-tags ardb arm32-ti-in-task-v4
git checkout 93cf46e56e4b898a98c156e5e0eb3233b4beea59
# 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 >>):
In file included from kernel/sched/core.c:20:
arch/arm/include/asm/switch_to.h: In function '__update_ti_cpu':
>> arch/arm/include/asm/switch_to.h:37:56: warning: passing argument 1 of 'task_thread_info' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
37 | task_thread_info(next)->cpu = task_thread_info(prev)->cpu;
| ^~~~
In file included from include/linux/kthread.h:6,
from include/trace/events/sched.h:8,
from kernel/sched/core.c:10:
include/linux/sched.h:1888:72: note: expected 'struct task_struct *' but argument is of type 'const struct task_struct *'
1888 | static inline struct thread_info *task_thread_info(struct task_struct *task)
| ~~~~~~~~~~~~~~~~~~~~^~~~
kernel/sched/core.c: At top level:
kernel/sched/core.c:3416:6: warning: no previous prototype for 'sched_set_stop_task' [-Wmissing-prototypes]
3416 | void sched_set_stop_task(int cpu, struct task_struct *stop)
| ^~~~~~~~~~~~~~~~~~~
vim +37 arch/arm/include/asm/switch_to.h
25
26 static inline void __update_ti_cpu(const struct task_struct *prev, struct task_struct *next)
27 {
28 if (!IS_ENABLED(CONFIG_THREAD_INFO_IN_TASK))
29 return;
30
31 /*
32 * The core code no longer maintains the thread_info::cpu field once
33 * CONFIG_THREAD_INFO_IN_TASK is in effect, but we rely on it for
34 * raw_smp_processor_id(), which cannot access struct task_struct*
35 * directly for reasons of circular #inclusion hell.
36 */
> 37 task_thread_info(next)->cpu = task_thread_info(prev)->cpu;
38 }
39
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[ardb:arm32-ti-in-task 4/7] include/linux/percpu-defs.h:240:1: error: braced-group within expression allowed only inside a function
by kernel test robot
tree: git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git arm32-ti-in-task
head: 1a3074da6972ec4df258a8503ef5541362b0d0d1
commit: 59803622c2c2614e91a19cf9a00a2d96095c2132 [4/7] ARM: smp: use a per-CPU variable to record the CPU number
config: arm-allyesconfig (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/ardb/linux.git/commit/?id...
git remote add ardb git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git
git fetch --no-tags ardb arm32-ti-in-task
git checkout 59803622c2c2614e91a19cf9a00a2d96095c2132
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/asm-generic/percpu.h:7,
from arch/arm/include/asm/percpu.h:41,
from include/linux/irqflags.h:17,
from arch/arm/include/asm/bitops.h:28,
from include/linux/bitops.h:33,
from include/linux/kernel.h:12,
from arch/arm/common/mcpm_entry.c:10:
>> include/linux/percpu-defs.h:240:1: error: braced-group within expression allowed only inside a function
240 | ({ \
| ^
arch/arm/include/asm/smp.h:21:34: note: in expansion of macro 'raw_cpu_ptr'
21 | #define raw_smp_processor_id() (*raw_cpu_ptr(&cpu_number))
| ^~~~~~~~~~~
include/linux/smp.h:258:31: note: in expansion of macro 'raw_smp_processor_id'
258 | #define __smp_processor_id(x) raw_smp_processor_id(x)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/smp.h:265:29: note: in expansion of macro '__smp_processor_id'
265 | # define smp_processor_id() __smp_processor_id()
| ^~~~~~~~~~~~~~~~~~
arch/arm/include/asm/proc-fns.h:114:52: note: in expansion of macro 'smp_processor_id'
114 | #define PROC_VTABLE(f) cpu_vtable[smp_processor_id()]->f
| ^~~~~~~~~~~~~~~~
arch/arm/include/asm/proc-fns.h:137:41: note: in expansion of macro 'PROC_VTABLE'
137 | #define cpu_reset PROC_VTABLE(reset)
| ^~~~~~~~~~~
arch/arm/common/mcpm_entry.c:237:16: note: in expansion of macro 'cpu_reset'
237 | typedef typeof(cpu_reset) phys_reset_t;
| ^~~~~~~~~
arch/arm/common/mcpm_entry.c: In function 'mcpm_cpu_power_down':
>> arch/arm/common/mcpm_entry.c:302:9: error: called object 'phys_reset' is not a function or function pointer
302 | phys_reset(__pa_symbol(mcpm_entry_point), false);
| ^~~~~~~~~~
arch/arm/common/mcpm_entry.c:243:22: note: declared here
243 | phys_reset_t phys_reset;
| ^~~~~~~~~~
arch/arm/common/mcpm_entry.c: In function 'nocache_trampoline':
arch/arm/common/mcpm_entry.c:391:9: error: called object 'phys_reset' is not a function or function pointer
391 | phys_reset(__pa_symbol(mcpm_entry_point), false);
| ^~~~~~~~~~
arch/arm/common/mcpm_entry.c:379:22: note: declared here
379 | phys_reset_t phys_reset;
| ^~~~~~~~~~
--
In file included from include/asm-generic/percpu.h:7,
from arch/arm/include/asm/percpu.h:41,
from include/linux/irqflags.h:17,
from arch/arm/include/asm/bitops.h:28,
from include/linux/bitops.h:33,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/preempt.h:11,
from include/linux/spinlock.h:55,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/mm.h:10,
from arch/arm/include/asm/cacheflush.h:10,
from arch/arm/include/asm/mcpm.h:30,
from arch/arm/include/asm/arm-cci.h:12,
from include/linux/arm-cci.h:14,
from arch/arm/mach-sunxi/mc_smp.c:14:
>> include/linux/percpu-defs.h:240:1: error: braced-group within expression allowed only inside a function
240 | ({ \
| ^
arch/arm/include/asm/smp.h:21:34: note: in expansion of macro 'raw_cpu_ptr'
21 | #define raw_smp_processor_id() (*raw_cpu_ptr(&cpu_number))
| ^~~~~~~~~~~
include/linux/smp.h:258:31: note: in expansion of macro 'raw_smp_processor_id'
258 | #define __smp_processor_id(x) raw_smp_processor_id(x)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/smp.h:265:29: note: in expansion of macro '__smp_processor_id'
265 | # define smp_processor_id() __smp_processor_id()
| ^~~~~~~~~~~~~~~~~~
arch/arm/include/asm/proc-fns.h:114:52: note: in expansion of macro 'smp_processor_id'
114 | #define PROC_VTABLE(f) cpu_vtable[smp_processor_id()]->f
| ^~~~~~~~~~~~~~~~
arch/arm/include/asm/proc-fns.h:137:41: note: in expansion of macro 'PROC_VTABLE'
137 | #define cpu_reset PROC_VTABLE(reset)
| ^~~~~~~~~~~
arch/arm/mach-sunxi/mc_smp.c:650:16: note: in expansion of macro 'cpu_reset'
650 | typedef typeof(cpu_reset) phys_reset_t;
| ^~~~~~~~~
arch/arm/mach-sunxi/mc_smp.c: In function 'nocache_trampoline':
>> arch/arm/mach-sunxi/mc_smp.c:660:9: error: called object 'phys_reset' is not a function or function pointer
660 | phys_reset(__pa_symbol(sunxi_mc_smp_resume), false);
| ^~~~~~~~~~
arch/arm/mach-sunxi/mc_smp.c:654:22: note: declared here
654 | phys_reset_t phys_reset;
| ^~~~~~~~~~
vim +240 include/linux/percpu-defs.h
62fde54123fb64 Tejun Heo 2014-06-17 238
6fbc07bbe2b5a8 Tejun Heo 2014-06-17 239 #define raw_cpu_ptr(ptr) \
6fbc07bbe2b5a8 Tejun Heo 2014-06-17 @240 ({ \
6fbc07bbe2b5a8 Tejun Heo 2014-06-17 241 __verify_pcpu_ptr(ptr); \
6fbc07bbe2b5a8 Tejun Heo 2014-06-17 242 arch_raw_cpu_ptr(ptr); \
6fbc07bbe2b5a8 Tejun Heo 2014-06-17 243 })
62fde54123fb64 Tejun Heo 2014-06-17 244
:::::: The code at line 240 was first introduced by commit
:::::: 6fbc07bbe2b5a898532f970c5a397f8789ace0d5 percpu: invoke __verify_pcpu_ptr() from the generic part of accessors and operations
:::::: TO: Tejun Heo <tj(a)kernel.org>
:::::: CC: Tejun Heo <tj(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
Re: [PATCH v3 2/2] scsi: ufs: Add temperature notification exception handling
by kernel test robot
Hi Avri,
I love your patch! Yet something to improve:
[auto build test ERROR on mkp-scsi/for-next]
[also build test ERROR on scsi/for-next next-20210910]
[cannot apply to v5.14]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Avri-Altman/Add-temperature-noti...
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: x86_64-kexec (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/2aa54f753f44e119f4629ae015fedb3e1...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Avri-Altman/Add-temperature-notification-support/20210912-212110
git checkout 2aa54f753f44e119f4629ae015fedb3e12cebac6
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
ld: drivers/scsi/ufs/ufs-sysfs.o: in function `ufs_hwmon_notify_event':
>> drivers/scsi/ufs/ufshcd.h:1070: multiple definition of `ufs_hwmon_notify_event'; drivers/scsi/ufs/ufshcd.o:drivers/scsi/ufs/ufshcd.h:1070: first defined here
ld: drivers/scsi/ufs/ufs-debugfs.o: in function `ufs_hwmon_notify_event':
>> drivers/scsi/ufs/ufshcd.h:1070: multiple definition of `ufs_hwmon_notify_event'; drivers/scsi/ufs/ufshcd.o:drivers/scsi/ufs/ufshcd.h:1070: first defined here
vim +1070 drivers/scsi/ufs/ufshcd.h
1062
1063 #ifdef CONFIG_SCSI_UFS_HWMON
1064 void ufs_hwmon_probe(struct ufs_hba *hba, u8 mask);
1065 void ufs_hwmon_remove(struct ufs_hba *hba);
1066 void ufs_hwmon_notify_event(struct ufs_hba *hba, u8 ee_mask);
1067 #else
1068 static inline void ufs_hwmon_probe(struct ufs_hba *hba, u8 mask) {}
1069 static inline void ufs_hwmon_remove(struct ufs_hba *hba) {}
> 1070 void ufs_hwmon_notify_event(struct ufs_hba *hba, u8 ee_mask) {}
1071 #endif
1072
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
Re: [PATCH v3 2/2] scsi: ufs: Add temperature notification exception handling
by kernel test robot
Hi Avri,
I love your patch! Yet something to improve:
[auto build test ERROR on mkp-scsi/for-next]
[also build test ERROR on scsi/for-next next-20210910]
[cannot apply to v5.14]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Avri-Altman/Add-temperature-noti...
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: x86_64-randconfig-a001-20210912 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 261cbe98c38f8c1ee1a482fe76511110e790f58a)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/2aa54f753f44e119f4629ae015fedb3e1...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Avri-Altman/Add-temperature-notification-support/20210912-212110
git checkout 2aa54f753f44e119f4629ae015fedb3e12cebac6
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/scsi/
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 >>):
In file included from drivers/scsi/ufs/ufshcd.c:22:
>> drivers/scsi/ufs/ufshcd.h:1070:6: warning: no previous prototype for function 'ufs_hwmon_notify_event' [-Wmissing-prototypes]
void ufs_hwmon_notify_event(struct ufs_hba *hba, u8 ee_mask) {}
^
drivers/scsi/ufs/ufshcd.h:1070:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void ufs_hwmon_notify_event(struct ufs_hba *hba, u8 ee_mask) {}
^
static
1 warning generated.
--
>> ld.lld: error: duplicate symbol: ufs_hwmon_notify_event
>>> defined at ufshcd.h:1070 (drivers/scsi/ufs/ufshcd.h:1070)
>>> drivers/scsi/ufs/ufshcd.o:(ufs_hwmon_notify_event)
>>> defined at ufshcd.h:1070 (drivers/scsi/ufs/ufshcd.h:1070)
>>> drivers/scsi/ufs/ufs-sysfs.o:(.text+0x0)
--
>> ld.lld: error: duplicate symbol: ufs_hwmon_notify_event
>>> defined at ufshcd.h:1070 (drivers/scsi/ufs/ufshcd.h:1070)
>>> drivers/scsi/ufs/ufshcd.o:(ufs_hwmon_notify_event)
>>> defined at ufshcd.h:1070 (drivers/scsi/ufs/ufshcd.h:1070)
>>> drivers/scsi/ufs/ufs-debugfs.o:(.text+0x0)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
Re: [RFC PATCH net 2/5] net: dsa: be compatible with masters which unregister on shutdown
by kernel test robot
Hi Vladimir,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on net/master]
url: https://github.com/0day-ci/linux/commits/Vladimir-Oltean/Make-DSA-switch-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git f11ee2ad25b22c2ee587045dd6999434375532f7
config: x86_64-randconfig-a004-20210912 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 261cbe98c38f8c1ee1a482fe76511110e790f58a)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/535bb691a9ce71ade9ad1ce5a5fdae8c2...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Vladimir-Oltean/Make-DSA-switch-drivers-compatible-with-masters-which-unregister-on-shutdown/20210912-201056
git checkout 535bb691a9ce71ade9ad1ce5a5fdae8c2fd46e27
# 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 >>):
>> drivers/net/dsa/b53/b53_mmap.c:332:1: error: non-void function does not return a value [-Werror,-Wreturn-type]
}
^
>> drivers/net/dsa/b53/b53_mmap.c:346:14: error: incompatible function pointer types initializing 'void (*)(struct platform_device *)' with an expression of type 'int (struct platform_device *)' [-Werror,-Wincompatible-function-pointer-types]
.shutdown = b53_mmap_shutdown,
^~~~~~~~~~~~~~~~~
2 errors generated.
vim +332 drivers/net/dsa/b53/b53_mmap.c
323
324 static int b53_mmap_shutdown(struct platform_device *pdev)
325 {
326 struct b53_device *dev = platform_get_drvdata(pdev);
327
328 if (dev)
329 b53_switch_shutdown(dev);
330
331 platform_set_drvdata(pdev, NULL);
> 332 }
333
334 static const struct of_device_id b53_mmap_of_table[] = {
335 { .compatible = "brcm,bcm3384-switch" },
336 { .compatible = "brcm,bcm6328-switch" },
337 { .compatible = "brcm,bcm6368-switch" },
338 { .compatible = "brcm,bcm63xx-switch" },
339 { /* sentinel */ },
340 };
341 MODULE_DEVICE_TABLE(of, b53_mmap_of_table);
342
343 static struct platform_driver b53_mmap_driver = {
344 .probe = b53_mmap_probe,
345 .remove = b53_mmap_remove,
> 346 .shutdown = b53_mmap_shutdown,
347 .driver = {
348 .name = "b53-switch",
349 .of_match_table = b53_mmap_of_table,
350 },
351 };
352
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
Re: [RFC PATCH net 2/5] net: dsa: be compatible with masters which unregister on shutdown
by kernel test robot
Hi Vladimir,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on net/master]
url: https://github.com/0day-ci/linux/commits/Vladimir-Oltean/Make-DSA-switch-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git f11ee2ad25b22c2ee587045dd6999434375532f7
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/535bb691a9ce71ade9ad1ce5a5fdae8c2...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Vladimir-Oltean/Make-DSA-switch-drivers-compatible-with-masters-which-unregister-on-shutdown/20210912-201056
git checkout 535bb691a9ce71ade9ad1ce5a5fdae8c2fd46e27
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.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 >>):
drivers/net/dsa/b53/b53_mmap.c: In function 'b53_mmap_shutdown':
drivers/net/dsa/b53/b53_mmap.c:332:1: error: no return statement in function returning non-void [-Werror=return-type]
332 | }
| ^
drivers/net/dsa/b53/b53_mmap.c: At top level:
>> drivers/net/dsa/b53/b53_mmap.c:346:21: error: initialization of 'void (*)(struct platform_device *)' from incompatible pointer type 'int (*)(struct platform_device *)' [-Werror=incompatible-pointer-types]
346 | .shutdown = b53_mmap_shutdown,
| ^~~~~~~~~~~~~~~~~
drivers/net/dsa/b53/b53_mmap.c:346:21: note: (near initialization for 'b53_mmap_driver.shutdown')
cc1: all warnings being treated as errors
vim +346 drivers/net/dsa/b53/b53_mmap.c
342
343 static struct platform_driver b53_mmap_driver = {
344 .probe = b53_mmap_probe,
345 .remove = b53_mmap_remove,
> 346 .shutdown = b53_mmap_shutdown,
347 .driver = {
348 .name = "b53-switch",
349 .of_match_table = b53_mmap_of_table,
350 },
351 };
352
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
Re: [PATCH v3 2/2] scsi: ufs: Add temperature notification exception handling
by kernel test robot
Hi Avri,
I love your patch! Yet something to improve:
[auto build test ERROR on mkp-scsi/for-next]
[also build test ERROR on scsi/for-next next-20210910]
[cannot apply to target/for-next v5.14]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Avri-Altman/Add-temperature-noti...
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: riscv-randconfig-r042-20210912 (attached as .config)
compiler: riscv64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/2aa54f753f44e119f4629ae015fedb3e1...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Avri-Altman/Add-temperature-notification-support/20210912-212110
git checkout 2aa54f753f44e119f4629ae015fedb3e12cebac6
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=riscv SHELL=/bin/bash
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 >>):
In file included from drivers/scsi/ufs/ufs-debugfs.c:7:
>> drivers/scsi/ufs/ufshcd.h:1070:6: warning: no previous prototype for 'ufs_hwmon_notify_event' [-Wmissing-prototypes]
1070 | void ufs_hwmon_notify_event(struct ufs_hba *hba, u8 ee_mask) {}
| ^~~~~~~~~~~~~~~~~~~~~~
--
riscv64-linux-ld: drivers/scsi/ufs/ufs-sysfs.o: in function `ufs_hwmon_notify_event':
>> ufs-sysfs.c:(.text+0xca00): multiple definition of `ufs_hwmon_notify_event'; drivers/scsi/ufs/ufshcd.o:ufshcd.c:(.text+0xb8c0): first defined here
riscv64-linux-ld: drivers/scsi/ufs/ufs-debugfs.o: in function `ufs_hwmon_notify_event':
ufs-debugfs.c:(.text+0x440): multiple definition of `ufs_hwmon_notify_event'; drivers/scsi/ufs/ufshcd.o:ufshcd.c:(.text+0xb8c0): first defined here
riscv64-linux-ld: drivers/scsi/ufs/ufshcd-crypto.o: in function `ufs_hwmon_notify_event':
ufshcd-crypto.c:(.text+0x580): multiple definition of `ufs_hwmon_notify_event'; drivers/scsi/ufs/ufshcd.o:ufshcd.c:(.text+0xb8c0): first defined here
riscv64-linux-ld: drivers/scsi/ufs/ufshpb.o: in function `ufs_hwmon_notify_event':
ufshpb.c:(.text+0x5240): multiple definition of `ufs_hwmon_notify_event'; drivers/scsi/ufs/ufshcd.o:ufshcd.c:(.text+0xb8c0): first defined here
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
Re: [PATCH v3 1/2] hwmon: (nct6775) Use sio_data in superio_*().
by kernel test robot
Hi Denis,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on hwmon/hwmon-next]
[also build test ERROR on v5.14 next-20210910]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Denis-Pauk/hwmon-nct6775-Support...
base: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
config: arm-randconfig-s032-20210912 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/0day-ci/linux/commit/f11f2179ea7eb747b68a65ac03fce15ff...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Denis-Pauk/hwmon-nct6775-Support-access-via-Asus-WMI/20210912-190749
git checkout f11f2179ea7eb747b68a65ac03fce15ff4319004
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm SHELL=/bin/bash drivers/hwmon/
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 >>):
drivers/hwmon/nct6775.c: In function 'clear_caseopen':
>> drivers/hwmon/nct6775.c:3452:70: error: macro "inb" passed 2 arguments, but takes just 1
3452 | reg = sio_data->inb(sio_data, NCT6775_REG_CR_CASEOPEN_CLR[nr]);
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:258: note: macro "inb" defined here
258 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __iormb(); __v; })
|
>> drivers/hwmon/nct6775.c:3452:13: warning: assignment to 'u8' {aka 'unsigned char'} from 'int (*)(struct nct6775_sio_data *, int)' makes integer from pointer without a cast [-Wint-conversion]
3452 | reg = sio_data->inb(sio_data, NCT6775_REG_CR_CASEOPEN_CLR[nr]);
| ^
>> drivers/hwmon/nct6775.c:3454:70: error: macro "outb" passed 3 arguments, but takes just 2
3454 | sio_data->outb(sio_data, NCT6775_REG_CR_CASEOPEN_CLR[nr], reg);
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:252: note: macro "outb" defined here
252 | #define outb(v,p) ({ __iowmb(); __raw_writeb(v,__io(p)); })
|
drivers/hwmon/nct6775.c:3454:17: warning: statement with no effect [-Wunused-value]
3454 | sio_data->outb(sio_data, NCT6775_REG_CR_CASEOPEN_CLR[nr], reg);
| ~~~~~~~~^~~~~~
drivers/hwmon/nct6775.c:3456:70: error: macro "outb" passed 3 arguments, but takes just 2
3456 | sio_data->outb(sio_data, NCT6775_REG_CR_CASEOPEN_CLR[nr], reg);
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:252: note: macro "outb" defined here
252 | #define outb(v,p) ({ __iowmb(); __raw_writeb(v,__io(p)); })
|
drivers/hwmon/nct6775.c:3456:17: warning: statement with no effect [-Wunused-value]
3456 | sio_data->outb(sio_data, NCT6775_REG_CR_CASEOPEN_CLR[nr], reg);
| ~~~~~~~~^~~~~~
drivers/hwmon/nct6775.c: In function 'nct6775_check_fan_inputs':
drivers/hwmon/nct6775.c:3572:70: error: macro "inb" passed 2 arguments, but takes just 1
3572 | data->sio_reg_enable = sio_data->inb(sio_data, SIO_REG_ENABLE);
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:258: note: macro "inb" defined here
258 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __iormb(); __v; })
|
drivers/hwmon/nct6775.c:3572:30: warning: assignment to 'u8' {aka 'unsigned char'} from 'int (*)(struct nct6775_sio_data *, int)' makes integer from pointer without a cast [-Wint-conversion]
3572 | data->sio_reg_enable = sio_data->inb(sio_data, SIO_REG_ENABLE);
| ^
drivers/hwmon/nct6775.c:3576:56: error: macro "inb" passed 2 arguments, but takes just 1
3576 | int cr2c = sio_data->inb(sio_data, 0x2c);
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:258: note: macro "inb" defined here
258 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __iormb(); __v; })
|
>> drivers/hwmon/nct6775.c:3576:28: warning: initialization of 'int' from 'int (*)(struct nct6775_sio_data *, int)' makes integer from pointer without a cast [-Wint-conversion]
3576 | int cr2c = sio_data->inb(sio_data, 0x2c);
| ^~~~~~~~
drivers/hwmon/nct6775.c:3582:57: error: macro "inb" passed 2 arguments, but takes just 1
3582 | fan4pin = !(sio_data->inb(sio_data, 0x2A) & 0x80);
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:258: note: macro "inb" defined here
258 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __iormb(); __v; })
|
>> drivers/hwmon/nct6775.c:3582:59: error: invalid operands to binary & (have 'int (*)(struct nct6775_sio_data *, int)' and 'int')
3582 | fan4pin = !(sio_data->inb(sio_data, 0x2A) & 0x80);
| ~~~~~~~~~~~~~ ^
| |
| int (*)(struct nct6775_sio_data *, int)
drivers/hwmon/nct6775.c:3584:57: error: macro "inb" passed 2 arguments, but takes just 1
3584 | bool gpok = sio_data->inb(sio_data, 0x27) & 0x80;
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:258: note: macro "inb" defined here
258 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __iormb(); __v; })
|
drivers/hwmon/nct6775.c:3584:59: error: invalid operands to binary & (have 'int (*)(struct nct6775_sio_data *, int)' and 'int')
3584 | bool gpok = sio_data->inb(sio_data, 0x27) & 0x80;
| ~~~~~~~~~~~~~ ^
| |
| int (*)(struct nct6775_sio_data *, int)
drivers/hwmon/nct6775.c:3601:74: error: macro "outb" passed 3 arguments, but takes just 2
3601 | data->sio_reg_enable);
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:252: note: macro "outb" defined here
252 | #define outb(v,p) ({ __iowmb(); __raw_writeb(v,__io(p)); })
|
drivers/hwmon/nct6775.c:3600:49: warning: statement with no effect [-Wunused-value]
3600 | sio_data->outb(sio_data, SIO_REG_ENABLE,
| ~~~~~~~~^~~~~~
drivers/hwmon/nct6775.c:3609:65: error: macro "inb" passed 2 arguments, but takes just 1
3609 | fan3pin = !(sio_data->inb(sio_data, 0x24) & 0x40);
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:258: note: macro "inb" defined here
258 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __iormb(); __v; })
|
drivers/hwmon/nct6775.c:3609:67: error: invalid operands to binary & (have 'int (*)(struct nct6775_sio_data *, int)' and 'int')
3609 | fan3pin = !(sio_data->inb(sio_data, 0x24) & 0x40);
| ~~~~~~~~~~~~~ ^
| |
| int (*)(struct nct6775_sio_data *, int)
drivers/hwmon/nct6775.c:3614:63: error: macro "inb" passed 2 arguments, but takes just 1
3614 | fan4pin = sio_data->inb(sio_data, 0x1C) & 0x01;
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:258: note: macro "inb" defined here
258 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __iormb(); __v; })
|
drivers/hwmon/nct6775.c:3614:65: error: invalid operands to binary & (have 'int (*)(struct nct6775_sio_data *, int)' and 'int')
3614 | fan4pin = sio_data->inb(sio_data, 0x1C) & 0x01;
| ~~~~~~~~~~~~~ ^
| |
| int (*)(struct nct6775_sio_data *, int)
drivers/hwmon/nct6775.c:3619:63: error: macro "inb" passed 2 arguments, but takes just 1
3619 | fan5pin = sio_data->inb(sio_data, 0x1C) & 0x02;
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:258: note: macro "inb" defined here
258 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __iormb(); __v; })
|
drivers/hwmon/nct6775.c:3619:65: error: invalid operands to binary & (have 'int (*)(struct nct6775_sio_data *, int)' and 'int')
3619 | fan5pin = sio_data->inb(sio_data, 0x1C) & 0x02;
| ~~~~~~~~~~~~~ ^
| |
| int (*)(struct nct6775_sio_data *, int)
drivers/hwmon/nct6775.c:3624:56: error: macro "inb" passed 2 arguments, but takes just 1
3624 | int cr24 = sio_data->inb(sio_data, 0x24);
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:258: note: macro "inb" defined here
258 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __iormb(); __v; })
|
drivers/hwmon/nct6775.c:3624:28: warning: initialization of 'int' from 'int (*)(struct nct6775_sio_data *, int)' makes integer from pointer without a cast [-Wint-conversion]
3624 | int cr24 = sio_data->inb(sio_data, 0x24);
| ^~~~~~~~
drivers/hwmon/nct6775.c:3629:56: error: macro "inb" passed 2 arguments, but takes just 1
3629 | int cr1a = sio_data->inb(sio_data, 0x1a);
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:258: note: macro "inb" defined here
258 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __iormb(); __v; })
|
drivers/hwmon/nct6775.c:3629:28: warning: initialization of 'int' from 'int (*)(struct nct6775_sio_data *, int)' makes integer from pointer without a cast [-Wint-conversion]
3629 | int cr1a = sio_data->inb(sio_data, 0x1a);
| ^~~~~~~~
drivers/hwmon/nct6775.c:3630:56: error: macro "inb" passed 2 arguments, but takes just 1
3630 | int cr1b = sio_data->inb(sio_data, 0x1b);
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:258: note: macro "inb" defined here
258 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __iormb(); __v; })
|
drivers/hwmon/nct6775.c:3630:28: warning: initialization of 'int' from 'int (*)(struct nct6775_sio_data *, int)' makes integer from pointer without a cast [-Wint-conversion]
3630 | int cr1b = sio_data->inb(sio_data, 0x1b);
| ^~~~~~~~
--
|
drivers/hwmon/nct6775.c:3634:28: warning: initialization of 'int' from 'int (*)(struct nct6775_sio_data *, int)' makes integer from pointer without a cast [-Wint-conversion]
3634 | int cr2f = sio_data->inb(sio_data, 0x2f);
| ^~~~~~~~
drivers/hwmon/nct6775.c:3650:56: error: macro "inb" passed 2 arguments, but takes just 1
3650 | int cr1a = sio_data->inb(sio_data, 0x1a);
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:258: note: macro "inb" defined here
258 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __iormb(); __v; })
|
drivers/hwmon/nct6775.c:3650:28: warning: initialization of 'int' from 'int (*)(struct nct6775_sio_data *, int)' makes integer from pointer without a cast [-Wint-conversion]
3650 | int cr1a = sio_data->inb(sio_data, 0x1a);
| ^~~~~~~~
drivers/hwmon/nct6775.c:3651:56: error: macro "inb" passed 2 arguments, but takes just 1
3651 | int cr1b = sio_data->inb(sio_data, 0x1b);
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:258: note: macro "inb" defined here
258 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __iormb(); __v; })
|
drivers/hwmon/nct6775.c:3651:28: warning: initialization of 'int' from 'int (*)(struct nct6775_sio_data *, int)' makes integer from pointer without a cast [-Wint-conversion]
3651 | int cr1b = sio_data->inb(sio_data, 0x1b);
| ^~~~~~~~
drivers/hwmon/nct6775.c:3652:56: error: macro "inb" passed 2 arguments, but takes just 1
3652 | int cr1c = sio_data->inb(sio_data, 0x1c);
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:258: note: macro "inb" defined here
258 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __iormb(); __v; })
|
drivers/hwmon/nct6775.c:3652:28: warning: initialization of 'int' from 'int (*)(struct nct6775_sio_data *, int)' makes integer from pointer without a cast [-Wint-conversion]
3652 | int cr1c = sio_data->inb(sio_data, 0x1c);
| ^~~~~~~~
drivers/hwmon/nct6775.c:3653:56: error: macro "inb" passed 2 arguments, but takes just 1
3653 | int cr1d = sio_data->inb(sio_data, 0x1d);
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:258: note: macro "inb" defined here
258 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __iormb(); __v; })
|
drivers/hwmon/nct6775.c:3653:28: warning: initialization of 'int' from 'int (*)(struct nct6775_sio_data *, int)' makes integer from pointer without a cast [-Wint-conversion]
3653 | int cr1d = sio_data->inb(sio_data, 0x1d);
| ^~~~~~~~
drivers/hwmon/nct6775.c:3654:56: error: macro "inb" passed 2 arguments, but takes just 1
3654 | int cr2a = sio_data->inb(sio_data, 0x2a);
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:258: note: macro "inb" defined here
258 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __iormb(); __v; })
|
drivers/hwmon/nct6775.c:3654:28: warning: initialization of 'int' from 'int (*)(struct nct6775_sio_data *, int)' makes integer from pointer without a cast [-Wint-conversion]
3654 | int cr2a = sio_data->inb(sio_data, 0x2a);
| ^~~~~~~~
drivers/hwmon/nct6775.c:3655:56: error: macro "inb" passed 2 arguments, but takes just 1
3655 | int cr2b = sio_data->inb(sio_data, 0x2b);
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:258: note: macro "inb" defined here
258 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __iormb(); __v; })
|
drivers/hwmon/nct6775.c:3655:28: warning: initialization of 'int' from 'int (*)(struct nct6775_sio_data *, int)' makes integer from pointer without a cast [-Wint-conversion]
3655 | int cr2b = sio_data->inb(sio_data, 0x2b);
| ^~~~~~~~
drivers/hwmon/nct6775.c:3656:56: error: macro "inb" passed 2 arguments, but takes just 1
3656 | int cr2d = sio_data->inb(sio_data, 0x2d);
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:258: note: macro "inb" defined here
258 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __iormb(); __v; })
|
drivers/hwmon/nct6775.c:3656:28: warning: initialization of 'int' from 'int (*)(struct nct6775_sio_data *, int)' makes integer from pointer without a cast [-Wint-conversion]
3656 | int cr2d = sio_data->inb(sio_data, 0x2d);
| ^~~~~~~~
drivers/hwmon/nct6775.c:3657:56: error: macro "inb" passed 2 arguments, but takes just 1
3657 | int cr2f = sio_data->inb(sio_data, 0x2f);
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:258: note: macro "inb" defined here
258 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __iormb(); __v; })
|
drivers/hwmon/nct6775.c:3657:28: warning: initialization of 'int' from 'int (*)(struct nct6775_sio_data *, int)' makes integer from pointer without a cast [-Wint-conversion]
3657 | int cr2f = sio_data->inb(sio_data, 0x2f);
| ^~~~~~~~
drivers/hwmon/nct6775.c:3665:52: error: macro "inb" passed 2 arguments, but takes just 1
3665 | cre0 = sio_data->inb(sio_data, 0xe0);
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:258: note: macro "inb" defined here
258 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __iormb(); __v; })
|
>> drivers/hwmon/nct6775.c:3665:22: warning: assignment to 'int' from 'int (*)(struct nct6775_sio_data *, int)' makes integer from pointer without a cast [-Wint-conversion]
3665 | cre0 = sio_data->inb(sio_data, 0xe0);
| ^
drivers/hwmon/nct6775.c:3666:52: error: macro "inb" passed 2 arguments, but takes just 1
3666 | creb = sio_data->inb(sio_data, 0xeb);
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:258: note: macro "inb" defined here
258 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __iormb(); __v; })
|
drivers/hwmon/nct6775.c:3666:22: warning: assignment to 'int' from 'int (*)(struct nct6775_sio_data *, int)' makes integer from pointer without a cast [-Wint-conversion]
3666 | creb = sio_data->inb(sio_data, 0xeb);
| ^
drivers/hwmon/nct6775.c:3667:52: error: macro "inb" passed 2 arguments, but takes just 1
3667 | cred = sio_data->inb(sio_data, 0xed);
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:258: note: macro "inb" defined here
258 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __iormb(); __v; })
|
drivers/hwmon/nct6775.c:3667:22: warning: assignment to 'int' from 'int (*)(struct nct6775_sio_data *, int)' makes integer from pointer without a cast [-Wint-conversion]
3667 | cred = sio_data->inb(sio_data, 0xed);
| ^
drivers/hwmon/nct6775.c: In function 'nct6775_probe':
drivers/hwmon/nct6775.c:4531:44: error: macro "inb" passed 2 arguments, but takes just 1
4531 | cr2a = sio_data->inb(sio_data, 0x2a);
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:258: note: macro "inb" defined here
258 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __iormb(); __v; })
|
drivers/hwmon/nct6775.c:4531:14: warning: assignment to 'u8' {aka 'unsigned char'} from 'int (*)(struct nct6775_sio_data *, int)' makes integer from pointer without a cast [-Wint-conversion]
4531 | cr2a = sio_data->inb(sio_data, 0x2a);
| ^
drivers/hwmon/nct6775.c:4558:57: error: macro "inb" passed 2 arguments, but takes just 1
4558 | data->vid = sio_data->inb(sio_data, 0xe3);
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:258: note: macro "inb" defined here
258 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __iormb(); __v; })
|
drivers/hwmon/nct6775.c:4558:27: warning: assignment to 'u8' {aka 'unsigned char'} from 'int (*)(struct nct6775_sio_data *, int)' makes integer from pointer without a cast [-Wint-conversion]
4558 | data->vid = sio_data->inb(sio_data, 0xe3);
| ^
drivers/hwmon/nct6775.c:4567:64: error: macro "inb" passed 2 arguments, but takes just 1
4567 | NCT6775_REG_CR_FAN_DEBOUNCE);
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:258: note: macro "inb" defined here
258 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __iormb(); __v; })
|
drivers/hwmon/nct6775.c:4566:21: warning: assignment to 'u8' {aka 'unsigned char'} from 'int (*)(struct nct6775_sio_data *, int)' makes integer from pointer without a cast [-Wint-conversion]
4566 | tmp = sio_data->inb(sio_data,
| ^
drivers/hwmon/nct6775.c:4591:33: error: macro "outb" passed 3 arguments, but takes just 2
4591 | tmp);
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:252: note: macro "outb" defined here
252 | #define outb(v,p) ({ __iowmb(); __raw_writeb(v,__io(p)); })
|
drivers/hwmon/nct6775.c:4590:25: warning: statement with no effect [-Wunused-value]
4590 | sio_data->outb(sio_data, NCT6775_REG_CR_FAN_DEBOUNCE,
| ~~~~~~~~^~~~~~
drivers/hwmon/nct6775.c: In function 'nct6791_enable_io_mapping':
drivers/hwmon/nct6775.c:4642:74: error: macro "inb" passed 2 arguments, but takes just 1
4642 | val = sio_data->inb(sio_data, NCT6791_REG_HM_IO_SPACE_LOCK_ENABLE);
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:258: note: macro "inb" defined here
258 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __iormb(); __v; })
|
drivers/hwmon/nct6775.c:4642:13: warning: assignment to 'int' from 'int (*)(struct nct6775_sio_data *, int)' makes integer from pointer without a cast [-Wint-conversion]
4642 | val = sio_data->inb(sio_data, NCT6791_REG_HM_IO_SPACE_LOCK_ENABLE);
| ^
drivers/hwmon/nct6775.c:4646:43: error: macro "outb" passed 3 arguments, but takes just 2
4646 | val & ~0x10);
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:252: note: macro "outb" defined here
252 | #define outb(v,p) ({ __iowmb(); __raw_writeb(v,__io(p)); })
|
drivers/hwmon/nct6775.c:4645:25: warning: statement with no effect [-Wunused-value]
4645 | sio_data->outb(sio_data, NCT6791_REG_HM_IO_SPACE_LOCK_ENABLE,
| ~~~~~~~~^~~~~~
drivers/hwmon/nct6775.c: In function 'nct6775_resume':
drivers/hwmon/nct6775.c:4680:53: error: macro "inb" passed 2 arguments, but takes just 1
4680 | reg = sio_data->inb(sio_data, SIO_REG_ENABLE);
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:258: note: macro "inb" defined here
258 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __iormb(); __v; })
|
drivers/hwmon/nct6775.c:4680:13: warning: assignment to 'u8' {aka 'unsigned char'} from 'int (*)(struct nct6775_sio_data *, int)' makes integer from pointer without a cast [-Wint-conversion]
4680 | reg = sio_data->inb(sio_data, SIO_REG_ENABLE);
| ^
drivers/hwmon/nct6775.c:4682:78: error: macro "outb" passed 3 arguments, but takes just 2
4682 | sio_data->outb(sio_data, SIO_REG_ENABLE, data->sio_reg_enable);
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:252: note: macro "outb" defined here
252 | #define outb(v,p) ({ __iowmb(); __raw_writeb(v,__io(p)); })
|
drivers/hwmon/nct6775.c:4682:25: warning: statement with no effect [-Wunused-value]
4682 | sio_data->outb(sio_data, SIO_REG_ENABLE, data->sio_reg_enable);
| ~~~~~~~~^~~~~~
drivers/hwmon/nct6775.c: In function 'nct6775_find':
drivers/hwmon/nct6775.c:4759:53: error: macro "inb" passed 2 arguments, but takes just 1
4759 | val = (sio_data->inb(sio_data, SIO_REG_DEVID) << 8) |
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:258: note: macro "inb" defined here
258 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __iormb(); __v; })
|
drivers/hwmon/nct6775.c:4759:55: error: invalid operands to binary << (have 'int (*)(struct nct6775_sio_data *, int)' and 'int')
4759 | val = (sio_data->inb(sio_data, SIO_REG_DEVID) << 8) |
| ~~~~~~~~~~~~~ ^~
| |
| int (*)(struct nct6775_sio_data *, int)
drivers/hwmon/nct6775.c:4760:58: error: macro "inb" passed 2 arguments, but takes just 1
4760 | sio_data->inb(sio_data, SIO_REG_DEVID + 1);
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:258: note: macro "inb" defined here
258 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __iormb(); __v; })
|
drivers/hwmon/nct6775.c:4810:52: error: macro "inb" passed 2 arguments, but takes just 1
4810 | val = (sio_data->inb(sio_data, SIO_REG_ADDR) << 8)
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:258: note: macro "inb" defined here
258 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __iormb(); __v; })
|
drivers/hwmon/nct6775.c:4810:54: error: invalid operands to binary << (have 'int (*)(struct nct6775_sio_data *, int)' and 'int')
4810 | val = (sio_data->inb(sio_data, SIO_REG_ADDR) << 8)
| ~~~~~~~~~~~~~ ^~
| |
| int (*)(struct nct6775_sio_data *, int)
drivers/hwmon/nct6775.c:4811:55: error: macro "inb" passed 2 arguments, but takes just 1
4811 | | sio_data->inb(sio_data, SIO_REG_ADDR + 1);
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:258: note: macro "inb" defined here
258 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __iormb(); __v; })
|
drivers/hwmon/nct6775.c:4820:53: error: macro "inb" passed 2 arguments, but takes just 1
4820 | val = sio_data->inb(sio_data, SIO_REG_ENABLE);
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:258: note: macro "inb" defined here
258 | #define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __iormb(); __v; })
|
>> drivers/hwmon/nct6775.c:4820:13: warning: assignment to 'u16' {aka 'short unsigned int'} from 'int (*)(struct nct6775_sio_data *, int)' makes integer from pointer without a cast [-Wint-conversion]
4820 | val = sio_data->inb(sio_data, SIO_REG_ENABLE);
| ^
drivers/hwmon/nct6775.c:4823:68: error: macro "outb" passed 3 arguments, but takes just 2
4823 | sio_data->outb(sio_data, SIO_REG_ENABLE, val | 0x01);
| ^
In file included from include/linux/io.h:13,
from drivers/hwmon/nct6775.c:56:
arch/arm/include/asm/io.h:252: note: macro "outb" defined here
252 | #define outb(v,p) ({ __iowmb(); __raw_writeb(v,__io(p)); })
|
drivers/hwmon/nct6775.c:4823:25: warning: statement with no effect [-Wunused-value]
4823 | sio_data->outb(sio_data, SIO_REG_ENABLE, val | 0x01);
| ~~~~~~~~^~~~~~
At top level:
drivers/hwmon/nct6775.c:284:17: warning: 'NCT6775_REG_CR_CASEOPEN_CLR' defined but not used [-Wunused-const-variable=]
284 | static const u8 NCT6775_REG_CR_CASEOPEN_CLR[] = { 0xe6, 0xee };
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/inb +3452 drivers/hwmon/nct6775.c
3423
3424 static ssize_t
3425 clear_caseopen(struct device *dev, struct device_attribute *attr,
3426 const char *buf, size_t count)
3427 {
3428 struct nct6775_data *data = dev_get_drvdata(dev);
3429 struct nct6775_sio_data *sio_data = dev_get_platdata(dev);
3430 int nr = to_sensor_dev_attr(attr)->index - INTRUSION_ALARM_BASE;
3431 unsigned long val;
3432 u8 reg;
3433 int ret;
3434
3435 if (kstrtoul(buf, 10, &val) || val != 0)
3436 return -EINVAL;
3437
3438 mutex_lock(&data->update_lock);
3439
3440 /*
3441 * Use CR registers to clear caseopen status.
3442 * The CR registers are the same for all chips, and not all chips
3443 * support clearing the caseopen status through "regular" registers.
3444 */
3445 ret = sio_data->enter(sio_data);
3446 if (ret) {
3447 count = ret;
3448 goto error;
3449 }
3450
3451 sio_data->select(sio_data, NCT6775_LD_ACPI);
> 3452 reg = sio_data->inb(sio_data, NCT6775_REG_CR_CASEOPEN_CLR[nr]);
3453 reg |= NCT6775_CR_CASEOPEN_CLR_MASK[nr];
> 3454 sio_data->outb(sio_data, NCT6775_REG_CR_CASEOPEN_CLR[nr], reg);
3455 reg &= ~NCT6775_CR_CASEOPEN_CLR_MASK[nr];
3456 sio_data->outb(sio_data, NCT6775_REG_CR_CASEOPEN_CLR[nr], reg);
3457 sio_data->exit(sio_data);
3458
3459 data->valid = false; /* Force cache refresh */
3460 error:
3461 mutex_unlock(&data->update_lock);
3462 return count;
3463 }
3464
3465 static SENSOR_DEVICE_ATTR(intrusion0_alarm, S_IWUSR | S_IRUGO, show_alarm,
3466 clear_caseopen, INTRUSION_ALARM_BASE);
3467 static SENSOR_DEVICE_ATTR(intrusion1_alarm, S_IWUSR | S_IRUGO, show_alarm,
3468 clear_caseopen, INTRUSION_ALARM_BASE + 1);
3469 static SENSOR_DEVICE_ATTR(intrusion0_beep, S_IWUSR | S_IRUGO, show_beep,
3470 store_beep, INTRUSION_ALARM_BASE);
3471 static SENSOR_DEVICE_ATTR(intrusion1_beep, S_IWUSR | S_IRUGO, show_beep,
3472 store_beep, INTRUSION_ALARM_BASE + 1);
3473 static SENSOR_DEVICE_ATTR(beep_enable, S_IWUSR | S_IRUGO, show_beep,
3474 store_beep, BEEP_ENABLE_BASE);
3475
3476 static umode_t nct6775_other_is_visible(struct kobject *kobj,
3477 struct attribute *attr, int index)
3478 {
3479 struct device *dev = kobj_to_dev(kobj);
3480 struct nct6775_data *data = dev_get_drvdata(dev);
3481
3482 if (index == 0 && !data->have_vid)
3483 return 0;
3484
3485 if (index == 1 || index == 2) {
3486 if (data->ALARM_BITS[INTRUSION_ALARM_BASE + index - 1] < 0)
3487 return 0;
3488 }
3489
3490 if (index == 3 || index == 4) {
3491 if (data->BEEP_BITS[INTRUSION_ALARM_BASE + index - 3] < 0)
3492 return 0;
3493 }
3494
3495 return attr->mode;
3496 }
3497
3498 /*
3499 * nct6775_other_is_visible uses the index into the following array
3500 * to determine if attributes should be created or not.
3501 * Any change in order or content must be matched.
3502 */
3503 static struct attribute *nct6775_attributes_other[] = {
3504 &dev_attr_cpu0_vid.attr, /* 0 */
3505 &sensor_dev_attr_intrusion0_alarm.dev_attr.attr, /* 1 */
3506 &sensor_dev_attr_intrusion1_alarm.dev_attr.attr, /* 2 */
3507 &sensor_dev_attr_intrusion0_beep.dev_attr.attr, /* 3 */
3508 &sensor_dev_attr_intrusion1_beep.dev_attr.attr, /* 4 */
3509 &sensor_dev_attr_beep_enable.dev_attr.attr, /* 5 */
3510
3511 NULL
3512 };
3513
3514 static const struct attribute_group nct6775_group_other = {
3515 .attrs = nct6775_attributes_other,
3516 .is_visible = nct6775_other_is_visible,
3517 };
3518
3519 static inline void nct6775_init_device(struct nct6775_data *data)
3520 {
3521 int i;
3522 u8 tmp, diode;
3523
3524 /* Start monitoring if needed */
3525 if (data->REG_CONFIG) {
3526 tmp = data->read_value(data, data->REG_CONFIG);
3527 if (!(tmp & 0x01))
3528 data->write_value(data, data->REG_CONFIG, tmp | 0x01);
3529 }
3530
3531 /* Enable temperature sensors if needed */
3532 for (i = 0; i < NUM_TEMP; i++) {
3533 if (!(data->have_temp & BIT(i)))
3534 continue;
3535 if (!data->reg_temp_config[i])
3536 continue;
3537 tmp = data->read_value(data, data->reg_temp_config[i]);
3538 if (tmp & 0x01)
3539 data->write_value(data, data->reg_temp_config[i],
3540 tmp & 0xfe);
3541 }
3542
3543 /* Enable VBAT monitoring if needed */
3544 tmp = data->read_value(data, data->REG_VBAT);
3545 if (!(tmp & 0x01))
3546 data->write_value(data, data->REG_VBAT, tmp | 0x01);
3547
3548 diode = data->read_value(data, data->REG_DIODE);
3549
3550 for (i = 0; i < data->temp_fixed_num; i++) {
3551 if (!(data->have_temp_fixed & BIT(i)))
3552 continue;
3553 if ((tmp & (data->DIODE_MASK << i))) /* diode */
3554 data->temp_type[i]
3555 = 3 - ((diode >> i) & data->DIODE_MASK);
3556 else /* thermistor */
3557 data->temp_type[i] = 4;
3558 }
3559 }
3560
3561 static void
3562 nct6775_check_fan_inputs(struct nct6775_data *data,
3563 struct nct6775_sio_data *sio_data)
3564 {
3565 bool fan3pin = false, fan4pin = false, fan4min = false;
3566 bool fan5pin = false, fan6pin = false, fan7pin = false;
3567 bool pwm3pin = false, pwm4pin = false, pwm5pin = false;
3568 bool pwm6pin = false, pwm7pin = false;
3569
3570 /* Store SIO_REG_ENABLE for use during resume */
3571 sio_data->select(sio_data, NCT6775_LD_HWM);
3572 data->sio_reg_enable = sio_data->inb(sio_data, SIO_REG_ENABLE);
3573
3574 /* fan4 and fan5 share some pins with the GPIO and serial flash */
3575 if (data->kind == nct6775) {
> 3576 int cr2c = sio_data->inb(sio_data, 0x2c);
3577
3578 fan3pin = cr2c & BIT(6);
3579 pwm3pin = cr2c & BIT(7);
3580
3581 /* On NCT6775, fan4 shares pins with the fdc interface */
> 3582 fan4pin = !(sio_data->inb(sio_data, 0x2A) & 0x80);
3583 } else if (data->kind == nct6776) {
3584 bool gpok = sio_data->inb(sio_data, 0x27) & 0x80;
3585 const char *board_vendor, *board_name;
3586
3587 board_vendor = dmi_get_system_info(DMI_BOARD_VENDOR);
3588 board_name = dmi_get_system_info(DMI_BOARD_NAME);
3589
3590 if (board_name && board_vendor &&
3591 !strcmp(board_vendor, "ASRock")) {
3592 /*
3593 * Auxiliary fan monitoring is not enabled on ASRock
3594 * Z77 Pro4-M if booted in UEFI Ultra-FastBoot mode.
3595 * Observed with BIOS version 2.00.
3596 */
3597 if (!strcmp(board_name, "Z77 Pro4-M")) {
3598 if ((data->sio_reg_enable & 0xe0) != 0xe0) {
3599 data->sio_reg_enable |= 0xe0;
3600 sio_data->outb(sio_data, SIO_REG_ENABLE,
3601 data->sio_reg_enable);
3602 }
3603 }
3604 }
3605
3606 if (data->sio_reg_enable & 0x80)
3607 fan3pin = gpok;
3608 else
3609 fan3pin = !(sio_data->inb(sio_data, 0x24) & 0x40);
3610
3611 if (data->sio_reg_enable & 0x40)
3612 fan4pin = gpok;
3613 else
3614 fan4pin = sio_data->inb(sio_data, 0x1C) & 0x01;
3615
3616 if (data->sio_reg_enable & 0x20)
3617 fan5pin = gpok;
3618 else
3619 fan5pin = sio_data->inb(sio_data, 0x1C) & 0x02;
3620
3621 fan4min = fan4pin;
3622 pwm3pin = fan3pin;
3623 } else if (data->kind == nct6106) {
3624 int cr24 = sio_data->inb(sio_data, 0x24);
3625
3626 fan3pin = !(cr24 & 0x80);
3627 pwm3pin = cr24 & 0x08;
3628 } else if (data->kind == nct6116) {
3629 int cr1a = sio_data->inb(sio_data, 0x1a);
3630 int cr1b = sio_data->inb(sio_data, 0x1b);
3631 int cr24 = sio_data->inb(sio_data, 0x24);
3632 int cr2a = sio_data->inb(sio_data, 0x2a);
3633 int cr2b = sio_data->inb(sio_data, 0x2b);
3634 int cr2f = sio_data->inb(sio_data, 0x2f);
3635
3636 fan3pin = !(cr2b & 0x10);
3637 fan4pin = (cr2b & 0x80) || // pin 1(2)
3638 (!(cr2f & 0x10) && (cr1a & 0x04)); // pin 65(66)
3639 fan5pin = (cr2b & 0x80) || // pin 126(127)
3640 (!(cr1b & 0x03) && (cr2a & 0x02)); // pin 94(96)
3641
3642 pwm3pin = fan3pin && (cr24 & 0x08);
3643 pwm4pin = fan4pin;
3644 pwm5pin = fan5pin;
3645 } else {
3646 /*
3647 * NCT6779D, NCT6791D, NCT6792D, NCT6793D, NCT6795D, NCT6796D,
3648 * NCT6797D, NCT6798D
3649 */
3650 int cr1a = sio_data->inb(sio_data, 0x1a);
3651 int cr1b = sio_data->inb(sio_data, 0x1b);
3652 int cr1c = sio_data->inb(sio_data, 0x1c);
3653 int cr1d = sio_data->inb(sio_data, 0x1d);
3654 int cr2a = sio_data->inb(sio_data, 0x2a);
3655 int cr2b = sio_data->inb(sio_data, 0x2b);
3656 int cr2d = sio_data->inb(sio_data, 0x2d);
3657 int cr2f = sio_data->inb(sio_data, 0x2f);
3658 bool dsw_en = cr2f & BIT(3);
3659 bool ddr4_en = cr2f & BIT(4);
3660 int cre0;
3661 int creb;
3662 int cred;
3663
3664 sio_data->select(sio_data, NCT6775_LD_12);
3665 cre0 = sio_data->inb(sio_data, 0xe0);
3666 creb = sio_data->inb(sio_data, 0xeb);
3667 cred = sio_data->inb(sio_data, 0xed);
3668
3669 fan3pin = !(cr1c & BIT(5));
3670 fan4pin = !(cr1c & BIT(6));
3671 fan5pin = !(cr1c & BIT(7));
3672
3673 pwm3pin = !(cr1c & BIT(0));
3674 pwm4pin = !(cr1c & BIT(1));
3675 pwm5pin = !(cr1c & BIT(2));
3676
3677 switch (data->kind) {
3678 case nct6791:
3679 fan6pin = cr2d & BIT(1);
3680 pwm6pin = cr2d & BIT(0);
3681 break;
3682 case nct6792:
3683 fan6pin = !dsw_en && (cr2d & BIT(1));
3684 pwm6pin = !dsw_en && (cr2d & BIT(0));
3685 break;
3686 case nct6793:
3687 fan5pin |= cr1b & BIT(5);
3688 fan5pin |= creb & BIT(5);
3689
3690 fan6pin = !dsw_en && (cr2d & BIT(1));
3691 fan6pin |= creb & BIT(3);
3692
3693 pwm5pin |= cr2d & BIT(7);
3694 pwm5pin |= (creb & BIT(4)) && !(cr2a & BIT(0));
3695
3696 pwm6pin = !dsw_en && (cr2d & BIT(0));
3697 pwm6pin |= creb & BIT(2);
3698 break;
3699 case nct6795:
3700 fan5pin |= cr1b & BIT(5);
3701 fan5pin |= creb & BIT(5);
3702
3703 fan6pin = (cr2a & BIT(4)) &&
3704 (!dsw_en || (cred & BIT(4)));
3705 fan6pin |= creb & BIT(3);
3706
3707 pwm5pin |= cr2d & BIT(7);
3708 pwm5pin |= (creb & BIT(4)) && !(cr2a & BIT(0));
3709
3710 pwm6pin = (cr2a & BIT(3)) && (cred & BIT(2));
3711 pwm6pin |= creb & BIT(2);
3712 break;
3713 case nct6796:
3714 fan5pin |= cr1b & BIT(5);
3715 fan5pin |= (cre0 & BIT(3)) && !(cr1b & BIT(0));
3716 fan5pin |= creb & BIT(5);
3717
3718 fan6pin = (cr2a & BIT(4)) &&
3719 (!dsw_en || (cred & BIT(4)));
3720 fan6pin |= creb & BIT(3);
3721
3722 fan7pin = !(cr2b & BIT(2));
3723
3724 pwm5pin |= cr2d & BIT(7);
3725 pwm5pin |= (cre0 & BIT(4)) && !(cr1b & BIT(0));
3726 pwm5pin |= (creb & BIT(4)) && !(cr2a & BIT(0));
3727
3728 pwm6pin = (cr2a & BIT(3)) && (cred & BIT(2));
3729 pwm6pin |= creb & BIT(2);
3730
3731 pwm7pin = !(cr1d & (BIT(2) | BIT(3)));
3732 break;
3733 case nct6797:
3734 fan5pin |= !ddr4_en && (cr1b & BIT(5));
3735 fan5pin |= creb & BIT(5);
3736
3737 fan6pin = cr2a & BIT(4);
3738 fan6pin |= creb & BIT(3);
3739
3740 fan7pin = cr1a & BIT(1);
3741
3742 pwm5pin |= (creb & BIT(4)) && !(cr2a & BIT(0));
3743 pwm5pin |= !ddr4_en && (cr2d & BIT(7));
3744
3745 pwm6pin = creb & BIT(2);
3746 pwm6pin |= cred & BIT(2);
3747
3748 pwm7pin = cr1d & BIT(4);
3749 break;
3750 case nct6798:
3751 fan6pin = !(cr1b & BIT(0)) && (cre0 & BIT(3));
3752 fan6pin |= cr2a & BIT(4);
3753 fan6pin |= creb & BIT(5);
3754
3755 fan7pin = cr1b & BIT(5);
3756 fan7pin |= !(cr2b & BIT(2));
3757 fan7pin |= creb & BIT(3);
3758
3759 pwm6pin = !(cr1b & BIT(0)) && (cre0 & BIT(4));
3760 pwm6pin |= !(cred & BIT(2)) && (cr2a & BIT(3));
3761 pwm6pin |= (creb & BIT(4)) && !(cr2a & BIT(0));
3762
3763 pwm7pin = !(cr1d & (BIT(2) | BIT(3)));
3764 pwm7pin |= cr2d & BIT(7);
3765 pwm7pin |= creb & BIT(2);
3766 break;
3767 default: /* NCT6779D */
3768 break;
3769 }
3770
3771 fan4min = fan4pin;
3772 }
3773
3774 /* fan 1 and 2 (0x03) are always present */
3775 data->has_fan = 0x03 | (fan3pin << 2) | (fan4pin << 3) |
3776 (fan5pin << 4) | (fan6pin << 5) | (fan7pin << 6);
3777 data->has_fan_min = 0x03 | (fan3pin << 2) | (fan4min << 3) |
3778 (fan5pin << 4) | (fan6pin << 5) | (fan7pin << 6);
3779 data->has_pwm = 0x03 | (pwm3pin << 2) | (pwm4pin << 3) |
3780 (pwm5pin << 4) | (pwm6pin << 5) | (pwm7pin << 6);
3781 }
3782
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year