[RFC PATCH] bpf: bpf_sock_from_file_proto can be static
by kernel test robot
Reported-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
bpf_trace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c
index 4749575b81b2d1..c34c81095d61c1 100644
--- a/kernel/trace/bpf_trace.c
+++ b/kernel/trace/bpf_trace.c
@@ -1264,7 +1264,7 @@ BTF_ID_LIST(bpf_sock_from_file_btf_ids)
BTF_ID(struct, socket)
BTF_ID(struct, file)
-const struct bpf_func_proto bpf_sock_from_file_proto = {
+static const struct bpf_func_proto bpf_sock_from_file_proto = {
.func = bpf_sock_from_file,
.gpl_only = true,
.ret_type = RET_PTR_TO_BTF_ID_OR_NULL,
1 year, 10 months
Re: [PATCH 2/2 v4] leds: rt8515: Add Richtek RT8515 LED driver
by kernel test robot
Hi Linus,
I love your patch! Perhaps something to improve:
[auto build test WARNING on pavel-linux-leds/for-next]
[also build test WARNING on v5.10-rc3 next-20201112]
[cannot apply to j.anaszewski-leds/for-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/Linus-Walleij/dt-bindings-leds-A...
base: git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds.git for-next
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/846dcb5b5cb37582e4b8398d794c7f435...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Linus-Walleij/dt-bindings-leds-Add-DT-binding-for-Richtek-RT8515/20201112-195826
git checkout 846dcb5b5cb37582e4b8398d794c7f4352653c8a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/kernel.h:11,
from include/linux/delay.h:22,
from drivers/leds/flash/leds-rt8515.c:9:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
drivers/leds/flash/leds-rt8515.c: At top level:
>> drivers/leds/flash/leds-rt8515.c:201:6: warning: no previous prototype for 'rt8515_determine_max_intensity' [-Wmissing-prototypes]
201 | void rt8515_determine_max_intensity(struct rt8515 *rt,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/rt8515_determine_max_intensity +201 drivers/leds/flash/leds-rt8515.c
200
> 201 void rt8515_determine_max_intensity(struct rt8515 *rt,
202 struct fwnode_handle *led,
203 const char *resistance,
204 const char *max_ua_prop, int hw_max,
205 int *max_intensity_setting)
206 {
207 u32 res;
208 u32 ua;
209 u32 max_ma;
210 int max_intensity;
211 int ret1, ret2;
212
213
214 ret1 = fwnode_property_read_u32(rt->dev->fwnode, resistance, &res);
215 ret2 = fwnode_property_read_u32(led, max_ua_prop, &ua);
216
217 /* No info in DT, OK go with hardware maxima */
218 if (ret1 && ret2) {
219 max_ma = RT8515_MAX_IOUT_MA;
220 max_intensity = hw_max;
221 goto out_assign_max;
222 }
223
224 if (ret1 || ret2) {
225 dev_err(rt->dev,
226 "either %s or %s missing from DT, using HW max\n",
227 resistance, max_ua_prop);
228 max_ma = RT8515_MAX_IOUT_MA;
229 max_intensity = hw_max;
230 goto out_assign_max;
231 }
232
233 /*
234 * Formula from datasheet, this is the maximum current
235 * defined by the hardware.
236 */
237 max_ma = (5500 * 1000) / res;
238 /*
239 * Calculate max intensity (linear scaling)
240 * Formula is ((ua / 1000) / max_ma) * 100, then simplified
241 */
242 max_intensity = (ua / 10) / max_ma;
243
244 dev_info(rt->dev,
245 "current restricted from %u to %u mA, max intensity %d/100\n",
246 max_ma, (ua / 1000), max_intensity);
247
248 out_assign_max:
249 dev_info(rt->dev, "max intensity %d/%d = %d mA\n",
250 max_intensity, hw_max, max_ma);
251 *max_intensity_setting = max_intensity;
252 }
253
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
[peter.chen-usb:for-usb-next 9/9] drivers/usb/chipidea/./trace.h:39:1: sparse: sparse: incorrect type in assignment (different base types)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git for-usb-next
head: 87a6b8617a72754e38a666c9bf3bad275e1442cd
commit: 87a6b8617a72754e38a666c9bf3bad275e1442cd [9/9] usb: chipidea: add tracepoint support for udc
config: i386-randconfig-s002-20201111 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-107-gaf3512a6-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git/commit...
git remote add peter.chen-usb https://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git
git fetch --no-tags peter.chen-usb for-usb-next
git checkout 87a6b8617a72754e38a666c9bf3bad275e1442cd
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
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/usb/chipidea/trace.c: note: in included file (through include/trace/trace_events.h, include/trace/define_trace.h, drivers/usb/chipidea/trace.h):
>> drivers/usb/chipidea/./trace.h:39:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] next @@ got restricted __le32 [usertype] next @@
>> drivers/usb/chipidea/./trace.h:39:1: sparse: expected unsigned int [usertype] next
>> drivers/usb/chipidea/./trace.h:39:1: sparse: got restricted __le32 [usertype] next
>> drivers/usb/chipidea/./trace.h:39:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] token @@ got restricted __le32 [usertype] token @@
>> drivers/usb/chipidea/./trace.h:39:1: sparse: expected unsigned int [usertype] token
>> drivers/usb/chipidea/./trace.h:39:1: sparse: got restricted __le32 [usertype] token
drivers/usb/chipidea/trace.c: note: in included file (through include/trace/perf.h, include/trace/define_trace.h, drivers/usb/chipidea/trace.h):
>> drivers/usb/chipidea/./trace.h:39:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] next @@ got restricted __le32 [usertype] next @@
>> drivers/usb/chipidea/./trace.h:39:1: sparse: expected unsigned int [usertype] next
>> drivers/usb/chipidea/./trace.h:39:1: sparse: got restricted __le32 [usertype] next
>> drivers/usb/chipidea/./trace.h:39:1: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] token @@ got restricted __le32 [usertype] token @@
>> drivers/usb/chipidea/./trace.h:39:1: sparse: expected unsigned int [usertype] token
>> drivers/usb/chipidea/./trace.h:39:1: sparse: got restricted __le32 [usertype] token
vim +39 drivers/usb/chipidea/./trace.h
38
> 39 DECLARE_EVENT_CLASS(ci_log_trb,
40 TP_PROTO(struct ci_hw_ep *hwep, struct ci_hw_req *hwreq, struct td_node *td),
41 TP_ARGS(hwep, hwreq, td),
42 TP_STRUCT__entry(
43 __string(name, hwep->name)
44 __field(struct td_node *, td)
45 __field(struct usb_request *, req)
46 __field(dma_addr_t, dma)
47 __field(s32, td_remaining_size)
48 __field(u32, next)
49 __field(u32, token)
50 __field(u32, type)
51 ),
52 TP_fast_assign(
53 __assign_str(name, hwep->name);
54 __entry->req = &hwreq->req;
55 __entry->td = td;
56 __entry->dma = td->dma;
57 __entry->td_remaining_size = td->td_remaining_size;
58 __entry->next = td->ptr->next;
59 __entry->token = td->ptr->token;
60 __entry->type = usb_endpoint_type(hwep->ep.desc);
61 ),
62 TP_printk("%s: req: %p, td: %p, td_dma_address: %pad, remaining_size: %d, "
63 "next: %x, total bytes: %d, status: %lx",
64 __get_str(name), __entry->req, __entry->td, &__entry->dma,
65 __entry->td_remaining_size, __entry->next,
66 (int)((__entry->token & TD_TOTAL_BYTES) >> __ffs(TD_TOTAL_BYTES)),
67 __entry->token & TD_STATUS
68 )
69 );
70
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
[dhowells-fs:crypto-krb5 33/35] net/rxrpc/rxgk_common.h:149:13: warning: variable 'ret' set but not used
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git crypto-krb5
head: 355656a6fe584cb0b68ebc1ca2e56be073b706d0
commit: 478dc697e3d6b3a032964927e6716b5799b2d848 [33/35] rxrpc: rxgk: Implement the yfs-rxgk security class (GSSAPI)
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# 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 crypto-krb5
git checkout 478dc697e3d6b3a032964927e6716b5799b2d848
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from net/rxrpc/rxgk.c:15:
net/rxrpc/rxgk_common.h: In function 'rxgk_verify_mic_skb':
>> net/rxrpc/rxgk_common.h:149:13: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
149 | int nr_sg, ret;
| ^~~
net/rxrpc/rxgk.c: In function 'rxgk_construct_response':
>> net/rxrpc/rxgk.c:649:8: warning: variable 'p' set but not used [-Wunused-but-set-variable]
649 | void *p;
| ^
--
In file included from net/rxrpc/rxgk_app.c:15:
net/rxrpc/rxgk_common.h: In function 'rxgk_verify_mic_skb':
>> net/rxrpc/rxgk_common.h:149:13: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
149 | int nr_sg, ret;
| ^~~
vim +/ret +149 net/rxrpc/rxgk_common.h
134
135 /*
136 * Check the MIC on a region of an skbuff. The offset and length are updated
137 * to reflect the actual content of the secure region.
138 */
139 static inline
140 int rxgk_verify_mic_skb(const struct krb5_enctype *krb5,
141 struct crypto_shash *shash,
142 const struct krb5_buffer *metadata,
143 struct sk_buff *skb,
144 unsigned int *_offset, unsigned int *_len,
145 u32 *_error_code)
146 {
147 struct scatterlist sg[16];
148 size_t offset = 0, len = *_len;
> 149 int nr_sg, ret;
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
[gfs2:trusted-xattr 2/2] fs/gfs2/xattr.c:73:6: warning: no previous prototype for function 'gfs2_eatype_valid'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git trusted-xattr
head: 533310c3f8a7c01b324d68200d1578b416b681d3
commit: 533310c3f8a7c01b324d68200d1578b416b681d3 [2/2] gfs2: Add trusted xattr support
config: riscv-randconfig-r014-20201112 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project a7b65741441556d295079fc4f2391d99fd1c1111)
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://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 trusted-xattr
git checkout 533310c3f8a7c01b324d68200d1578b416b681d3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
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 >>):
#define inw(c) ({ u16 __v; __io_pbr(); __v = readw_cpu((void*)(PCI_IOBASE + (c))); __io_par(__v); __v; })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:88:76: note: expanded from macro 'readw_cpu'
#define readw_cpu(c) ({ u16 __r = le16_to_cpu((__force __le16)__raw_readw(c)); __r; })
^
include/uapi/linux/byteorder/little_endian.h:36:51: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
In file included from fs/gfs2/xattr.c:10:
In file included from include/linux/buffer_head.h:14:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:149:
include/asm-generic/io.h:572:9: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return inl(addr);
^~~~~~~~~
arch/riscv/include/asm/io.h:57:76: note: expanded from macro 'inl'
#define inl(c) ({ u32 __v; __io_pbr(); __v = readl_cpu((void*)(PCI_IOBASE + (c))); __io_par(__v); __v; })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:89:76: note: expanded from macro 'readl_cpu'
#define readl_cpu(c) ({ u32 __r = le32_to_cpu((__force __le32)__raw_readl(c)); __r; })
^
include/uapi/linux/byteorder/little_endian.h:34:51: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
In file included from fs/gfs2/xattr.c:10:
In file included from include/linux/buffer_head.h:14:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:149:
include/asm-generic/io.h:580:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outb(value, addr);
^~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:59:68: note: expanded from macro 'outb'
#define outb(v,c) ({ __io_pbw(); writeb_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:91:52: note: expanded from macro 'writeb_cpu'
#define writeb_cpu(v, c) ((void)__raw_writeb((v), (c)))
^
In file included from fs/gfs2/xattr.c:10:
In file included from include/linux/buffer_head.h:14:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:149:
include/asm-generic/io.h:588:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outw(value, addr);
^~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:60:68: note: expanded from macro 'outw'
#define outw(v,c) ({ __io_pbw(); writew_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:92:76: note: expanded from macro 'writew_cpu'
#define writew_cpu(v, c) ((void)__raw_writew((__force u16)cpu_to_le16(v), (c)))
^
In file included from fs/gfs2/xattr.c:10:
In file included from include/linux/buffer_head.h:14:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:149:
include/asm-generic/io.h:596:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outl(value, addr);
^~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:61:68: note: expanded from macro 'outl'
#define outl(v,c) ({ __io_pbw(); writel_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:93:76: note: expanded from macro 'writel_cpu'
#define writel_cpu(v, c) ((void)__raw_writel((__force u32)cpu_to_le32(v), (c)))
^
In file included from fs/gfs2/xattr.c:10:
In file included from include/linux/buffer_head.h:14:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:149:
include/asm-generic/io.h:1005:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
~~~~~~~~~~ ^
>> fs/gfs2/xattr.c:73:6: warning: no previous prototype for function 'gfs2_eatype_valid' [-Wmissing-prototypes]
bool gfs2_eatype_valid(struct gfs2_sbd *sdp, u8 type)
^
fs/gfs2/xattr.c:73:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool gfs2_eatype_valid(struct gfs2_sbd *sdp, u8 type)
^
static
8 warnings generated.
vim +/gfs2_eatype_valid +73 fs/gfs2/xattr.c
72
> 73 bool gfs2_eatype_valid(struct gfs2_sbd *sdp, u8 type)
74 {
75 switch(sdp->sd_sb.sb_fs_format) {
76 case GFS2_FORMAT_FS_MAX:
77 return true;
78
79 case GFS2_FORMAT_FS_MIN:
80 return type <= GFS2_EATYPE_SECURITY;
81
82 default:
83 return false;
84 }
85 }
86
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
[linux-rt-devel:linux-5.10.y-rt-rebase 81/248] kernel/printk/printk.c:2677:50: error: 'prb' undeclared
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-5.10.y-rt-rebase
head: 13ce1b83bb2b44f074b4fda849bb8b200adca084
commit: 8a39e6b9495a53ffa39f739971e8fad09d1ec3f7 [81/248] printk: move console printing to kthreads
config: sparc-allnoconfig (attached as .config)
compiler: sparc-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/com...
git remote add linux-rt-devel https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git
git fetch --no-tags linux-rt-devel linux-5.10.y-rt-rebase
git checkout 8a39e6b9495a53ffa39f739971e8fad09d1ec3f7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc
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 kernel/printk/printk.c:63:
kernel/printk/internal.h:56:20: warning: no previous prototype for 'vprintk_func' [-Wmissing-prototypes]
56 | __printf(1, 0) int vprintk_func(const char *fmt, va_list args) { return 0; }
| ^~~~~~~~~~~~
kernel/printk/printk.c:180:5: warning: no previous prototype for 'devkmsg_sysctl_set_loglvl' [-Wmissing-prototypes]
180 | int devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
kernel/printk/printk.c: In function 'register_console':
>> kernel/printk/printk.c:2677:50: error: 'prb' undeclared (first use in this function)
2677 | atomic64_set(&newcon->printk_seq, prb_next_seq(prb));
| ^~~
kernel/printk/printk.c:2677:50: note: each undeclared identifier is reported only once for each function it appears in
In file included from include/linux/mmzone.h:10,
from include/linux/gfp.h:6,
from include/linux/mm.h:10,
from kernel/printk/printk.c:23:
kernel/printk/printk.c: In function 'printk_kthread_func':
>> kernel/printk/printk.c:2836:36: error: 'log_wait' undeclared (first use in this function); did you mean 'poll_wait'?
2836 | error = wait_event_interruptible(log_wait,
| ^~~~~~~~
include/linux/wait.h:272:39: note: in definition of macro '___wait_event'
272 | long __int = prepare_to_wait_event(&wq_head, &__wq_entry, state);\
| ^~~~~~~
include/linux/wait.h:465:11: note: in expansion of macro '__wait_event_interruptible'
465 | __ret = __wait_event_interruptible(wq_head, condition); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/printk/printk.c:2836:11: note: in expansion of macro 'wait_event_interruptible'
2836 | error = wait_event_interruptible(log_wait,
| ^~~~~~~~~~~~~~~~~~~~~~~~
kernel/printk/printk.c:2877:7: error: implicit declaration of function 'kernel_sync_mode' [-Werror=implicit-function-declaration]
2877 | if (kernel_sync_mode() && con->write_atomic) {
| ^~~~~~~~~~~~~~~~
>> kernel/printk/printk.c:2889:4: error: implicit declaration of function 'printk_delay'; did you mean 'print_dev_t'? [-Werror=implicit-function-declaration]
2889 | printk_delay(r.info->level);
| ^~~~~~~~~~~~
| print_dev_t
kernel/printk/printk.c: In function 'console_try_thread':
>> kernel/printk/printk.c:2938:8: error: implicit declaration of function 'get_sprint_buf' [-Werror=implicit-function-declaration]
2938 | buf = get_sprint_buf(&sprint_id, &irqflags);
| ^~~~~~~~~~~~~~
kernel/printk/printk.c:2938:6: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
2938 | buf = get_sprint_buf(&sprint_id, &irqflags);
| ^
>> kernel/printk/printk.c:2942:2: error: implicit declaration of function 'print_sync_until' [-Werror=implicit-function-declaration]
2942 | print_sync_until(prb_next_seq(prb), con, buf, PREFIX_MAX + LOG_LINE_MAX);
| ^~~~~~~~~~~~~~~~
kernel/printk/printk.c:2942:32: error: 'prb' undeclared (first use in this function)
2942 | print_sync_until(prb_next_seq(prb), con, buf, PREFIX_MAX + LOG_LINE_MAX);
| ^~~
>> kernel/printk/printk.c:2944:2: error: implicit declaration of function 'put_sprint_buf' [-Werror=implicit-function-declaration]
2944 | put_sprint_buf(sprint_id, irqflags);
| ^~~~~~~~~~~~~~
kernel/printk/printk.c: At top level:
kernel/printk/printk.c:3483:6: warning: no previous prototype for 'prb_lock' [-Wmissing-prototypes]
3483 | void prb_lock(struct prb_cpulock *cpu_lock, unsigned int *cpu_store)
| ^~~~~~~~
kernel/printk/printk.c:3501:6: warning: no previous prototype for 'prb_unlock' [-Wmissing-prototypes]
3501 | void prb_unlock(struct prb_cpulock *cpu_lock, unsigned int cpu_store)
| ^~~~~~~~~~
kernel/printk/printk.c:2094:13: warning: 'call_console_drivers' defined but not used [-Wunused-function]
2094 | static void call_console_drivers(const char *ext_text, size_t ext_len,
| ^~~~~~~~~~~~~~~~~~~~
kernel/printk/printk.c:2079:12: warning: 'syslog_seq' defined but not used [-Wunused-variable]
2079 | static u64 syslog_seq;
| ^~~~~~~~~~
kernel/printk/printk.c:84:13: warning: 'sync_mode' defined but not used [-Wunused-variable]
84 | static bool sync_mode;
| ^~~~~~~~~
cc1: some warnings being treated as errors
vim +/prb +2677 kernel/printk/printk.c
2563
2564 /*
2565 * The console driver calls this routine during kernel initialization
2566 * to register the console printing procedure with printk() and to
2567 * print any messages that were printed by the kernel before the
2568 * console driver was initialized.
2569 *
2570 * This can happen pretty early during the boot process (because of
2571 * early_printk) - sometimes before setup_arch() completes - be careful
2572 * of what kernel features are used - they may not be initialised yet.
2573 *
2574 * There are two types of consoles - bootconsoles (early_printk) and
2575 * "real" consoles (everything which is not a bootconsole) which are
2576 * handled differently.
2577 * - Any number of bootconsoles can be registered at any time.
2578 * - As soon as a "real" console is registered, all bootconsoles
2579 * will be unregistered automatically.
2580 * - Once a "real" console is registered, any attempt to register a
2581 * bootconsoles will be rejected
2582 */
2583 void register_console(struct console *newcon)
2584 {
2585 struct console *bcon = NULL;
2586 int err;
2587
2588 for_each_console(bcon) {
2589 if (WARN(bcon == newcon, "console '%s%d' already registered\n",
2590 bcon->name, bcon->index))
2591 return;
2592 }
2593
2594 /*
2595 * before we register a new CON_BOOT console, make sure we don't
2596 * already have a valid console
2597 */
2598 if (newcon->flags & CON_BOOT) {
2599 for_each_console(bcon) {
2600 if (!(bcon->flags & CON_BOOT)) {
2601 pr_info("Too late to register bootconsole %s%d\n",
2602 newcon->name, newcon->index);
2603 return;
2604 }
2605 }
2606 }
2607
2608 newcon->thread = NULL;
2609
2610 if (console_drivers && console_drivers->flags & CON_BOOT)
2611 bcon = console_drivers;
2612
2613 if (!has_preferred_console || bcon || !console_drivers)
2614 has_preferred_console = preferred_console >= 0;
2615
2616 /*
2617 * See if we want to use this console driver. If we
2618 * didn't select a console we take the first one
2619 * that registers here.
2620 */
2621 if (!has_preferred_console) {
2622 if (newcon->index < 0)
2623 newcon->index = 0;
2624 if (newcon->setup == NULL ||
2625 newcon->setup(newcon, NULL) == 0) {
2626 newcon->flags |= CON_ENABLED;
2627 if (newcon->device) {
2628 newcon->flags |= CON_CONSDEV;
2629 has_preferred_console = true;
2630 }
2631 }
2632 }
2633
2634 /* See if this console matches one we selected on the command line */
2635 err = try_enable_new_console(newcon, true);
2636
2637 /* If not, try to match against the platform default(s) */
2638 if (err == -ENOENT)
2639 err = try_enable_new_console(newcon, false);
2640
2641 /* printk() messages are not printed to the Braille console. */
2642 if (err || newcon->flags & CON_BRL)
2643 return;
2644
2645 /*
2646 * If we have a bootconsole, and are switching to a real console,
2647 * don't print everything out again, since when the boot console, and
2648 * the real console are the same physical device, it's annoying to
2649 * see the beginning boot messages twice
2650 */
2651 if (bcon && ((newcon->flags & (CON_CONSDEV | CON_BOOT)) == CON_CONSDEV))
2652 newcon->flags &= ~CON_PRINTBUFFER;
2653
2654 /*
2655 * Put this console in the list - keep the
2656 * preferred driver at the head of the list.
2657 */
2658 console_lock();
2659 if ((newcon->flags & CON_CONSDEV) || console_drivers == NULL) {
2660 newcon->next = console_drivers;
2661 console_drivers = newcon;
2662 if (newcon->next)
2663 newcon->next->flags &= ~CON_CONSDEV;
2664 /* Ensure this flag is always set for the head of the list */
2665 newcon->flags |= CON_CONSDEV;
2666 } else {
2667 newcon->next = console_drivers->next;
2668 console_drivers->next = newcon;
2669 }
2670
2671 if (newcon->flags & CON_EXTENDED)
2672 nr_ext_console_drivers++;
2673
2674 if (newcon->flags & CON_PRINTBUFFER)
2675 atomic64_set(&newcon->printk_seq, 0);
2676 else
> 2677 atomic64_set(&newcon->printk_seq, prb_next_seq(prb));
2678
2679 console_try_thread(newcon);
2680 console_unlock();
2681 console_sysfs_notify();
2682
2683 /*
2684 * By unregistering the bootconsoles after we enable the real console
2685 * we get the "console xxx enabled" message on all the consoles -
2686 * boot consoles, real consoles, etc - this is to ensure that end
2687 * users know there might be something in the kernel's log buffer that
2688 * went to the bootconsole (that they do not see on the real console)
2689 */
2690 pr_info("%sconsole [%s%d] enabled\n",
2691 (newcon->flags & CON_BOOT) ? "boot" : "" ,
2692 newcon->name, newcon->index);
2693 if (bcon &&
2694 ((newcon->flags & (CON_CONSDEV | CON_BOOT)) == CON_CONSDEV) &&
2695 !keep_bootcon) {
2696 /* We need to iterate through all boot consoles, to make
2697 * sure we print everything out, before we unregister them.
2698 */
2699 for_each_console(bcon)
2700 if (bcon->flags & CON_BOOT)
2701 unregister_console(bcon);
2702 }
2703 }
2704 EXPORT_SYMBOL(register_console);
2705
2706 int unregister_console(struct console *console)
2707 {
2708 struct console *con;
2709 int res;
2710
2711 pr_info("%sconsole [%s%d] disabled\n",
2712 (console->flags & CON_BOOT) ? "boot" : "" ,
2713 console->name, console->index);
2714
2715 res = _braille_unregister_console(console);
2716 if (res < 0)
2717 return res;
2718 if (res > 0)
2719 return 0;
2720
2721 res = -ENODEV;
2722 console_lock();
2723 if (console_drivers == console) {
2724 console_drivers=console->next;
2725 res = 0;
2726 } else {
2727 for_each_console(con) {
2728 if (con->next == console) {
2729 con->next = console->next;
2730 res = 0;
2731 break;
2732 }
2733 }
2734 }
2735
2736 if (res)
2737 goto out_disable_unlock;
2738
2739 if (console->flags & CON_EXTENDED)
2740 nr_ext_console_drivers--;
2741
2742 /*
2743 * If this isn't the last console and it has CON_CONSDEV set, we
2744 * need to set it on the next preferred console.
2745 */
2746 if (console_drivers != NULL && console->flags & CON_CONSDEV)
2747 console_drivers->flags |= CON_CONSDEV;
2748
2749 console->flags &= ~CON_ENABLED;
2750 console_unlock();
2751 console_sysfs_notify();
2752
2753 if (console->thread && !IS_ERR(console->thread))
2754 kthread_stop(console->thread);
2755
2756 if (console->exit)
2757 res = console->exit(console);
2758
2759 return res;
2760
2761 out_disable_unlock:
2762 console->flags &= ~CON_ENABLED;
2763 console_unlock();
2764
2765 return res;
2766 }
2767 EXPORT_SYMBOL(unregister_console);
2768
2769 /*
2770 * Initialize the console device. This is called *early*, so
2771 * we can't necessarily depend on lots of kernel help here.
2772 * Just do some early initializations, and do the complex setup
2773 * later.
2774 */
2775 void __init console_init(void)
2776 {
2777 int ret;
2778 initcall_t call;
2779 initcall_entry_t *ce;
2780
2781 /* Setup the default TTY line discipline. */
2782 n_tty_init();
2783
2784 /*
2785 * set up the console device so that later boot sequences can
2786 * inform about problems etc..
2787 */
2788 ce = __con_initcall_start;
2789 trace_initcall_level("console");
2790 while (ce < __con_initcall_end) {
2791 call = initcall_from_entry(ce);
2792 trace_initcall_start(call);
2793 ret = call();
2794 trace_initcall_finish(call, ret);
2795 ce++;
2796 }
2797 }
2798
2799 static int printk_kthread_func(void *data)
2800 {
2801 struct console *con = data;
2802 unsigned long dropped = 0;
2803 struct printk_info info;
2804 struct printk_record r;
2805 char *ext_text = NULL;
2806 size_t dropped_len;
2807 char *dropped_text;
2808 int ret = -ENOMEM;
2809 char *write_text;
2810 u64 printk_seq;
2811 size_t len;
2812 char *text;
2813 int error;
2814 u64 seq;
2815
2816 if (con->flags & CON_EXTENDED) {
2817 ext_text = kmalloc(CONSOLE_EXT_LOG_MAX, GFP_KERNEL);
2818 if (!ext_text)
2819 return ret;
2820 }
2821 text = kmalloc(LOG_LINE_MAX + PREFIX_MAX, GFP_KERNEL);
2822 dropped_text = kmalloc(64, GFP_KERNEL);
2823 if (!text || !dropped_text)
2824 goto out;
2825
2826 if (con->flags & CON_EXTENDED)
2827 write_text = ext_text;
2828 else
2829 write_text = text;
2830
2831 seq = atomic64_read(&con->printk_seq);
2832
2833 prb_rec_init_rd(&r, &info, text, LOG_LINE_MAX + PREFIX_MAX);
2834
2835 for (;;) {
> 2836 error = wait_event_interruptible(log_wait,
2837 prb_read_valid(prb, seq, &r) || kthread_should_stop());
2838
2839 if (kthread_should_stop())
2840 break;
2841
2842 if (error)
2843 continue;
2844
2845 if (seq != r.info->seq) {
2846 dropped += r.info->seq - seq;
2847 seq = r.info->seq;
2848 }
2849
2850 seq++;
2851
2852 if (!(con->flags & CON_ENABLED))
2853 continue;
2854
2855 if (suppress_message_printing(r.info->level))
2856 continue;
2857
2858 if (con->flags & CON_EXTENDED) {
2859 len = info_print_ext_header(ext_text,
2860 CONSOLE_EXT_LOG_MAX,
2861 r.info);
2862 len += msg_print_ext_body(ext_text + len,
2863 CONSOLE_EXT_LOG_MAX - len,
2864 &r.text_buf[0], r.info->text_len,
2865 &r.info->dev_info);
2866 } else {
2867 len = record_print_text(&r,
2868 console_msg_format & MSG_FORMAT_SYSLOG,
2869 printk_time);
2870 }
2871
2872 printk_seq = atomic64_read(&con->printk_seq);
2873
2874 console_lock();
2875 console_may_schedule = 0;
2876
2877 if (kernel_sync_mode() && con->write_atomic) {
2878 console_unlock();
2879 break;
2880 }
2881
2882 if (!(con->flags & CON_EXTENDED) && dropped) {
2883 dropped_len = snprintf(dropped_text, 64,
2884 "** %lu printk messages dropped **\n",
2885 dropped);
2886 dropped = 0;
2887
2888 con->write(con, dropped_text, dropped_len);
2889 printk_delay(r.info->level);
2890 }
2891
2892 con->write(con, write_text, len);
2893 if (len)
2894 printk_delay(r.info->level);
2895
2896 atomic64_cmpxchg_relaxed(&con->printk_seq, printk_seq, seq);
2897
2898 console_unlock();
2899 }
2900 out:
2901 kfree(dropped_text);
2902 kfree(text);
2903 kfree(ext_text);
2904 pr_info("%sconsole [%s%d]: printing thread stopped\n",
2905 (con->flags & CON_BOOT) ? "boot" : "" ,
2906 con->name, con->index);
2907 return ret;
2908 }
2909
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
[jwboyer-fedora:f33 28/56] drivers/gpu/drm/panel/panel-xingbangda-xbd599.c:221:3: error: 'const struct drm_display_mode' has no member named 'vrefresh'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git f33
head: 6de83ecc0a48199994905c8359bd885376de0925
commit: cdb0a87d6dc58cbfe6872c8d87e468acd68c9687 [28/56] drm: panel: add Xingbangda XBD599 panel
config: s390-allyesconfig (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git/commit...
git remote add jwboyer-fedora https://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git
git fetch --no-tags jwboyer-fedora f33
git checkout cdb0a87d6dc58cbfe6872c8d87e468acd68c9687
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/gpu/drm/panel/panel-xingbangda-xbd599.c:221:3: error: 'const struct drm_display_mode' has no member named 'vrefresh'
221 | .vrefresh = 60,
| ^~~~~~~~
In file included from drivers/gpu/drm/panel/panel-xingbangda-xbd599.c:21:
drivers/gpu/drm/panel/panel-xingbangda-xbd599.c: In function 'xbd599_probe':
drivers/gpu/drm/panel/panel-xingbangda-xbd599.c:313:27: error: 'const struct drm_display_mode' has no member named 'vrefresh'
313 | xbd599_default_mode.vrefresh,
| ^
include/drm/drm_print.h:366:40: note: in definition of macro 'DRM_DEV_INFO'
366 | drm_dev_printk(dev, KERN_INFO, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
vim +221 drivers/gpu/drm/panel/panel-xingbangda-xbd599.c
211
212 static const struct drm_display_mode xbd599_default_mode = {
213 .hdisplay = 720,
214 .hsync_start = 720 + 40,
215 .hsync_end = 720 + 40 + 40,
216 .htotal = 720 + 40 + 40 + 40,
217 .vdisplay = 1440,
218 .vsync_start = 1440 + 18,
219 .vsync_end = 1440 + 18 + 10,
220 .vtotal = 1440 + 18 + 10 + 17,
> 221 .vrefresh = 60,
222 .clock = 69000,
223 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
224
225 .width_mm = 68,
226 .height_mm = 136,
227 .type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
228 };
229
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months