Re: [PATCH] V3 init/main.c Enable watchdog_thresh control from kernel line

From: Laurence Oberman
Date: Wed Oct 24 2018 - 14:40:47 EST


On Thu, 2018-10-25 at 02:23 +0800, kbuild test robot wrote:
> Hi Laurence,
>
> Thank you for the patch! Yet something to improve:
>
> [auto build test ERROR on linux-sof-driver/master]
> [also build test ERROR on v4.19 next-20181019]
> [if your patch is applied to the wrong git tree, please drop us a
> note to help improve the system]
>
> url:ÂÂÂÂhttps://github.com/0day-ci/linux/commits/Laurence-Oberman/V3-
> init-main-c-Enable-watchdog_thresh-control-from-kernel-line/20181025-
> 015902
> base:ÂÂÂhttps://github.com/thesofproject/linux master
> config: i386-tinyconfig (attached as .config)
> compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
> reproduce:
> ÂÂÂÂÂÂÂÂ# save the attached .config to linux build tree
> ÂÂÂÂÂÂÂÂmake ARCH=i386Â
>
> All errors (new ones prefixed by >>):
>
> ÂÂÂinit/main.c: In function 'is_watchdog_thresh_setup':
> > > init/main.c:1037:20: error: 'watchdog_thresh' undeclared (first
> > > use in this function); did you mean 'proc_watchdog_thresh'?
>
> ÂÂÂÂÂget_option(&str, &watchdog_thresh);
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ^~~~~~~~~~~~~~~
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂproc_watchdog_thresh
> ÂÂÂinit/main.c:1037:20: note: each undeclared identifier is reported
> only once for each function it appears in
>
> vim +1037 init/main.c
>
> Â 1033
> Â 1034 static int __init
> Â 1035 is_watchdog_thresh_setup(char *str)
> Â 1036 {
> > 1037 get_option(&str, &watchdog_thresh);
>
> Â 1038 return 1;
> Â 1039 }
> Â 1040 __setup("watchdog_thresh=", is_watchdog_thresh_setup);
> Â 1041
> Â 1042
>
> ---
> 0-DAY kernel test infrastructureÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂOpen Source
> Technology Center
> https://lists.01.org/pipermail/kbuild-allÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂIntel
> Corporation

Hello Randy

So I have tested this with no issues, it built clean multiple times
no errors and I was able to set the parameter and I have been using it
for days.

BOOT_IMAGE=(hd0,msdos1)/vmlinuz-4.18.x86_64
root=/dev/mapper/rhel_segstorage3-root ro crashkernel=512M@64M
resume=/dev/mapper/rhel_segstorage3-swap
rd.lvm.lv=rhel_segstorage3/root rd.lvm.lv=rhel_segstorage3/swap
memmap=128G!385G watchdog_thresh=60

[root@segstorage3 ~]# cd /proc/sys/kernel
[root@segstorage3 kernel]# cat watchdog_thresh
60

Do I maybe need the below to avoid the warning
extern int watchdog_thresh;

Thanks
Laurence