[mcgrof:modules-next 1/1] include/linux/kern_levels.h:5:18: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 3 has type 'Elf32_Off' {aka 'unsigned int'}
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git modules-next
head: 8b1185a4427b772b9f02376a08272c3019777581
commit: 8b1185a4427b772b9f02376a08272c3019777581 [1/1] module: change to print useful messages from elf_validity_check()
config: um-i386_defconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/commit/?...
git remote add mcgrof https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git
git fetch --no-tags mcgrof modules-next
git checkout 8b1185a4427b772b9f02376a08272c3019777581
# save the attached .config to linux build tree
make W=1 ARCH=um SUBARCH=i386
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 include/linux/kernel.h:19,
from include/linux/list.h:9,
from include/linux/module.h:12,
from include/linux/moduleloader.h:6,
from kernel/module.c:11:
kernel/module.c: In function 'validate_section_offset':
>> include/linux/kern_levels.h:5:18: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 3 has type 'Elf32_Off' {aka 'unsigned int'} [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/linux/printk.h:418:11: note: in definition of macro 'printk_index_wrap'
418 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~
include/linux/printk.h:489:2: note: in expansion of macro 'printk'
489 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~
include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH'
11 | #define KERN_ERR KERN_SOH "3" /* error conditions */
| ^~~~~~~~
include/linux/printk.h:489:9: note: in expansion of macro 'KERN_ERR'
489 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~
kernel/module.c:2953:3: note: in expansion of macro 'pr_err'
2953 | pr_err("Invalid ELF section offset/size: secend(%lu) < shdr->sh_offset(%llu) or secend(%lu) > e_shnum(%lu)\n",
| ^~~~~~
kernel/module.c:2953:77: note: format string is defined here
2953 | pr_err("Invalid ELF section offset/size: secend(%lu) < shdr->sh_offset(%llu) or secend(%lu) > e_shnum(%lu)\n",
| ~~~^
| |
| long long unsigned int
| %u
In file included from include/linux/kernel.h:19,
from include/linux/list.h:9,
from include/linux/module.h:12,
from include/linux/moduleloader.h:6,
from kernel/module.c:11:
kernel/module.c: In function 'elf_validity_check':
include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/linux/printk.h:418:11: note: in definition of macro 'printk_index_wrap'
418 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~
include/linux/printk.h:489:2: note: in expansion of macro 'printk'
489 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~
include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH'
11 | #define KERN_ERR KERN_SOH "3" /* error conditions */
| ^~~~~~~~
include/linux/printk.h:489:9: note: in expansion of macro 'KERN_ERR'
489 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~
kernel/module.c:2974:3: note: in expansion of macro 'pr_err'
2974 | pr_err("Invalid ELF header len %lu < %lu\n", info->len,
| ^~~~~~
kernel/module.c:2974:42: note: format string is defined here
2974 | pr_err("Invalid ELF header len %lu < %lu\n", info->len,
| ~~^
| |
| long unsigned int
| %u
In file included from include/linux/kernel.h:19,
from include/linux/list.h:9,
from include/linux/module.h:12,
from include/linux/moduleloader.h:6,
from kernel/module.c:11:
include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/linux/printk.h:418:11: note: in definition of macro 'printk_index_wrap'
418 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~
include/linux/printk.h:489:2: note: in expansion of macro 'printk'
489 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~
include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH'
11 | #define KERN_ERR KERN_SOH "3" /* error conditions */
| ^~~~~~~~
include/linux/printk.h:489:9: note: in expansion of macro 'KERN_ERR'
489 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~
kernel/module.c:2994:3: note: in expansion of macro 'pr_err'
2994 | pr_err("Invalid ELF section header size %d != %lu\n",
| ^~~~~~
kernel/module.c:2994:51: note: format string is defined here
2994 | pr_err("Invalid ELF section header size %d != %lu\n",
| ~~^
| |
| long unsigned int
| %u
In file included from include/linux/kernel.h:19,
from include/linux/list.h:9,
from include/linux/module.h:12,
from include/linux/moduleloader.h:6,
from kernel/module.c:11:
>> include/linux/kern_levels.h:5:18: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'unsigned int' [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/linux/printk.h:418:11: note: in definition of macro 'printk_index_wrap'
418 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~
include/linux/printk.h:489:2: note: in expansion of macro 'printk'
489 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~
include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH'
11 | #define KERN_ERR KERN_SOH "3" /* error conditions */
| ^~~~~~~~
include/linux/printk.h:489:9: note: in expansion of macro 'KERN_ERR'
489 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~
kernel/module.c:3007:3: note: in expansion of macro 'pr_err'
3007 | pr_err("Invalid ELF section header overflow: %ld > %llu\n",
| ^~~~~~
kernel/module.c:3007:50: note: format string is defined here
3007 | pr_err("Invalid ELF section header overflow: %ld > %llu\n",
| ~~^
| |
| long int
| %d
In file included from include/linux/kernel.h:19,
from include/linux/list.h:9,
from include/linux/module.h:12,
from include/linux/moduleloader.h:6,
from kernel/module.c:11:
>> include/linux/kern_levels.h:5:18: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 3 has type 'long unsigned int' [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/linux/printk.h:418:11: note: in definition of macro 'printk_index_wrap'
418 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~
include/linux/printk.h:489:2: note: in expansion of macro 'printk'
489 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~
include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH'
11 | #define KERN_ERR KERN_SOH "3" /* error conditions */
| ^~~~~~~~
include/linux/printk.h:489:9: note: in expansion of macro 'KERN_ERR'
489 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~
kernel/module.c:3007:3: note: in expansion of macro 'pr_err'
3007 | pr_err("Invalid ELF section header overflow: %ld > %llu\n",
| ^~~~~~
kernel/module.c:3007:57: note: format string is defined here
3007 | pr_err("Invalid ELF section header overflow: %ld > %llu\n",
| ~~~^
| |
| long long unsigned int
| %lu
In file included from include/linux/kernel.h:19,
from include/linux/list.h:9,
from include/linux/module.h:12,
from include/linux/moduleloader.h:6,
from kernel/module.c:11:
>> include/linux/kern_levels.h:5:18: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 3 has type 'Elf32_Word' {aka 'unsigned int'} [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/linux/printk.h:418:11: note: in definition of macro 'printk_index_wrap'
418 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~
include/linux/printk.h:489:2: note: in expansion of macro 'printk'
489 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~
include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH'
11 | #define KERN_ERR KERN_SOH "3" /* error conditions */
| ^~~~~~~~
include/linux/printk.h:489:9: note: in expansion of macro 'KERN_ERR'
489 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~
kernel/module.c:3049:3: note: in expansion of macro 'pr_err'
3049 | pr_err("ELF Spec violation: section 0 type!=SH_NULL(%d) or non-zero len(%llu) or addr(%llu)\n",
| ^~~~~~
kernel/module.c:3049:78: note: format string is defined here
3049 | pr_err("ELF Spec violation: section 0 type!=SH_NULL(%d) or non-zero len(%llu) or addr(%llu)\n",
| ~~~^
| |
| long long unsigned int
| %u
In file included from include/linux/kernel.h:19,
from include/linux/list.h:9,
from include/linux/module.h:12,
from include/linux/moduleloader.h:6,
from kernel/module.c:11:
>> include/linux/kern_levels.h:5:18: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 4 has type 'Elf32_Addr' {aka 'unsigned int'} [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/linux/printk.h:418:11: note: in definition of macro 'printk_index_wrap'
418 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~
include/linux/printk.h:489:2: note: in expansion of macro 'printk'
489 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~
include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH'
11 | #define KERN_ERR KERN_SOH "3" /* error conditions */
| ^~~~~~~~
include/linux/printk.h:489:9: note: in expansion of macro 'KERN_ERR'
489 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~
kernel/module.c:3049:3: note: in expansion of macro 'pr_err'
3049 | pr_err("ELF Spec violation: section 0 type!=SH_NULL(%d) or non-zero len(%llu) or addr(%llu)\n",
| ^~~~~~
kernel/module.c:3049:92: note: format string is defined here
3049 | pr_err("ELF Spec violation: section 0 type!=SH_NULL(%d) or non-zero len(%llu) or addr(%llu)\n",
| ~~~^
| |
| long long unsigned int
| %u
vim +5 include/linux/kern_levels.h
314ba3520e513a Joe Perches 2012-07-30 4
04d2c8c83d0e3a Joe Perches 2012-07-30 @5 #define KERN_SOH "\001" /* ASCII Start Of Header */
04d2c8c83d0e3a Joe Perches 2012-07-30 6 #define KERN_SOH_ASCII '\001'
04d2c8c83d0e3a Joe Perches 2012-07-30 7
:::::: The code at line 5 was first introduced by commit
:::::: 04d2c8c83d0e3ac5f78aeede51babb3236200112 printk: convert the format for KERN_<LEVEL> to a 2 byte pattern
:::::: TO: Joe Perches <joe(a)perches.com>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
[drm-misc:for-linux-next-fixes 2/11] drivers/clk/bcm/clk-bcm2835.c:942:13: warning: variable 'rem' set but not used
by kernel test robot
tree: git://anongit.freedesktop.org/drm/drm-misc for-linux-next-fixes
head: 6de148d82d9e790caf7622a002229df745fd2d94
commit: 6f668b61142fb7dbc66a659ecdd9afe55d40fc08 [2/11] clk: bcm-2835: Remove rounding up the dividers
config: nios2-randconfig-r002-20211013 (attached as .config)
compiler: nios2-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
git remote add drm-misc git://anongit.freedesktop.org/drm/drm-misc
git fetch --no-tags drm-misc for-linux-next-fixes
git checkout 6f668b61142fb7dbc66a659ecdd9afe55d40fc08
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nios2
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/clk/bcm/clk-bcm2835.c: In function 'bcm2835_clock_choose_div':
>> drivers/clk/bcm/clk-bcm2835.c:942:13: warning: variable 'rem' set but not used [-Wunused-but-set-variable]
942 | u64 rem;
| ^~~
vim +/rem +942 drivers/clk/bcm/clk-bcm2835.c
41691b8862e2a3 Eric Anholt 2015-10-08 932
41691b8862e2a3 Eric Anholt 2015-10-08 933 static u32 bcm2835_clock_choose_div(struct clk_hw *hw,
41691b8862e2a3 Eric Anholt 2015-10-08 934 unsigned long rate,
6f668b61142fb7 Maxime Ripard 2021-09-22 935 unsigned long parent_rate)
41691b8862e2a3 Eric Anholt 2015-10-08 936 {
41691b8862e2a3 Eric Anholt 2015-10-08 937 struct bcm2835_clock *clock = bcm2835_clock_from_hw(hw);
41691b8862e2a3 Eric Anholt 2015-10-08 938 const struct bcm2835_clock_data *data = clock->data;
9c95b32ca09364 Remi Pommarel 2015-12-06 939 u32 unused_frac_mask =
9c95b32ca09364 Remi Pommarel 2015-12-06 940 GENMASK(CM_DIV_FRAC_BITS - data->frac_bits, 0) >> 1;
41691b8862e2a3 Eric Anholt 2015-10-08 941 u64 temp = (u64)parent_rate << CM_DIV_FRAC_BITS;
9c95b32ca09364 Remi Pommarel 2015-12-06 @942 u64 rem;
959ca92a3235fc Martin Sperl 2016-02-29 943 u32 div, mindiv, maxdiv;
41691b8862e2a3 Eric Anholt 2015-10-08 944
9c95b32ca09364 Remi Pommarel 2015-12-06 945 rem = do_div(temp, rate);
41691b8862e2a3 Eric Anholt 2015-10-08 946 div = temp;
41691b8862e2a3 Eric Anholt 2015-10-08 947 div &= ~unused_frac_mask;
41691b8862e2a3 Eric Anholt 2015-10-08 948
959ca92a3235fc Martin Sperl 2016-02-29 949 /* different clamping limits apply for a mash clock */
959ca92a3235fc Martin Sperl 2016-02-29 950 if (data->is_mash_clock) {
959ca92a3235fc Martin Sperl 2016-02-29 951 /* clamp to min divider of 2 */
959ca92a3235fc Martin Sperl 2016-02-29 952 mindiv = 2 << CM_DIV_FRAC_BITS;
959ca92a3235fc Martin Sperl 2016-02-29 953 /* clamp to the highest possible integer divider */
959ca92a3235fc Martin Sperl 2016-02-29 954 maxdiv = (BIT(data->int_bits) - 1) << CM_DIV_FRAC_BITS;
959ca92a3235fc Martin Sperl 2016-02-29 955 } else {
997f16bd5d2e9b Martin Sperl 2016-02-29 956 /* clamp to min divider of 1 */
959ca92a3235fc Martin Sperl 2016-02-29 957 mindiv = 1 << CM_DIV_FRAC_BITS;
997f16bd5d2e9b Martin Sperl 2016-02-29 958 /* clamp to the highest possible fractional divider */
959ca92a3235fc Martin Sperl 2016-02-29 959 maxdiv = GENMASK(data->int_bits + CM_DIV_FRAC_BITS - 1,
959ca92a3235fc Martin Sperl 2016-02-29 960 CM_DIV_FRAC_BITS - data->frac_bits);
959ca92a3235fc Martin Sperl 2016-02-29 961 }
959ca92a3235fc Martin Sperl 2016-02-29 962
959ca92a3235fc Martin Sperl 2016-02-29 963 /* apply the clamping limits */
959ca92a3235fc Martin Sperl 2016-02-29 964 div = max_t(u32, div, mindiv);
959ca92a3235fc Martin Sperl 2016-02-29 965 div = min_t(u32, div, maxdiv);
41691b8862e2a3 Eric Anholt 2015-10-08 966
41691b8862e2a3 Eric Anholt 2015-10-08 967 return div;
41691b8862e2a3 Eric Anholt 2015-10-08 968 }
41691b8862e2a3 Eric Anholt 2015-10-08 969
:::::: The code at line 942 was first introduced by commit
:::::: 9c95b32ca09364e4687b72c4e17b78dc1c420026 clk: bcm2835: add a round up ability to the clock divisor
:::::: TO: Remi Pommarel <repk(a)triplefau.lt>
:::::: CC: Michael Turquette <mturquette(a)baylibre.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
[ardb:arm-vmap-stacks-v2 19/19] arch/arm/kernel/traps.c:850:17: error: no previous prototype for function 'handle_bad_stack'
by kernel test robot
tree: git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git arm-vmap-stacks-v2
head: f1ff5483bf30001244ae041017085f63f8dcc9fc
commit: f1ff5483bf30001244ae041017085f63f8dcc9fc [19/19] ARM: implement support for vmap'ed stacks
config: arm-buildonly-randconfig-r002-20211013 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project b6a8c695542b2987eb9a203d5663a0740cb4725f)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://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 arm-vmap-stacks-v2
git checkout f1ff5483bf30001244ae041017085f63f8dcc9fc
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/arm/kernel/traps.c:95:6: error: no previous prototype for function 'dump_backtrace_stm' [-Werror,-Wmissing-prototypes]
void dump_backtrace_stm(u32 *stack, u32 instruction, const char *loglvl)
^
arch/arm/kernel/traps.c:95:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void dump_backtrace_stm(u32 *stack, u32 instruction, const char *loglvl)
^
static
arch/arm/kernel/traps.c:446:17: error: no previous prototype for function 'do_undefinstr' [-Werror,-Wmissing-prototypes]
asmlinkage void do_undefinstr(struct pt_regs *regs)
^
arch/arm/kernel/traps.c:446:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
asmlinkage void do_undefinstr(struct pt_regs *regs)
^
static
arch/arm/kernel/traps.c:511:39: error: no previous prototype for function 'handle_fiq_as_nmi' [-Werror,-Wmissing-prototypes]
asmlinkage void __exception_irq_entry handle_fiq_as_nmi(struct pt_regs *regs)
^
arch/arm/kernel/traps.c:511:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
asmlinkage void __exception_irq_entry handle_fiq_as_nmi(struct pt_regs *regs)
^
static
arch/arm/kernel/traps.c:530:17: error: no previous prototype for function 'bad_mode' [-Werror,-Wmissing-prototypes]
asmlinkage void bad_mode(struct pt_regs *regs, int reason)
^
arch/arm/kernel/traps.c:530:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
asmlinkage void bad_mode(struct pt_regs *regs, int reason)
^
static
arch/arm/kernel/traps.c:603:16: error: no previous prototype for function 'arm_syscall' [-Werror,-Wmissing-prototypes]
asmlinkage int arm_syscall(int no, struct pt_regs *regs)
^
arch/arm/kernel/traps.c:603:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
asmlinkage int arm_syscall(int no, struct pt_regs *regs)
^
static
arch/arm/kernel/traps.c:729:1: error: no previous prototype for function 'baddataabort' [-Werror,-Wmissing-prototypes]
baddataabort(int code, unsigned long instr, struct pt_regs *regs)
^
arch/arm/kernel/traps.c:728:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
asmlinkage void
^
static
arch/arm/kernel/traps.c:769:17: error: no previous prototype for function '__div0' [-Werror,-Wmissing-prototypes]
asmlinkage void __div0(void)
^
arch/arm/kernel/traps.c:769:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
asmlinkage void __div0(void)
^
static
>> arch/arm/kernel/traps.c:850:17: error: no previous prototype for function 'handle_bad_stack' [-Werror,-Wmissing-prototypes]
asmlinkage void handle_bad_stack(struct pt_regs *regs)
^
arch/arm/kernel/traps.c:850:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
asmlinkage void handle_bad_stack(struct pt_regs *regs)
^
static
8 errors generated.
vim +/handle_bad_stack +850 arch/arm/kernel/traps.c
849
> 850 asmlinkage void handle_bad_stack(struct pt_regs *regs)
851 {
852 unsigned long tsk_stk = (unsigned long)current->stack;
853 unsigned long irq_stk = (unsigned long)this_cpu_read(irq_stack_ptr);
854 unsigned long ovf_stk = (unsigned long)this_cpu_ptr(overflow_stack);
855
856 console_verbose();
857 pr_emerg("Insufficient stack space to handle exception!");
858
859 pr_emerg("Task stack: [0x%08lx..0x%08lx]\n",
860 tsk_stk, tsk_stk + THREAD_SIZE);
861 pr_emerg("IRQ stack: [0x%08lx..0x%08lx]\n",
862 irq_stk, irq_stk + THREAD_SIZE);
863 pr_emerg("Overflow stack: [0x%08lx..0x%08lx]\n",
864 ovf_stk, ovf_stk + OVERFLOW_STACK_SIZE);
865
866 die("kernel stack overflow", regs, 0);
867 }
868
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
[dhowells-fs:fscache-rewrite-indexing 74/74] fs/cachefiles/namei.c:347:63: warning: variable 'ret' is uninitialized when used here
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git fscache-rewrite-indexing
head: c4c64220b16dd9204a79685fe34d61c1b7f858a6
commit: c4c64220b16dd9204a79685fe34d61c1b7f858a6 [74/74] cachefiles: Add tracepoints to log errors from ops on the backing fs
config: i386-randconfig-r034-20211013 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project b6a8c695542b2987eb9a203d5663a0740cb4725f)
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/dhowells/linux-fs.git/com...
git remote add dhowells-fs https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
git fetch --no-tags dhowells-fs fscache-rewrite-indexing
git checkout c4c64220b16dd9204a79685fe34d61c1b7f858a6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> fs/cachefiles/namei.c:347:63: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
trace_cachefiles_vfs_error(object, d_backing_inode(dentry), ret,
^~~
fs/cachefiles/namei.c:331:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
1 warning generated.
vim +/ret +347 fs/cachefiles/namei.c
320
321 /*
322 * Open an existing file, checking its attributes and replacing it if it is
323 * stale.
324 */
325 static bool cachefiles_open_file(struct cachefiles_object *object,
326 struct dentry *dentry)
327 {
328 struct cachefiles_cache *cache = object->volume->cache;
329 struct file *file;
330 struct path path;
331 int ret;
332
333 _enter("%pd", dentry);
334
335 if (!cachefiles_mark_inode_in_use(object, dentry))
336 return false;
337
338 /* We need to open a file interface onto a data file now as we can't do
339 * it on demand because writeback called from do_exit() sees
340 * current->fs == NULL - which breaks d_path() called from ext4 open.
341 */
342 path.mnt = cache->mnt;
343 path.dentry = dentry;
344 file = open_with_fake_path(&path, O_RDWR | O_LARGEFILE | O_DIRECT,
345 d_backing_inode(dentry), cache->cache_cred);
346 if (IS_ERR(file)) {
> 347 trace_cachefiles_vfs_error(object, d_backing_inode(dentry), ret,
348 cachefiles_trace_open_error);
349 goto error;
350 }
351
352 if (unlikely(!file->f_op->read_iter) ||
353 unlikely(!file->f_op->write_iter)) {
354 pr_notice("Cache does not support read_iter and write_iter\n");
355 goto error_fput;
356 }
357 _debug("file -> %pd positive", dentry);
358
359 ret = cachefiles_check_auxdata(object, file);
360 if (ret < 0)
361 goto check_failed;
362
363 object->file = file;
364
365 /* Always update the atime on an object we've just looked up (this is
366 * used to keep track of culling, and atimes are only updated by read,
367 * write and readdir but not lookup or open).
368 */
369 touch_atime(&file->f_path);
370 dput(dentry);
371 return true;
372
373 check_failed:
374 fscache_cookie_lookup_negative(object->cookie);
375 cachefiles_unmark_inode_in_use(object, file);
376 cachefiles_mark_object_inactive(object, file);
377 if (ret == -ESTALE) {
378 fput(file);
379 dput(dentry);
380 return cachefiles_create_file(object);
381 }
382 error_fput:
383 fput(file);
384 error:
385 dput(dentry);
386 return false;
387 }
388
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
Re: [PATCH] drm: Update MST First Link Slot Information Based on Encoding Format
by kernel test robot
Hi Bhawanpreet,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on drm-tip/drm-tip linus/master v5.15-rc5 next-20211013]
[cannot apply to drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next airlied/drm-next]
[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/Bhawanpreet-Lakha/drm-Update-MST...
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-randconfig-a005-20211013 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project b6a8c695542b2987eb9a203d5663a0740cb4725f)
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/5604bf980dcbfdd7650b7e1d5d4a2fd9f...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Bhawanpreet-Lakha/drm-Update-MST-First-Link-Slot-Information-Based-on-Encoding-Format/20211013-060001
git checkout 5604bf980dcbfdd7650b7e1d5d4a2fd9f18cd866
# 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 errors (new ones prefixed by >>):
In file included from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:35:
In file included from drivers/gpu/drm/amd/amdgpu/../display/dmub/dmub_srv.h:67:
drivers/gpu/drm/amd/amdgpu/../display/dmub/inc/dmub_cmd.h:2819:12: warning: variable 'temp' set but not used [-Wunused-but-set-variable]
uint64_t temp;
^
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:633:6: warning: no previous prototype for function 'dmub_aux_setconfig_callback' [-Wmissing-prototypes]
void dmub_aux_setconfig_callback(struct amdgpu_device *adev, struct dmub_notification *notify)
^
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:633:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void dmub_aux_setconfig_callback(struct amdgpu_device *adev, struct dmub_notification *notify)
^
static
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:649:6: warning: no previous prototype for function 'dmub_hpd_callback' [-Wmissing-prototypes]
void dmub_hpd_callback(struct amdgpu_device *adev, struct dmub_notification *notify)
^
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:649:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void dmub_hpd_callback(struct amdgpu_device *adev, struct dmub_notification *notify)
^
static
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:706:6: warning: no previous prototype for function 'register_dmub_notify_callback' [-Wmissing-prototypes]
bool register_dmub_notify_callback(struct amdgpu_device *adev, enum dmub_notification_type type,
^
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:706:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool register_dmub_notify_callback(struct amdgpu_device *adev, enum dmub_notification_type type,
^
static
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:7174:12: warning: variable 'clock' set but not used [-Wunused-but-set-variable]
int i, j, clock;
^
>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:10912:23: error: implicit declaration of function 'dc_link_dp_mst_decide_link_encoding_format' [-Werror,-Wimplicit-function-declaration]
link_coding_cap = dc_link_dp_mst_decide_link_encoding_format(aconnector->dc_link);
^
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:11394:5: warning: no previous prototype for function 'amdgpu_dm_set_dmub_async_sync_status' [-Wmissing-prototypes]
int amdgpu_dm_set_dmub_async_sync_status(bool is_cmd_aux, struct dc_context *ctx,
^
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:11394:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int amdgpu_dm_set_dmub_async_sync_status(bool is_cmd_aux, struct dc_context *ctx,
^
static
6 warnings and 1 error generated.
vim +/dc_link_dp_mst_decide_link_encoding_format +10912 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c
10643
10644 /**
10645 * amdgpu_dm_atomic_check() - Atomic check implementation for AMDgpu DM.
10646 * @dev: The DRM device
10647 * @state: The atomic state to commit
10648 *
10649 * Validate that the given atomic state is programmable by DC into hardware.
10650 * This involves constructing a &struct dc_state reflecting the new hardware
10651 * state we wish to commit, then querying DC to see if it is programmable. It's
10652 * important not to modify the existing DC state. Otherwise, atomic_check
10653 * may unexpectedly commit hardware changes.
10654 *
10655 * When validating the DC state, it's important that the right locks are
10656 * acquired. For full updates case which removes/adds/updates streams on one
10657 * CRTC while flipping on another CRTC, acquiring global lock will guarantee
10658 * that any such full update commit will wait for completion of any outstanding
10659 * flip using DRMs synchronization events.
10660 *
10661 * Note that DM adds the affected connectors for all CRTCs in state, when that
10662 * might not seem necessary. This is because DC stream creation requires the
10663 * DC sink, which is tied to the DRM connector state. Cleaning this up should
10664 * be possible but non-trivial - a possible TODO item.
10665 *
10666 * Return: -Error code if validation failed.
10667 */
10668 static int amdgpu_dm_atomic_check(struct drm_device *dev,
10669 struct drm_atomic_state *state)
10670 {
10671 struct amdgpu_device *adev = drm_to_adev(dev);
10672 struct dm_atomic_state *dm_state = NULL;
10673 struct dc *dc = adev->dm.dc;
10674 struct drm_connector *connector;
10675 struct drm_connector_state *old_con_state, *new_con_state;
10676 struct drm_crtc *crtc;
10677 struct drm_crtc_state *old_crtc_state, *new_crtc_state;
10678 struct drm_plane *plane;
10679 struct drm_plane_state *old_plane_state, *new_plane_state;
10680 enum dc_status status;
10681 int ret, i;
10682 bool lock_and_validation_needed = false;
10683 struct dm_crtc_state *dm_old_crtc_state;
10684 #if defined(CONFIG_DRM_AMD_DC_DCN)
10685 struct dsc_mst_fairness_vars vars[MAX_PIPES];
10686 #endif
10687 struct drm_dp_mst_topology_state *mst_state;
10688 struct drm_dp_mst_topology_mgr *mgr;
10689
10690 trace_amdgpu_dm_atomic_check_begin(state);
10691
10692 ret = drm_atomic_helper_check_modeset(dev, state);
10693 if (ret)
10694 goto fail;
10695
10696 /* Check connector changes */
10697 for_each_oldnew_connector_in_state(state, connector, old_con_state, new_con_state, i) {
10698 struct dm_connector_state *dm_old_con_state = to_dm_connector_state(old_con_state);
10699 struct dm_connector_state *dm_new_con_state = to_dm_connector_state(new_con_state);
10700
10701 /* Skip connectors that are disabled or part of modeset already. */
10702 if (!old_con_state->crtc && !new_con_state->crtc)
10703 continue;
10704
10705 if (!new_con_state->crtc)
10706 continue;
10707
10708 new_crtc_state = drm_atomic_get_crtc_state(state, new_con_state->crtc);
10709 if (IS_ERR(new_crtc_state)) {
10710 ret = PTR_ERR(new_crtc_state);
10711 goto fail;
10712 }
10713
10714 if (dm_old_con_state->abm_level !=
10715 dm_new_con_state->abm_level)
10716 new_crtc_state->connectors_changed = true;
10717 }
10718
10719 #if defined(CONFIG_DRM_AMD_DC_DCN)
10720 if (dc_resource_is_dsc_encoding_supported(dc)) {
10721 for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) {
10722 if (drm_atomic_crtc_needs_modeset(new_crtc_state)) {
10723 ret = add_affected_mst_dsc_crtcs(state, crtc);
10724 if (ret)
10725 goto fail;
10726 }
10727 }
10728 }
10729 #endif
10730 for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) {
10731 dm_old_crtc_state = to_dm_crtc_state(old_crtc_state);
10732
10733 if (!drm_atomic_crtc_needs_modeset(new_crtc_state) &&
10734 !new_crtc_state->color_mgmt_changed &&
10735 old_crtc_state->vrr_enabled == new_crtc_state->vrr_enabled &&
10736 dm_old_crtc_state->dsc_force_changed == false)
10737 continue;
10738
10739 ret = amdgpu_dm_verify_lut_sizes(new_crtc_state);
10740 if (ret)
10741 goto fail;
10742
10743 if (!new_crtc_state->enable)
10744 continue;
10745
10746 ret = drm_atomic_add_affected_connectors(state, crtc);
10747 if (ret)
10748 return ret;
10749
10750 ret = drm_atomic_add_affected_planes(state, crtc);
10751 if (ret)
10752 goto fail;
10753
10754 if (dm_old_crtc_state->dsc_force_changed)
10755 new_crtc_state->mode_changed = true;
10756 }
10757
10758 /*
10759 * Add all primary and overlay planes on the CRTC to the state
10760 * whenever a plane is enabled to maintain correct z-ordering
10761 * and to enable fast surface updates.
10762 */
10763 drm_for_each_crtc(crtc, dev) {
10764 bool modified = false;
10765
10766 for_each_oldnew_plane_in_state(state, plane, old_plane_state, new_plane_state, i) {
10767 if (plane->type == DRM_PLANE_TYPE_CURSOR)
10768 continue;
10769
10770 if (new_plane_state->crtc == crtc ||
10771 old_plane_state->crtc == crtc) {
10772 modified = true;
10773 break;
10774 }
10775 }
10776
10777 if (!modified)
10778 continue;
10779
10780 drm_for_each_plane_mask(plane, state->dev, crtc->state->plane_mask) {
10781 if (plane->type == DRM_PLANE_TYPE_CURSOR)
10782 continue;
10783
10784 new_plane_state =
10785 drm_atomic_get_plane_state(state, plane);
10786
10787 if (IS_ERR(new_plane_state)) {
10788 ret = PTR_ERR(new_plane_state);
10789 goto fail;
10790 }
10791 }
10792 }
10793
10794 /* Remove exiting planes if they are modified */
10795 for_each_oldnew_plane_in_state_reverse(state, plane, old_plane_state, new_plane_state, i) {
10796 ret = dm_update_plane_state(dc, state, plane,
10797 old_plane_state,
10798 new_plane_state,
10799 false,
10800 &lock_and_validation_needed);
10801 if (ret)
10802 goto fail;
10803 }
10804
10805 /* Disable all crtcs which require disable */
10806 for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) {
10807 ret = dm_update_crtc_state(&adev->dm, state, crtc,
10808 old_crtc_state,
10809 new_crtc_state,
10810 false,
10811 &lock_and_validation_needed);
10812 if (ret)
10813 goto fail;
10814 }
10815
10816 /* Enable all crtcs which require enable */
10817 for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) {
10818 ret = dm_update_crtc_state(&adev->dm, state, crtc,
10819 old_crtc_state,
10820 new_crtc_state,
10821 true,
10822 &lock_and_validation_needed);
10823 if (ret)
10824 goto fail;
10825 }
10826
10827 ret = validate_overlay(state);
10828 if (ret)
10829 goto fail;
10830
10831 /* Add new/modified planes */
10832 for_each_oldnew_plane_in_state_reverse(state, plane, old_plane_state, new_plane_state, i) {
10833 ret = dm_update_plane_state(dc, state, plane,
10834 old_plane_state,
10835 new_plane_state,
10836 true,
10837 &lock_and_validation_needed);
10838 if (ret)
10839 goto fail;
10840 }
10841
10842 /* Run this here since we want to validate the streams we created */
10843 ret = drm_atomic_helper_check_planes(dev, state);
10844 if (ret)
10845 goto fail;
10846
10847 /* Check cursor planes scaling */
10848 for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) {
10849 ret = dm_check_crtc_cursor(state, crtc, new_crtc_state);
10850 if (ret)
10851 goto fail;
10852 }
10853
10854 if (state->legacy_cursor_update) {
10855 /*
10856 * This is a fast cursor update coming from the plane update
10857 * helper, check if it can be done asynchronously for better
10858 * performance.
10859 */
10860 state->async_update =
10861 !drm_atomic_helper_async_check(dev, state);
10862
10863 /*
10864 * Skip the remaining global validation if this is an async
10865 * update. Cursor updates can be done without affecting
10866 * state or bandwidth calcs and this avoids the performance
10867 * penalty of locking the private state object and
10868 * allocating a new dc_state.
10869 */
10870 if (state->async_update)
10871 return 0;
10872 }
10873
10874 /* Check scaling and underscan changes*/
10875 /* TODO Removed scaling changes validation due to inability to commit
10876 * new stream into context w\o causing full reset. Need to
10877 * decide how to handle.
10878 */
10879 for_each_oldnew_connector_in_state(state, connector, old_con_state, new_con_state, i) {
10880 struct dm_connector_state *dm_old_con_state = to_dm_connector_state(old_con_state);
10881 struct dm_connector_state *dm_new_con_state = to_dm_connector_state(new_con_state);
10882 struct amdgpu_crtc *acrtc = to_amdgpu_crtc(dm_new_con_state->base.crtc);
10883
10884 /* Skip any modesets/resets */
10885 if (!acrtc || drm_atomic_crtc_needs_modeset(
10886 drm_atomic_get_new_crtc_state(state, &acrtc->base)))
10887 continue;
10888
10889 /* Skip any thing not scale or underscan changes */
10890 if (!is_scaling_state_different(dm_new_con_state, dm_old_con_state))
10891 continue;
10892
10893 lock_and_validation_needed = true;
10894 }
10895
10896 #if defined(CONFIG_DRM_AMD_DC_DCN)
10897 for_each_new_mst_mgr_in_state(state, mgr, mst_state, i) {
10898 struct amdgpu_dm_connector *aconnector;
10899 struct drm_connector *connector;
10900 struct drm_connector_list_iter iter;
10901 u8 link_coding_cap;
10902
10903 if (!mgr->mst_state )
10904 continue;
10905
10906 drm_connector_list_iter_begin(dev, &iter);
10907 drm_for_each_connector_iter(connector, &iter) {
10908 int id = connector->index;
10909
10910 if (id == mst_state->mgr->conn_base_id) {
10911 aconnector = to_amdgpu_dm_connector(connector);
10912 link_coding_cap = dc_link_dp_mst_decide_link_encoding_format(aconnector->dc_link);
10913 drm_dp_mst_update_coding_cap(mst_state, link_coding_cap);
10914
10915 break;
10916 }
10917 }
10918 drm_connector_list_iter_end(&iter);
10919
10920 }
10921 #endif
10922 /**
10923 * Streams and planes are reset when there are changes that affect
10924 * bandwidth. Anything that affects bandwidth needs to go through
10925 * DC global validation to ensure that the configuration can be applied
10926 * to hardware.
10927 *
10928 * We have to currently stall out here in atomic_check for outstanding
10929 * commits to finish in this case because our IRQ handlers reference
10930 * DRM state directly - we can end up disabling interrupts too early
10931 * if we don't.
10932 *
10933 * TODO: Remove this stall and drop DM state private objects.
10934 */
10935 if (lock_and_validation_needed) {
10936 ret = dm_atomic_get_state(state, &dm_state);
10937 if (ret)
10938 goto fail;
10939
10940 ret = do_aquire_global_lock(dev, state);
10941 if (ret)
10942 goto fail;
10943
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
[gfs2:for-next 4/38] fs/ntfs3/file.c:990:30: error: implicit declaration of function 'iov_iter_fault_in_readable'; did you mean 'fault_in_readable'?
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git for-next
head: 9d0084204c8a7e01f9b8ebe81402be61e0a67a62
commit: 4b03be65e2d7c2a3c7a83d28d5f9882e9dcf178d [4/38] iov_iter: Turn iov_iter_fault_in_readable into fault_in_iov_iter_readable
config: nios2-randconfig-r003-20211013 (attached as .config)
compiler: nios2-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/gfs2/linux-gfs2.git/commi...
git remote add gfs2 https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git
git fetch --no-tags gfs2 for-next
git checkout 4b03be65e2d7c2a3c7a83d28d5f9882e9dcf178d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nios2
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/kernel.h:11,
from include/linux/backing-dev.h:12,
from fs/ntfs3/file.c:10:
fs/ntfs3/file.c: In function 'ntfs_compress_write':
>> fs/ntfs3/file.c:990:30: error: implicit declaration of function 'iov_iter_fault_in_readable'; did you mean 'fault_in_readable'? [-Werror=implicit-function-declaration]
990 | if (unlikely(iov_iter_fault_in_readable(from, bytes))) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:78:45: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
cc1: some warnings being treated as errors
vim +990 fs/ntfs3/file.c
4342306f0f0d5f Konstantin Komarov 2021-08-13 863
e8b8e97f91b80f Kari Argillander 2021-08-03 864 /*
e8b8e97f91b80f Kari Argillander 2021-08-03 865 * ntfs_compress_write - Helper for ntfs_file_write_iter() (compressed files).
e8b8e97f91b80f Kari Argillander 2021-08-03 866 */
4342306f0f0d5f Konstantin Komarov 2021-08-13 867 static ssize_t ntfs_compress_write(struct kiocb *iocb, struct iov_iter *from)
4342306f0f0d5f Konstantin Komarov 2021-08-13 868 {
4342306f0f0d5f Konstantin Komarov 2021-08-13 869 int err;
4342306f0f0d5f Konstantin Komarov 2021-08-13 870 struct file *file = iocb->ki_filp;
4342306f0f0d5f Konstantin Komarov 2021-08-13 871 size_t count = iov_iter_count(from);
4342306f0f0d5f Konstantin Komarov 2021-08-13 872 loff_t pos = iocb->ki_pos;
4342306f0f0d5f Konstantin Komarov 2021-08-13 873 struct inode *inode = file_inode(file);
4342306f0f0d5f Konstantin Komarov 2021-08-13 874 loff_t i_size = inode->i_size;
4342306f0f0d5f Konstantin Komarov 2021-08-13 875 struct address_space *mapping = inode->i_mapping;
4342306f0f0d5f Konstantin Komarov 2021-08-13 876 struct ntfs_inode *ni = ntfs_i(inode);
4342306f0f0d5f Konstantin Komarov 2021-08-13 877 u64 valid = ni->i_valid;
4342306f0f0d5f Konstantin Komarov 2021-08-13 878 struct ntfs_sb_info *sbi = ni->mi.sbi;
4342306f0f0d5f Konstantin Komarov 2021-08-13 879 struct page *page, **pages = NULL;
4342306f0f0d5f Konstantin Komarov 2021-08-13 880 size_t written = 0;
4342306f0f0d5f Konstantin Komarov 2021-08-13 881 u8 frame_bits = NTFS_LZNT_CUNIT + sbi->cluster_bits;
4342306f0f0d5f Konstantin Komarov 2021-08-13 882 u32 frame_size = 1u << frame_bits;
4342306f0f0d5f Konstantin Komarov 2021-08-13 883 u32 pages_per_frame = frame_size >> PAGE_SHIFT;
4342306f0f0d5f Konstantin Komarov 2021-08-13 884 u32 ip, off;
4342306f0f0d5f Konstantin Komarov 2021-08-13 885 CLST frame;
4342306f0f0d5f Konstantin Komarov 2021-08-13 886 u64 frame_vbo;
4342306f0f0d5f Konstantin Komarov 2021-08-13 887 pgoff_t index;
4342306f0f0d5f Konstantin Komarov 2021-08-13 888 bool frame_uptodate;
4342306f0f0d5f Konstantin Komarov 2021-08-13 889
4342306f0f0d5f Konstantin Komarov 2021-08-13 890 if (frame_size < PAGE_SIZE) {
4342306f0f0d5f Konstantin Komarov 2021-08-13 891 /*
4342306f0f0d5f Konstantin Komarov 2021-08-13 892 * frame_size == 8K if cluster 512
4342306f0f0d5f Konstantin Komarov 2021-08-13 893 * frame_size == 64K if cluster 4096
4342306f0f0d5f Konstantin Komarov 2021-08-13 894 */
4342306f0f0d5f Konstantin Komarov 2021-08-13 895 ntfs_inode_warn(inode, "page size is bigger than frame size");
4342306f0f0d5f Konstantin Komarov 2021-08-13 896 return -EOPNOTSUPP;
4342306f0f0d5f Konstantin Komarov 2021-08-13 897 }
4342306f0f0d5f Konstantin Komarov 2021-08-13 898
345482bc431f64 Kari Argillander 2021-08-24 899 pages = kmalloc_array(pages_per_frame, sizeof(struct page *), GFP_NOFS);
4342306f0f0d5f Konstantin Komarov 2021-08-13 900 if (!pages)
4342306f0f0d5f Konstantin Komarov 2021-08-13 901 return -ENOMEM;
4342306f0f0d5f Konstantin Komarov 2021-08-13 902
4342306f0f0d5f Konstantin Komarov 2021-08-13 903 current->backing_dev_info = inode_to_bdi(inode);
4342306f0f0d5f Konstantin Komarov 2021-08-13 904 err = file_remove_privs(file);
4342306f0f0d5f Konstantin Komarov 2021-08-13 905 if (err)
4342306f0f0d5f Konstantin Komarov 2021-08-13 906 goto out;
4342306f0f0d5f Konstantin Komarov 2021-08-13 907
4342306f0f0d5f Konstantin Komarov 2021-08-13 908 err = file_update_time(file);
4342306f0f0d5f Konstantin Komarov 2021-08-13 909 if (err)
4342306f0f0d5f Konstantin Komarov 2021-08-13 910 goto out;
4342306f0f0d5f Konstantin Komarov 2021-08-13 911
e8b8e97f91b80f Kari Argillander 2021-08-03 912 /* Zero range [valid : pos). */
4342306f0f0d5f Konstantin Komarov 2021-08-13 913 while (valid < pos) {
4342306f0f0d5f Konstantin Komarov 2021-08-13 914 CLST lcn, clen;
4342306f0f0d5f Konstantin Komarov 2021-08-13 915
4342306f0f0d5f Konstantin Komarov 2021-08-13 916 frame = valid >> frame_bits;
4342306f0f0d5f Konstantin Komarov 2021-08-13 917 frame_vbo = valid & ~(frame_size - 1);
4342306f0f0d5f Konstantin Komarov 2021-08-13 918 off = valid & (frame_size - 1);
4342306f0f0d5f Konstantin Komarov 2021-08-13 919
4342306f0f0d5f Konstantin Komarov 2021-08-13 920 err = attr_data_get_block(ni, frame << NTFS_LZNT_CUNIT, 0, &lcn,
4342306f0f0d5f Konstantin Komarov 2021-08-13 921 &clen, NULL);
4342306f0f0d5f Konstantin Komarov 2021-08-13 922 if (err)
4342306f0f0d5f Konstantin Komarov 2021-08-13 923 goto out;
4342306f0f0d5f Konstantin Komarov 2021-08-13 924
4342306f0f0d5f Konstantin Komarov 2021-08-13 925 if (lcn == SPARSE_LCN) {
4342306f0f0d5f Konstantin Komarov 2021-08-13 926 ni->i_valid = valid =
4342306f0f0d5f Konstantin Komarov 2021-08-13 927 frame_vbo + ((u64)clen << sbi->cluster_bits);
4342306f0f0d5f Konstantin Komarov 2021-08-13 928 continue;
4342306f0f0d5f Konstantin Komarov 2021-08-13 929 }
4342306f0f0d5f Konstantin Komarov 2021-08-13 930
e8b8e97f91b80f Kari Argillander 2021-08-03 931 /* Load full frame. */
4342306f0f0d5f Konstantin Komarov 2021-08-13 932 err = ntfs_get_frame_pages(mapping, frame_vbo >> PAGE_SHIFT,
4342306f0f0d5f Konstantin Komarov 2021-08-13 933 pages, pages_per_frame,
4342306f0f0d5f Konstantin Komarov 2021-08-13 934 &frame_uptodate);
4342306f0f0d5f Konstantin Komarov 2021-08-13 935 if (err)
4342306f0f0d5f Konstantin Komarov 2021-08-13 936 goto out;
4342306f0f0d5f Konstantin Komarov 2021-08-13 937
4342306f0f0d5f Konstantin Komarov 2021-08-13 938 if (!frame_uptodate && off) {
4342306f0f0d5f Konstantin Komarov 2021-08-13 939 err = ni_read_frame(ni, frame_vbo, pages,
4342306f0f0d5f Konstantin Komarov 2021-08-13 940 pages_per_frame);
4342306f0f0d5f Konstantin Komarov 2021-08-13 941 if (err) {
4342306f0f0d5f Konstantin Komarov 2021-08-13 942 for (ip = 0; ip < pages_per_frame; ip++) {
4342306f0f0d5f Konstantin Komarov 2021-08-13 943 page = pages[ip];
4342306f0f0d5f Konstantin Komarov 2021-08-13 944 unlock_page(page);
4342306f0f0d5f Konstantin Komarov 2021-08-13 945 put_page(page);
4342306f0f0d5f Konstantin Komarov 2021-08-13 946 }
4342306f0f0d5f Konstantin Komarov 2021-08-13 947 goto out;
4342306f0f0d5f Konstantin Komarov 2021-08-13 948 }
4342306f0f0d5f Konstantin Komarov 2021-08-13 949 }
4342306f0f0d5f Konstantin Komarov 2021-08-13 950
4342306f0f0d5f Konstantin Komarov 2021-08-13 951 ip = off >> PAGE_SHIFT;
4342306f0f0d5f Konstantin Komarov 2021-08-13 952 off = offset_in_page(valid);
4342306f0f0d5f Konstantin Komarov 2021-08-13 953 for (; ip < pages_per_frame; ip++, off = 0) {
4342306f0f0d5f Konstantin Komarov 2021-08-13 954 page = pages[ip];
4342306f0f0d5f Konstantin Komarov 2021-08-13 955 zero_user_segment(page, off, PAGE_SIZE);
4342306f0f0d5f Konstantin Komarov 2021-08-13 956 flush_dcache_page(page);
4342306f0f0d5f Konstantin Komarov 2021-08-13 957 SetPageUptodate(page);
4342306f0f0d5f Konstantin Komarov 2021-08-13 958 }
4342306f0f0d5f Konstantin Komarov 2021-08-13 959
4342306f0f0d5f Konstantin Komarov 2021-08-13 960 ni_lock(ni);
4342306f0f0d5f Konstantin Komarov 2021-08-13 961 err = ni_write_frame(ni, pages, pages_per_frame);
4342306f0f0d5f Konstantin Komarov 2021-08-13 962 ni_unlock(ni);
4342306f0f0d5f Konstantin Komarov 2021-08-13 963
4342306f0f0d5f Konstantin Komarov 2021-08-13 964 for (ip = 0; ip < pages_per_frame; ip++) {
4342306f0f0d5f Konstantin Komarov 2021-08-13 965 page = pages[ip];
4342306f0f0d5f Konstantin Komarov 2021-08-13 966 SetPageUptodate(page);
4342306f0f0d5f Konstantin Komarov 2021-08-13 967 unlock_page(page);
4342306f0f0d5f Konstantin Komarov 2021-08-13 968 put_page(page);
4342306f0f0d5f Konstantin Komarov 2021-08-13 969 }
4342306f0f0d5f Konstantin Komarov 2021-08-13 970
4342306f0f0d5f Konstantin Komarov 2021-08-13 971 if (err)
4342306f0f0d5f Konstantin Komarov 2021-08-13 972 goto out;
4342306f0f0d5f Konstantin Komarov 2021-08-13 973
4342306f0f0d5f Konstantin Komarov 2021-08-13 974 ni->i_valid = valid = frame_vbo + frame_size;
4342306f0f0d5f Konstantin Komarov 2021-08-13 975 }
4342306f0f0d5f Konstantin Komarov 2021-08-13 976
e8b8e97f91b80f Kari Argillander 2021-08-03 977 /* Copy user data [pos : pos + count). */
4342306f0f0d5f Konstantin Komarov 2021-08-13 978 while (count) {
4342306f0f0d5f Konstantin Komarov 2021-08-13 979 size_t copied, bytes;
4342306f0f0d5f Konstantin Komarov 2021-08-13 980
4342306f0f0d5f Konstantin Komarov 2021-08-13 981 off = pos & (frame_size - 1);
4342306f0f0d5f Konstantin Komarov 2021-08-13 982 bytes = frame_size - off;
4342306f0f0d5f Konstantin Komarov 2021-08-13 983 if (bytes > count)
4342306f0f0d5f Konstantin Komarov 2021-08-13 984 bytes = count;
4342306f0f0d5f Konstantin Komarov 2021-08-13 985
4342306f0f0d5f Konstantin Komarov 2021-08-13 986 frame = pos >> frame_bits;
4342306f0f0d5f Konstantin Komarov 2021-08-13 987 frame_vbo = pos & ~(frame_size - 1);
4342306f0f0d5f Konstantin Komarov 2021-08-13 988 index = frame_vbo >> PAGE_SHIFT;
4342306f0f0d5f Konstantin Komarov 2021-08-13 989
4342306f0f0d5f Konstantin Komarov 2021-08-13 @990 if (unlikely(iov_iter_fault_in_readable(from, bytes))) {
4342306f0f0d5f Konstantin Komarov 2021-08-13 991 err = -EFAULT;
4342306f0f0d5f Konstantin Komarov 2021-08-13 992 goto out;
4342306f0f0d5f Konstantin Komarov 2021-08-13 993 }
4342306f0f0d5f Konstantin Komarov 2021-08-13 994
e8b8e97f91b80f Kari Argillander 2021-08-03 995 /* Load full frame. */
4342306f0f0d5f Konstantin Komarov 2021-08-13 996 err = ntfs_get_frame_pages(mapping, index, pages,
4342306f0f0d5f Konstantin Komarov 2021-08-13 997 pages_per_frame, &frame_uptodate);
4342306f0f0d5f Konstantin Komarov 2021-08-13 998 if (err)
4342306f0f0d5f Konstantin Komarov 2021-08-13 999 goto out;
4342306f0f0d5f Konstantin Komarov 2021-08-13 1000
4342306f0f0d5f Konstantin Komarov 2021-08-13 1001 if (!frame_uptodate) {
4342306f0f0d5f Konstantin Komarov 2021-08-13 1002 loff_t to = pos + bytes;
4342306f0f0d5f Konstantin Komarov 2021-08-13 1003
4342306f0f0d5f Konstantin Komarov 2021-08-13 1004 if (off || (to < i_size && (to & (frame_size - 1)))) {
4342306f0f0d5f Konstantin Komarov 2021-08-13 1005 err = ni_read_frame(ni, frame_vbo, pages,
4342306f0f0d5f Konstantin Komarov 2021-08-13 1006 pages_per_frame);
4342306f0f0d5f Konstantin Komarov 2021-08-13 1007 if (err) {
4342306f0f0d5f Konstantin Komarov 2021-08-13 1008 for (ip = 0; ip < pages_per_frame;
4342306f0f0d5f Konstantin Komarov 2021-08-13 1009 ip++) {
4342306f0f0d5f Konstantin Komarov 2021-08-13 1010 page = pages[ip];
4342306f0f0d5f Konstantin Komarov 2021-08-13 1011 unlock_page(page);
4342306f0f0d5f Konstantin Komarov 2021-08-13 1012 put_page(page);
4342306f0f0d5f Konstantin Komarov 2021-08-13 1013 }
4342306f0f0d5f Konstantin Komarov 2021-08-13 1014 goto out;
4342306f0f0d5f Konstantin Komarov 2021-08-13 1015 }
4342306f0f0d5f Konstantin Komarov 2021-08-13 1016 }
4342306f0f0d5f Konstantin Komarov 2021-08-13 1017 }
4342306f0f0d5f Konstantin Komarov 2021-08-13 1018
4342306f0f0d5f Konstantin Komarov 2021-08-13 1019 WARN_ON(!bytes);
4342306f0f0d5f Konstantin Komarov 2021-08-13 1020 copied = 0;
4342306f0f0d5f Konstantin Komarov 2021-08-13 1021 ip = off >> PAGE_SHIFT;
4342306f0f0d5f Konstantin Komarov 2021-08-13 1022 off = offset_in_page(pos);
4342306f0f0d5f Konstantin Komarov 2021-08-13 1023
e8b8e97f91b80f Kari Argillander 2021-08-03 1024 /* Copy user data to pages. */
4342306f0f0d5f Konstantin Komarov 2021-08-13 1025 for (;;) {
4342306f0f0d5f Konstantin Komarov 2021-08-13 1026 size_t cp, tail = PAGE_SIZE - off;
4342306f0f0d5f Konstantin Komarov 2021-08-13 1027
4342306f0f0d5f Konstantin Komarov 2021-08-13 1028 page = pages[ip];
4342306f0f0d5f Konstantin Komarov 2021-08-13 1029 cp = copy_page_from_iter_atomic(page, off,
4342306f0f0d5f Konstantin Komarov 2021-08-13 1030 min(tail, bytes), from);
4342306f0f0d5f Konstantin Komarov 2021-08-13 1031 flush_dcache_page(page);
4342306f0f0d5f Konstantin Komarov 2021-08-13 1032
4342306f0f0d5f Konstantin Komarov 2021-08-13 1033 copied += cp;
4342306f0f0d5f Konstantin Komarov 2021-08-13 1034 bytes -= cp;
4342306f0f0d5f Konstantin Komarov 2021-08-13 1035 if (!bytes || !cp)
4342306f0f0d5f Konstantin Komarov 2021-08-13 1036 break;
4342306f0f0d5f Konstantin Komarov 2021-08-13 1037
4342306f0f0d5f Konstantin Komarov 2021-08-13 1038 if (cp < tail) {
4342306f0f0d5f Konstantin Komarov 2021-08-13 1039 off += cp;
4342306f0f0d5f Konstantin Komarov 2021-08-13 1040 } else {
4342306f0f0d5f Konstantin Komarov 2021-08-13 1041 ip++;
4342306f0f0d5f Konstantin Komarov 2021-08-13 1042 off = 0;
4342306f0f0d5f Konstantin Komarov 2021-08-13 1043 }
4342306f0f0d5f Konstantin Komarov 2021-08-13 1044 }
4342306f0f0d5f Konstantin Komarov 2021-08-13 1045
4342306f0f0d5f Konstantin Komarov 2021-08-13 1046 ni_lock(ni);
4342306f0f0d5f Konstantin Komarov 2021-08-13 1047 err = ni_write_frame(ni, pages, pages_per_frame);
4342306f0f0d5f Konstantin Komarov 2021-08-13 1048 ni_unlock(ni);
4342306f0f0d5f Konstantin Komarov 2021-08-13 1049
4342306f0f0d5f Konstantin Komarov 2021-08-13 1050 for (ip = 0; ip < pages_per_frame; ip++) {
4342306f0f0d5f Konstantin Komarov 2021-08-13 1051 page = pages[ip];
4342306f0f0d5f Konstantin Komarov 2021-08-13 1052 ClearPageDirty(page);
4342306f0f0d5f Konstantin Komarov 2021-08-13 1053 SetPageUptodate(page);
4342306f0f0d5f Konstantin Komarov 2021-08-13 1054 unlock_page(page);
4342306f0f0d5f Konstantin Komarov 2021-08-13 1055 put_page(page);
4342306f0f0d5f Konstantin Komarov 2021-08-13 1056 }
4342306f0f0d5f Konstantin Komarov 2021-08-13 1057
4342306f0f0d5f Konstantin Komarov 2021-08-13 1058 if (err)
4342306f0f0d5f Konstantin Komarov 2021-08-13 1059 goto out;
4342306f0f0d5f Konstantin Komarov 2021-08-13 1060
4342306f0f0d5f Konstantin Komarov 2021-08-13 1061 /*
4342306f0f0d5f Konstantin Komarov 2021-08-13 1062 * We can loop for a long time in here. Be nice and allow
4342306f0f0d5f Konstantin Komarov 2021-08-13 1063 * us to schedule out to avoid softlocking if preempt
4342306f0f0d5f Konstantin Komarov 2021-08-13 1064 * is disabled.
4342306f0f0d5f Konstantin Komarov 2021-08-13 1065 */
4342306f0f0d5f Konstantin Komarov 2021-08-13 1066 cond_resched();
4342306f0f0d5f Konstantin Komarov 2021-08-13 1067
4342306f0f0d5f Konstantin Komarov 2021-08-13 1068 pos += copied;
4342306f0f0d5f Konstantin Komarov 2021-08-13 1069 written += copied;
4342306f0f0d5f Konstantin Komarov 2021-08-13 1070
4342306f0f0d5f Konstantin Komarov 2021-08-13 1071 count = iov_iter_count(from);
4342306f0f0d5f Konstantin Komarov 2021-08-13 1072 }
4342306f0f0d5f Konstantin Komarov 2021-08-13 1073
4342306f0f0d5f Konstantin Komarov 2021-08-13 1074 out:
195c52bdd5d5ec Kari Argillander 2021-08-24 1075 kfree(pages);
4342306f0f0d5f Konstantin Komarov 2021-08-13 1076
4342306f0f0d5f Konstantin Komarov 2021-08-13 1077 current->backing_dev_info = NULL;
4342306f0f0d5f Konstantin Komarov 2021-08-13 1078
4342306f0f0d5f Konstantin Komarov 2021-08-13 1079 if (err < 0)
4342306f0f0d5f Konstantin Komarov 2021-08-13 1080 return err;
4342306f0f0d5f Konstantin Komarov 2021-08-13 1081
4342306f0f0d5f Konstantin Komarov 2021-08-13 1082 iocb->ki_pos += written;
4342306f0f0d5f Konstantin Komarov 2021-08-13 1083 if (iocb->ki_pos > ni->i_valid)
4342306f0f0d5f Konstantin Komarov 2021-08-13 1084 ni->i_valid = iocb->ki_pos;
4342306f0f0d5f Konstantin Komarov 2021-08-13 1085
4342306f0f0d5f Konstantin Komarov 2021-08-13 1086 return written;
4342306f0f0d5f Konstantin Komarov 2021-08-13 1087 }
4342306f0f0d5f Konstantin Komarov 2021-08-13 1088
:::::: The code at line 990 was first introduced by commit
:::::: 4342306f0f0d5ff4315a204d315c1b51b914fca5 fs/ntfs3: Add file operations and implementation
:::::: TO: Konstantin Komarov <almaz.alexandrovich(a)paragon-software.com>
:::::: CC: Konstantin Komarov <almaz.alexandrovich(a)paragon-software.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
Re: [PATCH v5 4/7] list: Replace kernel.h with the necessary inclusions
by kernel test robot
Hi Andy,
I love your patch! Yet something to improve:
[auto build test ERROR on tip/locking/core]
[also build test ERROR on media-tree/master linux/master linus/master v5.15-rc5 next-20211013]
[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/Andy-Shevchenko/kernel-h-further...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git dd0aa2cd2e9e3e49b8c3b43924dc1a1d4e22b4d1
config: riscv-randconfig-r031-20211013 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project b6a8c695542b2987eb9a203d5663a0740cb4725f)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/0day-ci/linux/commit/4797f8ad0f7b6807a7af02543f77c0ee1...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Andy-Shevchenko/kernel-h-further-split/20211014-010532
git checkout 4797f8ad0f7b6807a7af02543f77c0ee1b340537
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv prepare
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/riscv/kernel/asm-offsets.c:10:
In file included from include/linux/sched.h:14:
In file included from include/linux/pid.h:5:
In file included from include/linux/rculist.h:11:
In file included from include/linux/rcupdate.h:28:
>> include/linux/bottom_half.h:19:24: error: use of undeclared identifier '_THIS_IP_'
__local_bh_disable_ip(_THIS_IP_, SOFTIRQ_DISABLE_OFFSET);
^
include/linux/bottom_half.h:32:23: error: use of undeclared identifier '_THIS_IP_'
__local_bh_enable_ip(_THIS_IP_, SOFTIRQ_DISABLE_OFFSET);
^
2 errors generated.
make[2]: *** [scripts/Makefile.build:121: arch/riscv/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1225: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:219: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +/_THIS_IP_ +19 include/linux/bottom_half.h
0bd3a173d71185 Peter Zijlstra 2013-11-19 16
0bd3a173d71185 Peter Zijlstra 2013-11-19 17 static inline void local_bh_disable(void)
0bd3a173d71185 Peter Zijlstra 2013-11-19 18 {
0bd3a173d71185 Peter Zijlstra 2013-11-19 @19 __local_bh_disable_ip(_THIS_IP_, SOFTIRQ_DISABLE_OFFSET);
0bd3a173d71185 Peter Zijlstra 2013-11-19 20 }
0bd3a173d71185 Peter Zijlstra 2013-11-19 21
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
Re: [PATCH 1/1] rtc: pcf85063: add support for fixed clock
by kernel test robot
Hi Alexander,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on abelloni/rtc-next]
[also build test WARNING on v5.15-rc5 next-20211013]
[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/Alexander-Stein/rtc-pcf85063-add...
base: https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next
config: x86_64-randconfig-s022-20211013 (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://github.com/0day-ci/linux/commit/9f6ceaac6d87d4d5a2a35d209d3e630ff...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Alexander-Stein/rtc-pcf85063-add-support-for-fixed-clock/20211013-155115
git checkout 9f6ceaac6d87d4d5a2a35d209d3e630ff2bdeb4b
# 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
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/rtc/rtc-pcf85063.c:492:24: sparse: sparse: Using plain integer as NULL pointer
vim +492 drivers/rtc/rtc-pcf85063.c
476
477 static struct clk *pcf85063_clkout_register_clk(struct pcf85063 *pcf85063)
478 {
479 struct clk *clk;
480 struct clk_init_data init;
481 struct device_node *node = pcf85063->rtc->dev.parent->of_node;
482 struct device_node *fixed_clock;
483
484 fixed_clock = of_get_child_by_name(node, "clock");
485 if (fixed_clock) {
486 /*
487 * skip registering square wave clock when a fixed
488 * clock has been registered. The fixed clock is
489 * registered automatically when being referenced.
490 */
491 of_node_put(fixed_clock);
> 492 return 0;
493 }
494
495 init.name = "pcf85063-clkout";
496 init.ops = &pcf85063_clkout_ops;
497 init.flags = 0;
498 init.parent_names = NULL;
499 init.num_parents = 0;
500 pcf85063->clkout_hw.init = &init;
501
502 /* optional override of the clockname */
503 of_property_read_string(node, "clock-output-names", &init.name);
504
505 /* register the clock */
506 clk = devm_clk_register(&pcf85063->rtc->dev, &pcf85063->clkout_hw);
507
508 if (!IS_ERR(clk))
509 of_clk_add_provider(node, of_clk_src_simple_get, clk);
510
511 return clk;
512 }
513 #endif
514
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week