Re: [PATCH v14 4/5] security: keys: trusted: use ASN.1 TPM2 key format for the blobs
by kernel test robot
Hi James,
I love your patch! Perhaps something to improve:
[auto build test WARNING on integrity/next-integrity]
[also build test WARNING on linus/master v5.10-rc5 next-20201127]
[cannot apply to security/next-testing dhowells-fs/fscache-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/James-Bottomley/TPM-2-0-trusted-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity.git next-integrity
config: x86_64-randconfig-m001-20201130 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
smatch warnings:
security/keys/trusted-keys/trusted_tpm2.c:331 tpm2_seal_trusted() warn: unsigned 'payload->blob_len' is never less than zero.
vim +331 security/keys/trusted-keys/trusted_tpm2.c
217
218 /**
219 * tpm2_seal_trusted() - seal the payload of a trusted key
220 *
221 * @chip: TPM chip to use
222 * @payload: the key data in clear and encrypted form
223 * @options: authentication values and other options
224 *
225 * Return: < 0 on error and 0 on success.
226 */
227 int tpm2_seal_trusted(struct tpm_chip *chip,
228 struct trusted_key_payload *payload,
229 struct trusted_key_options *options)
230 {
231 unsigned int blob_len;
232 struct tpm_buf buf;
233 u32 hash;
234 int i;
235 int rc;
236
237 for (i = 0; i < ARRAY_SIZE(tpm2_hash_map); i++) {
238 if (options->hash == tpm2_hash_map[i].crypto_id) {
239 hash = tpm2_hash_map[i].tpm_id;
240 break;
241 }
242 }
243
244 if (i == ARRAY_SIZE(tpm2_hash_map))
245 return -EINVAL;
246
247 if (!options->keyhandle)
248 return -EINVAL;
249
250 rc = tpm_buf_init(&buf, TPM2_ST_SESSIONS, TPM2_CC_CREATE);
251 if (rc)
252 return rc;
253
254 tpm_buf_append_u32(&buf, options->keyhandle);
255 tpm2_buf_append_auth(&buf, TPM2_RS_PW,
256 NULL /* nonce */, 0,
257 0 /* session_attributes */,
258 options->keyauth /* hmac */,
259 TPM_DIGEST_SIZE);
260
261 /* sensitive */
262 tpm_buf_append_u16(&buf, 4 + options->blobauth_len + payload->key_len + 1);
263
264 tpm_buf_append_u16(&buf, options->blobauth_len);
265 if (options->blobauth_len)
266 tpm_buf_append(&buf, options->blobauth, options->blobauth_len);
267
268 tpm_buf_append_u16(&buf, payload->key_len + 1);
269 tpm_buf_append(&buf, payload->key, payload->key_len);
270 tpm_buf_append_u8(&buf, payload->migratable);
271
272 /* public */
273 tpm_buf_append_u16(&buf, 14 + options->policydigest_len);
274 tpm_buf_append_u16(&buf, TPM_ALG_KEYEDHASH);
275 tpm_buf_append_u16(&buf, hash);
276
277 /* policy */
278 if (options->policydigest_len) {
279 tpm_buf_append_u32(&buf, 0);
280 tpm_buf_append_u16(&buf, options->policydigest_len);
281 tpm_buf_append(&buf, options->policydigest,
282 options->policydigest_len);
283 } else {
284 tpm_buf_append_u32(&buf, TPM2_OA_USER_WITH_AUTH);
285 tpm_buf_append_u16(&buf, 0);
286 }
287
288 /* public parameters */
289 tpm_buf_append_u16(&buf, TPM_ALG_NULL);
290 tpm_buf_append_u16(&buf, 0);
291
292 /* outside info */
293 tpm_buf_append_u16(&buf, 0);
294
295 /* creation PCR */
296 tpm_buf_append_u32(&buf, 0);
297
298 if (buf.flags & TPM_BUF_OVERFLOW) {
299 rc = -E2BIG;
300 goto out;
301 }
302
303 rc = tpm_send(chip, buf.data, tpm_buf_length(&buf));
304 if (rc)
305 goto out;
306
307 blob_len = be32_to_cpup((__be32 *) &buf.data[TPM_HEADER_SIZE]);
308 if (blob_len > MAX_BLOB_SIZE) {
309 rc = -E2BIG;
310 goto out;
311 }
312 if (tpm_buf_length(&buf) < TPM_HEADER_SIZE + 4 + blob_len) {
313 rc = -EFAULT;
314 goto out;
315 }
316
317 payload->blob_len =
318 tpm2_key_encode(payload, options,
319 &buf.data[TPM_HEADER_SIZE + 4],
320 blob_len);
321
322 out:
323 tpm_buf_destroy(&buf);
324
325 if (rc > 0) {
326 if (tpm2_rc_value(rc) == TPM2_RC_HASH)
327 rc = -EINVAL;
328 else
329 rc = -EPERM;
330 }
> 331 if (payload->blob_len < 0)
332 return payload->blob_len;
333
334 return rc;
335 }
336
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 month, 2 weeks
include/linux/spinlock.h:346:2: error: invalid type argument of unary (have 'spinlock_t' {aka 'struct spinlock'})
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fc4f28bb3daf3265d6bc5f73b497306985bb23ab
commit: de8f5e4f2dc1f032b46afda0a78cab5456974f89 lockdep: Introduce wait-type checks
date: 6 months ago
config: mips-randconfig-r011-20200916 (attached as .config)
compiler: mipsel-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
git checkout de8f5e4f2dc1f032b46afda0a78cab5456974f89
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
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/pcmcia/vrc4173_cardu.c:41:
drivers/pcmcia/vrc4173_cardu.h:239:2: error: unknown type name 'socket_cap_t'
239 | socket_cap_t cap;
| ^~~~~~~~~~~~
drivers/pcmcia/vrc4173_cardu.c:51:30: error: conflicting types for 'pcmcia_register_socket'
51 | extern struct socket_info_t *pcmcia_register_socket (int slot,
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/pcmcia/vrc4173_cardu.c:39:
include/pcmcia/ss.h:259:12: note: previous declaration of 'pcmcia_register_socket' was here
259 | extern int pcmcia_register_socket(struct pcmcia_socket *socket);
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/pcmcia/vrc4173_cardu.c:54:13: error: conflicting types for 'pcmcia_unregister_socket'
54 | extern void pcmcia_unregister_socket(struct socket_info_t *s);
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/pcmcia/vrc4173_cardu.c:39:
include/pcmcia/ss.h:260:13: note: previous declaration of 'pcmcia_unregister_socket' was here
260 | extern void pcmcia_unregister_socket(struct pcmcia_socket *socket);
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/pcmcia/vrc4173_cardu.c: In function 'cardu_init':
drivers/pcmcia/vrc4173_cardu.c:131:13: error: request for member 'features' in something not a structure or union
131 | socket->cap.features |= SS_CAP_PCCARD | SS_CAP_PAGE_REGS;
| ^
drivers/pcmcia/vrc4173_cardu.c:132:13: error: request for member 'irq_mask' in something not a structure or union
132 | socket->cap.irq_mask = 0;
| ^
drivers/pcmcia/vrc4173_cardu.c:133:13: error: request for member 'map_size' in something not a structure or union
133 | socket->cap.map_size = 0x1000;
| ^
drivers/pcmcia/vrc4173_cardu.c:134:13: error: request for member 'pci_irq' in something not a structure or union
134 | socket->cap.pci_irq = socket->dev->irq;
| ^
In file included from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/linux/stat.h:19,
from include/linux/module.h:13,
from drivers/pcmcia/vrc4173_cardu.c:32:
drivers/pcmcia/vrc4173_cardu.c:136:23: error: incompatible type for argument 1 of 'spinlock_check'
136 | spin_lock_init(socket->event_lock);
| ~~~~~~^~~~~~~~~~~~
| |
| spinlock_t {aka struct spinlock}
include/linux/spinlock.h:345:17: note: in definition of macro 'spin_lock_init'
345 | spinlock_check(_lock); \
| ^~~~~
include/linux/spinlock.h:326:67: note: expected 'spinlock_t *' {aka 'struct spinlock *'} but argument is of type 'spinlock_t' {aka 'struct spinlock'}
326 | static __always_inline raw_spinlock_t *spinlock_check(spinlock_t *lock)
| ~~~~~~~~~~~~^~~~
>> include/linux/spinlock.h:346:2: error: invalid type argument of unary '*' (have 'spinlock_t' {aka 'struct spinlock'})
346 | *(_lock) = __SPIN_LOCK_UNLOCKED(_lock); \
| ^~~~~~~~
drivers/pcmcia/vrc4173_cardu.c:136:2: note: in expansion of macro 'spin_lock_init'
136 | spin_lock_init(socket->event_lock);
| ^~~~~~~~~~~~~~
drivers/pcmcia/vrc4173_cardu.c: At top level:
drivers/pcmcia/vrc4173_cardu.c:156:52: error: unknown type name 'socket_cap_t'; did you mean 'socket_state_t'?
156 | static int cardu_inquire_socket(unsigned int sock, socket_cap_t *cap)
| ^~~~~~~~~~~~
| socket_state_t
drivers/pcmcia/vrc4173_cardu.c: In function 'cardu_get_mem_map':
drivers/pcmcia/vrc4173_cardu.c:333:5: error: 'struct pccard_mem_map' has no member named 'sys_start'
333 | mem->sys_start = start + page;
| ^~
drivers/pcmcia/vrc4173_cardu.c:334:5: error: 'struct pccard_mem_map' has no member named 'sys_stop'
334 | mem->sys_stop = start + page;
| ^~
drivers/pcmcia/vrc4173_cardu.c: In function 'cardu_set_mem_map':
drivers/pcmcia/vrc4173_cardu.c:348:17: error: 'struct pccard_mem_map' has no member named 'sys_start'
348 | sys_start = mem->sys_start;
| ^~
drivers/pcmcia/vrc4173_cardu.c:349:16: error: 'struct pccard_mem_map' has no member named 'sys_stop'
349 | sys_stop = mem->sys_stop;
| ^~
drivers/pcmcia/vrc4173_cardu.c: At top level:
drivers/pcmcia/vrc4173_cardu.c:388:12: error: initialization of 'int (*)(struct pcmcia_socket *)' from incompatible pointer type 'int (*)(unsigned int)' [-Werror=incompatible-pointer-types]
388 | .init = cardu_init,
| ^~~~~~~~~~
drivers/pcmcia/vrc4173_cardu.c:388:12: note: (near initialization for 'cardu_operations.init')
drivers/pcmcia/vrc4173_cardu.c:389:3: error: 'struct pccard_operations' has no member named 'register_callback'
389 | .register_callback = cardu_register_callback,
| ^~~~~~~~~~~~~~~~~
drivers/pcmcia/vrc4173_cardu.c:389:23: error: initialization of 'int (*)(struct pcmcia_socket *)' from incompatible pointer type 'int (*)(unsigned int, void (*)(void *, unsigned int), void *)' [-Werror=incompatible-pointer-types]
389 | .register_callback = cardu_register_callback,
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/pcmcia/vrc4173_cardu.c:389:23: note: (near initialization for 'cardu_operations.suspend')
drivers/pcmcia/vrc4173_cardu.c:390:3: error: 'struct pccard_operations' has no member named 'inquire_socket'
390 | .inquire_socket = cardu_inquire_socket,
| ^~~~~~~~~~~~~~
drivers/pcmcia/vrc4173_cardu.c:390:21: error: 'cardu_inquire_socket' undeclared here (not in a function); did you mean 'cardu_set_socket'?
390 | .inquire_socket = cardu_inquire_socket,
| ^~~~~~~~~~~~~~~~~~~~
| cardu_set_socket
drivers/pcmcia/vrc4173_cardu.c:391:17: error: initialization of 'int (*)(struct pcmcia_socket *, u_int *)' {aka 'int (*)(struct pcmcia_socket *, unsigned int *)'} from incompatible pointer type 'int (*)(unsigned int, u_int *)' {aka 'int (*)(unsigned int, unsigned int *)'} [-Werror=incompatible-pointer-types]
391 | .get_status = cardu_get_status,
| ^~~~~~~~~~~~~~~~
drivers/pcmcia/vrc4173_cardu.c:391:17: note: (near initialization for 'cardu_operations.get_status')
drivers/pcmcia/vrc4173_cardu.c:392:17: error: initialization of 'int (*)(struct pcmcia_socket *, socket_state_t *)' {aka 'int (*)(struct pcmcia_socket *, struct socket_state_t *)'} from incompatible pointer type 'int (*)(unsigned int, socket_state_t *)' {aka 'int (*)(unsigned int, struct socket_state_t *)'} [-Werror=incompatible-pointer-types]
392 | .set_socket = cardu_set_socket,
| ^~~~~~~~~~~~~~~~
drivers/pcmcia/vrc4173_cardu.c:392:17: note: (near initialization for 'cardu_operations.set_socket')
drivers/pcmcia/vrc4173_cardu.c:393:3: error: 'struct pccard_operations' has no member named 'get_io_map'; did you mean 'set_io_map'?
393 | .get_io_map = cardu_get_io_map,
| ^~~~~~~~~~
| set_io_map
drivers/pcmcia/vrc4173_cardu.c:393:17: error: initialization of 'int (*)(struct pcmcia_socket *, struct pccard_io_map *)' from incompatible pointer type 'int (*)(unsigned int, struct pccard_io_map *)' [-Werror=incompatible-pointer-types]
393 | .get_io_map = cardu_get_io_map,
| ^~~~~~~~~~~~~~~~
drivers/pcmcia/vrc4173_cardu.c:393:17: note: (near initialization for 'cardu_operations.set_io_map')
drivers/pcmcia/vrc4173_cardu.c:394:17: error: initialization of 'int (*)(struct pcmcia_socket *, struct pccard_io_map *)' from incompatible pointer type 'int (*)(unsigned int, struct pccard_io_map *)' [-Werror=incompatible-pointer-types]
394 | .set_io_map = cardu_set_io_map,
| ^~~~~~~~~~~~~~~~
drivers/pcmcia/vrc4173_cardu.c:394:17: note: (near initialization for 'cardu_operations.set_io_map')
drivers/pcmcia/vrc4173_cardu.c:394:17: warning: initialized field overwritten [-Woverride-init]
drivers/pcmcia/vrc4173_cardu.c:394:17: note: (near initialization for 'cardu_operations.set_io_map')
drivers/pcmcia/vrc4173_cardu.c:395:3: error: 'struct pccard_operations' has no member named 'get_mem_map'; did you mean 'set_mem_map'?
395 | .get_mem_map = cardu_get_mem_map,
| ^~~~~~~~~~~
| set_mem_map
drivers/pcmcia/vrc4173_cardu.c:395:18: error: initialization of 'int (*)(struct pcmcia_socket *, struct pccard_mem_map *)' from incompatible pointer type 'int (*)(unsigned int, struct pccard_mem_map *)' [-Werror=incompatible-pointer-types]
395 | .get_mem_map = cardu_get_mem_map,
| ^~~~~~~~~~~~~~~~~
drivers/pcmcia/vrc4173_cardu.c:395:18: note: (near initialization for 'cardu_operations.set_mem_map')
drivers/pcmcia/vrc4173_cardu.c:396:18: error: initialization of 'int (*)(struct pcmcia_socket *, struct pccard_mem_map *)' from incompatible pointer type 'int (*)(unsigned int, struct pccard_mem_map *)' [-Werror=incompatible-pointer-types]
396 | .set_mem_map = cardu_set_mem_map,
| ^~~~~~~~~~~~~~~~~
drivers/pcmcia/vrc4173_cardu.c:396:18: note: (near initialization for 'cardu_operations.set_mem_map')
drivers/pcmcia/vrc4173_cardu.c:396:18: warning: initialized field overwritten [-Woverride-init]
drivers/pcmcia/vrc4173_cardu.c:396:18: note: (near initialization for 'cardu_operations.set_mem_map')
drivers/pcmcia/vrc4173_cardu.c:397:3: error: 'struct pccard_operations' has no member named 'proc_setup'
397 | .proc_setup = cardu_proc_setup,
| ^~~~~~~~~~
drivers/pcmcia/vrc4173_cardu.c:397:17: warning: excess elements in struct initializer
397 | .proc_setup = cardu_proc_setup,
| ^~~~~~~~~~~~~~~~
drivers/pcmcia/vrc4173_cardu.c:397:17: note: (near initialization for 'cardu_operations')
drivers/pcmcia/vrc4173_cardu.c: In function 'cardu_interrupt':
drivers/pcmcia/vrc4173_cardu.c:448:46: error: macro "INIT_WORK" passed 3 arguments, but takes just 2
448 | INIT_WORK(&socket->tq_work, cardu_bh, socket);
| ^
In file included from include/linux/mm_types.h:16,
from include/linux/mmzone.h:21,
from include/linux/gfp.h:6,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:16,
from drivers/pcmcia/vrc4173_cardu.c:32:
include/linux/workqueue.h:249: note: macro "INIT_WORK" defined here
249 | #define INIT_WORK(_work, _func) \
|
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout de8f5e4f2dc1f032b46afda0a78cab5456974f89
vim +346 include/linux/spinlock.h
342
343 # define spin_lock_init(_lock) \
344 do { \
345 spinlock_check(_lock); \
> 346 *(_lock) = __SPIN_LOCK_UNLOCKED(_lock); \
347 } while (0)
348
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 month, 2 weeks
Re: [PATCH net-next] net: sfp: VSOL V2801F / CarlitoxxPro CPGOS03-0490 v2.0 workaround
by kernel test robot
Hi Russell,
I love your patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Russell-King/net-sfp-VSOL-V2801F...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 8e1e33ffa696b2d779dd5cd422a80960b88e508c
config: arc-randconfig-r016-20201123 (attached as .config)
compiler: arc-elf-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/90849b26224de3b2e508f1c3fa31665f4...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Russell-King/net-sfp-VSOL-V2801F-CarlitoxxPro-CPGOS03-0490-v2-0-workaround/20201124-055921
git checkout 90849b26224de3b2e508f1c3fa31665f4fd72d0a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
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/net/phy/sfp.c: In function 'sfp_i2c_read':
>> drivers/net/phy/sfp.c:339:9: warning: variable 'block_size' set but not used [-Wunused-but-set-variable]
339 | size_t block_size;
| ^~~~~~~~~~
vim +/block_size +339 drivers/net/phy/sfp.c
334
335 static int sfp_i2c_read(struct sfp *sfp, bool a2, u8 dev_addr, void *buf,
336 size_t len)
337 {
338 struct i2c_msg msgs[2];
> 339 size_t block_size;
340 size_t this_len;
341 u8 bus_addr;
342 int ret;
343
344 if (a2) {
345 block_size = 16;
346 bus_addr = 0x51;
347 } else {
348 block_size = sfp->i2c_block_size;
349 bus_addr = 0x50;
350 }
351
352 msgs[0].addr = bus_addr;
353 msgs[0].flags = 0;
354 msgs[0].len = 1;
355 msgs[0].buf = &dev_addr;
356 msgs[1].addr = bus_addr;
357 msgs[1].flags = I2C_M_RD;
358 msgs[1].len = len;
359 msgs[1].buf = buf;
360
361 while (len) {
362 this_len = len;
363 if (this_len > sfp->i2c_block_size)
364 this_len = sfp->i2c_block_size;
365
366 msgs[1].len = this_len;
367
368 ret = i2c_transfer(sfp->i2c, msgs, ARRAY_SIZE(msgs));
369 if (ret < 0)
370 return ret;
371
372 if (ret != ARRAY_SIZE(msgs))
373 break;
374
375 msgs[1].buf += this_len;
376 dev_addr += this_len;
377 len -= this_len;
378 }
379
380 return msgs[1].buf - (u8 *)buf;
381 }
382
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 month, 3 weeks
[jlayton:ceph-fscache-iter 2/7] fs/ceph/caps.c:2390:31: error: incompatible pointer types passing 'struct inode to parameter of type 'struct writeback_control
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git ceph-fscache-iter
head: 990c475d94a783c692358409a589b5f99806e3e3
commit: cd0bab0015754c448a60d3e376a1f692f2c61eea [2/7] ceph: conversion to new fscache API
config: riscv-randconfig-r003-20201130 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project dfcf1acf13226be0f599a7ab6b395b66dc9545d6)
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/jlayton/linux.git/commit/...
git remote add jlayton https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git
git fetch --no-tags jlayton ceph-fscache-iter
git checkout cd0bab0015754c448a60d3e376a1f692f2c61eea
# 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 errors (new ones prefixed by >>):
>> fs/ceph/caps.c:2390:31: error: incompatible pointer types passing 'struct inode *' to parameter of type 'struct writeback_control *' [-Werror,-Wincompatible-pointer-types]
ceph_fscache_unpin_writeback(inode, wbc);
^~~~~
fs/ceph/cache.h:139:75: note: passing argument to parameter 'wbc' here
static inline void ceph_fscache_unpin_writeback(struct writeback_control *wbc,
^
>> fs/ceph/caps.c:2390:38: error: incompatible pointer types passing 'struct writeback_control *' to parameter of type 'struct fscache_cookie *' [-Werror,-Wincompatible-pointer-types]
ceph_fscache_unpin_writeback(inode, wbc);
^~~
fs/ceph/cache.h:140:30: note: passing argument to parameter 'cookie' here
struct fscache_cookie *cookie)
^
2 errors generated.
vim +2390 fs/ceph/caps.c
2374
2375 /*
2376 * Flush any dirty caps back to the mds. If we aren't asked to wait,
2377 * queue inode for flush but don't do so immediately, because we can
2378 * get by with fewer MDS messages if we wait for data writeback to
2379 * complete first.
2380 */
2381 int ceph_write_inode(struct inode *inode, struct writeback_control *wbc)
2382 {
2383 struct ceph_inode_info *ci = ceph_inode(inode);
2384 u64 flush_tid;
2385 int err = 0;
2386 int dirty;
2387 int wait = (wbc->sync_mode == WB_SYNC_ALL && !wbc->for_sync);
2388
2389 dout("write_inode %p wait=%d\n", inode, wait);
> 2390 ceph_fscache_unpin_writeback(inode, wbc);
2391 if (wait) {
2392 dirty = try_flush_caps(inode, &flush_tid);
2393 if (dirty)
2394 err = wait_event_interruptible(ci->i_cap_wq,
2395 caps_are_flushed(inode, flush_tid));
2396 } else {
2397 struct ceph_mds_client *mdsc =
2398 ceph_sb_to_client(inode->i_sb)->mdsc;
2399
2400 spin_lock(&ci->i_ceph_lock);
2401 if (__ceph_caps_dirty(ci))
2402 __cap_delay_requeue_front(mdsc, ci);
2403 spin_unlock(&ci->i_ceph_lock);
2404 }
2405 return err;
2406 }
2407
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 month, 3 weeks
Re: [PATCH] HID: sony: Add support for tilt on guitar hero guitars
by kernel test robot
Hi,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on next-20201130]
[cannot apply to linus/master v5.10-rc6 v5.10-rc5 v5.10-rc4 v5.10-rc6]
[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/sanjay-govind9-gmail-com/HID-son...
base: c6b11acc5f85b6e11d128fad8e0b7b223aa7e33f
config: mips-randconfig-r025-20201130 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project dfcf1acf13226be0f599a7ab6b395b66dc9545d6)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://github.com/0day-ci/linux/commit/509735c24c9155c108eaef80827a1d4c4...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review sanjay-govind9-gmail-com/HID-sony-Add-support-for-tilt-on-guitar-hero-guitars/20201201-034759
git checkout 509735c24c9155c108eaef80827a1d4c48aa57e3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips
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/hid/hid-sony.c:3172:19: error: use of undeclared identifier 'USB_VENDOR_ID_SONY_GHLIVE'
{ HID_USB_DEVICE(USB_VENDOR_ID_SONY_GHLIVE, USB_DEVICE_ID_SONY_PS3WIIU_GHLIVE_DONGLE),
^
>> drivers/hid/hid-sony.c:3175:45: error: use of undeclared identifier 'USB_DEVICE_ID_ACTIVISION_GUITAR'
{ HID_USB_DEVICE(USB_VENDOR_ID_ACTIVISION, USB_DEVICE_ID_ACTIVISION_GUITAR),
^
2 errors generated.
vim +/USB_VENDOR_ID_SONY_GHLIVE +3172 drivers/hid/hid-sony.c
decd946c99f6b38 Frank Praznik 2015-11-11 3116
bd28ce008bdc68e Jiri Slaby 2008-06-25 3117 static const struct hid_device_id sony_devices[] = {
816651a7d4a3266 Antonio Ospite 2010-05-03 3118 { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER),
816651a7d4a3266 Antonio Ospite 2010-05-03 3119 .driver_data = SIXAXIS_CONTROLLER_USB },
35dca5b4a67a93b Jiri Kosina 2011-04-28 3120 { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_NAVIGATION_CONTROLLER),
4545ee0a70e49b7 Simon Wood 2015-06-17 3121 .driver_data = NAVIGATION_CONTROLLER_USB },
6eabaaa09128169 Simon Wood 2015-06-17 3122 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_NAVIGATION_CONTROLLER),
4545ee0a70e49b7 Simon Wood 2015-06-17 3123 .driver_data = NAVIGATION_CONTROLLER_BT },
c5e0c1c4950f912 Frank Praznik 2015-05-05 3124 { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_MOTION_CONTROLLER),
b3bca326fa813e4 Simon Wood 2015-06-09 3125 .driver_data = MOTION_CONTROLLER_USB },
a4afa8544d49237 Simon Wood 2015-06-03 3126 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_MOTION_CONTROLLER),
b3bca326fa813e4 Simon Wood 2015-06-09 3127 .driver_data = MOTION_CONTROLLER_BT },
816651a7d4a3266 Antonio Ospite 2010-05-03 3128 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER),
816651a7d4a3266 Antonio Ospite 2010-05-03 3129 .driver_data = SIXAXIS_CONTROLLER_BT },
cc6e0bbb47f02fd Jiri Kosina 2008-10-23 3130 { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE),
cc6e0bbb47f02fd Jiri Kosina 2008-10-23 3131 .driver_data = VAIO_RDESC_CONSTANT },
a464918419f94a0 Fernando Luis Vázquez Cao 2013-01-15 3132 { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGP_MOUSE),
a464918419f94a0 Fernando Luis Vázquez Cao 2013-01-15 3133 .driver_data = VAIO_RDESC_CONSTANT },
ef916ef5ef75fe0 Antonio Ospite 2016-02-09 3134 /*
ef916ef5ef75fe0 Antonio Ospite 2016-02-09 3135 * Wired Buzz Controller. Reported as Sony Hub from its USB ID and as
ef916ef5ef75fe0 Antonio Ospite 2016-02-09 3136 * Logitech joystick from the device descriptor.
ef916ef5ef75fe0 Antonio Ospite 2016-02-09 3137 */
f04d51404f51947 Colin Leitner 2013-05-27 3138 { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_BUZZ_CONTROLLER),
f04d51404f51947 Colin Leitner 2013-05-27 3139 .driver_data = BUZZ_CONTROLLER },
f04d51404f51947 Colin Leitner 2013-05-27 3140 { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_WIRELESS_BUZZ_CONTROLLER),
f04d51404f51947 Colin Leitner 2013-05-27 3141 .driver_data = BUZZ_CONTROLLER },
078328da5d5dfbd Jiri Kosina 2013-06-13 3142 /* PS3 BD Remote Control */
078328da5d5dfbd Jiri Kosina 2013-06-13 3143 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_BDREMOTE),
078328da5d5dfbd Jiri Kosina 2013-06-13 3144 .driver_data = PS3REMOTE },
078328da5d5dfbd Jiri Kosina 2013-06-13 3145 /* Logitech Harmony Adapter for PS3 */
078328da5d5dfbd Jiri Kosina 2013-06-13 3146 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_PS3),
078328da5d5dfbd Jiri Kosina 2013-06-13 3147 .driver_data = PS3REMOTE },
68a49e51a4a9c50 Frank Praznik 2014-11-12 3148 /* SMK-Link PS3 BD Remote Control */
68a49e51a4a9c50 Frank Praznik 2014-11-12 3149 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SMK, USB_DEVICE_ID_SMK_PS3_BDREMOTE),
68a49e51a4a9c50 Frank Praznik 2014-11-12 3150 .driver_data = PS3REMOTE },
0bd88dd3dd5e73e Frank Praznik 2014-01-11 3151 /* Sony Dualshock 4 controllers for PS4 */
0bd88dd3dd5e73e Frank Praznik 2014-01-11 3152 { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER),
8ab1676b614e4ef Frank Praznik 2014-01-16 3153 .driver_data = DUALSHOCK4_CONTROLLER_USB },
0bd88dd3dd5e73e Frank Praznik 2014-01-11 3154 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER),
8ab1676b614e4ef Frank Praznik 2014-01-16 3155 .driver_data = DUALSHOCK4_CONTROLLER_BT },
cf1015d65d7c8a5 Roderick Colenbrander 2016-10-07 3156 { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_2),
cf1015d65d7c8a5 Roderick Colenbrander 2016-10-07 3157 .driver_data = DUALSHOCK4_CONTROLLER_USB },
cf1015d65d7c8a5 Roderick Colenbrander 2016-10-07 3158 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_2),
cf1015d65d7c8a5 Roderick Colenbrander 2016-10-07 3159 .driver_data = DUALSHOCK4_CONTROLLER_BT },
de66a1a04c25f25 Roderick Colenbrander 2016-11-23 3160 { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_DONGLE),
35f436c31ea81d2 Roderick Colenbrander 2017-03-07 3161 .driver_data = DUALSHOCK4_DONGLE },
74500cc859431de Scott Moreau 2016-01-13 3162 /* Nyko Core Controller for PS3 */
74500cc859431de Scott Moreau 2016-01-13 3163 { HID_USB_DEVICE(USB_VENDOR_ID_SINO_LITE, USB_DEVICE_ID_SINO_LITE_CONTROLLER),
74500cc859431de Scott Moreau 2016-01-13 3164 .driver_data = SIXAXIS_CONTROLLER_USB | SINO_LITE_CONTROLLER },
b7289cb1cf99d43 Todd Kelner 2018-02-17 3165 /* SMK-Link NSG-MR5U Remote Control */
b7289cb1cf99d43 Todd Kelner 2018-02-17 3166 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SMK, USB_DEVICE_ID_SMK_NSG_MR5U_REMOTE),
b7289cb1cf99d43 Todd Kelner 2018-02-17 3167 .driver_data = NSG_MR5U_REMOTE_BT },
b7289cb1cf99d43 Todd Kelner 2018-02-17 3168 /* SMK-Link NSG-MR7U Remote Control */
b7289cb1cf99d43 Todd Kelner 2018-02-17 3169 { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SMK, USB_DEVICE_ID_SMK_NSG_MR7U_REMOTE),
b7289cb1cf99d43 Todd Kelner 2018-02-17 3170 .driver_data = NSG_MR7U_REMOTE_BT },
cc894ac553605c9 Pascal Giard 2020-11-25 3171 /* Guitar Hero Live PS3 and Wii U guitar dongles */
cc894ac553605c9 Pascal Giard 2020-11-25 @3172 { HID_USB_DEVICE(USB_VENDOR_ID_SONY_GHLIVE, USB_DEVICE_ID_SONY_PS3WIIU_GHLIVE_DONGLE),
509735c24c9155c Sanjay Govind 2020-12-01 3173 .driver_data = GHL_GUITAR_PS3WIIU | GH_GUITAR_CONTROLLER },
509735c24c9155c Sanjay Govind 2020-12-01 3174 /* Guitar Hero PC Guitar Dongle */
509735c24c9155c Sanjay Govind 2020-12-01 @3175 { HID_USB_DEVICE(USB_VENDOR_ID_ACTIVISION, USB_DEVICE_ID_ACTIVISION_GUITAR),
509735c24c9155c Sanjay Govind 2020-12-01 3176 .driver_data = GH_GUITAR_CONTROLLER },
509735c24c9155c Sanjay Govind 2020-12-01 3177 /* Guitar Hero PS3 World Tour Guitar Dongle */
509735c24c9155c Sanjay Govind 2020-12-01 3178 { HID_USB_DEVICE(USB_VENDOR_ID_SONY_RHYTHM, USB_DEVICE_ID_SONY_PS3_GUITAR_DONGLE),
509735c24c9155c Sanjay Govind 2020-12-01 3179 .driver_data = GH_GUITAR_CONTROLLER },
bd28ce008bdc68e Jiri Slaby 2008-06-25 3180 { }
bd28ce008bdc68e Jiri Slaby 2008-06-25 3181 };
bd28ce008bdc68e Jiri Slaby 2008-06-25 3182 MODULE_DEVICE_TABLE(hid, sony_devices);
bd28ce008bdc68e Jiri Slaby 2008-06-25 3183
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 month, 3 weeks