[intel-linux-intel-lts:5.4/yocto 120/1142] drivers/misc/vpusmm/vpusmm_driver.c:274 vpusmm_session_unimport_dmabuf() warn: inconsistent indenting
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: eeb611e5394c56d45c5cc8f7dc484c9f19e93143
commit: 2c4a98833ded50c324a6c5e7c949f93cca137acf [120/1142] misc: vpusmm: add alloc/import DMABuf for VPU
config: i386-randconfig-m021-20201211 (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>
New smatch warnings:
drivers/misc/vpusmm/vpusmm_driver.c:274 vpusmm_session_unimport_dmabuf() warn: inconsistent indenting
drivers/misc/vpusmm/vpusmm_driver.c:301 vpusmm_open() warn: passing zero to 'PTR_ERR'
drivers/misc/vpusmm/vpusmm_driver.c:842 vpusmm_probe() warn: passing zero to 'PTR_ERR'
drivers/misc/vpusmm/vpusmm_driver.c:1047 vpusmm_init() warn: passing zero to 'PTR_ERR'
Old smatch warnings:
drivers/misc/vpusmm/vpusmm_driver.c:1061 vpusmm_init() warn: passing zero to 'PTR_ERR'
vim +274 drivers/misc/vpusmm/vpusmm_driver.c
265
266
267 static void vpusmm_session_unimport_dmabuf(
268 struct vpusmm_session *sess,
269 struct dma_buf *dmabuf)
270 {
271 struct vpusmm_imported_dmabuf *item = NULL;
272
273 mutex_lock(&sess->imp_rb_lock);
> 274 item = vpusmm_session_find_imp_dmabuf(sess, dmabuf);
275 if (item) {
276 item->refcount--;
277 if (item->refcount <= 0) {
278 rb_erase(&item->node, &sess->imp_rb);
279 dma_buf_unmap_attachment(item->attach, item->sgt, item->direction);
280 dma_buf_detach(item->dmabuf, item->attach);
281 dma_buf_put(item->dmabuf);
282 kfree(item);
283 }
284 }
285 mutex_unlock(&sess->imp_rb_lock);
286 }
287
288 /******************************
289 * driver's open/release fops *
290 ******************************/
291 static int vpusmm_open(struct inode *inode, struct file *filp)
292 {
293 int retval = 0;
294 struct vpusmm_session *sess;
295 struct vpusmm_device *dev;
296
297 dev = container_of(inode->i_cdev, struct vpusmm_device, cdev);
298
299 sess = kzalloc(sizeof(*sess), GFP_KERNEL);
300 if (IS_ERR_OR_NULL(sess)) {
> 301 retval = PTR_ERR(sess);
302 sess = NULL;
303 goto failed;
304 }
305 sess->dev = dev;
306 sess->imp_rb = RB_ROOT;
307
308 mutex_init(&sess->imp_rb_lock);
309
310 // create session
311 filp->private_data = sess;
312
313 return retval;
314 failed:
315 return retval;
316 }
317
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[android-common:android-mainline 2/2] drivers/md/dm-user.c:525:6: warning: no previous prototype for function 'message_kill'
by kernel test robot
tree: https://android.googlesource.com/kernel/common android-mainline
head: 83bf345abc0bc06b98e906bfbb120a52446e1c43
commit: 83bf345abc0bc06b98e906bfbb120a52446e1c43 [2/2] ANDROID: dm: dm-user: New target that proxies BIOs to userspace
config: arm-randconfig-r025-20201209 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 5ff35356f1af2bb92785b38c657463924d9ec386)
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
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android-mainline
git checkout 83bf345abc0bc06b98e906bfbb120a52446e1c43
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/md/dm-user.c:525:6: warning: no previous prototype for function 'message_kill' [-Wmissing-prototypes]
void message_kill(struct message *m, mempool_t *pool)
^
drivers/md/dm-user.c:525:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void message_kill(struct message *m, mempool_t *pool)
^
static
>> drivers/md/dm-user.c:539:5: warning: no previous prototype for function 'target_poll' [-Wmissing-prototypes]
int target_poll(struct target *t)
^
drivers/md/dm-user.c:539:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int target_poll(struct target *t)
^
static
>> drivers/md/dm-user.c:544:6: warning: no previous prototype for function 'target_release' [-Wmissing-prototypes]
void target_release(struct kref *ref)
^
drivers/md/dm-user.c:544:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void target_release(struct kref *ref)
^
static
>> drivers/md/dm-user.c:565:6: warning: no previous prototype for function 'target_put' [-Wmissing-prototypes]
void target_put(struct target *t)
^
drivers/md/dm-user.c:565:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void target_put(struct target *t)
^
static
>> drivers/md/dm-user.c:578:17: warning: no previous prototype for function 'channel_alloc' [-Wmissing-prototypes]
struct channel *channel_alloc(struct target *t)
^
drivers/md/dm-user.c:578:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
struct channel *channel_alloc(struct target *t)
^
static
>> drivers/md/dm-user.c:596:6: warning: no previous prototype for function 'channel_free' [-Wmissing-prototypes]
void channel_free(struct channel *c)
^
drivers/md/dm-user.c:596:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void channel_free(struct channel *c)
^
static
drivers/md/dm-user.c:181:30: warning: unused function 'target_from_miscdev' [-Wunused-function]
static inline struct target *target_from_miscdev(struct miscdevice *miscdev)
^
7 warnings generated.
vim +/message_kill +525 drivers/md/dm-user.c
524
> 525 void message_kill(struct message *m, mempool_t *pool)
526 {
527 m->bio->bi_status = BLK_STS_IOERR;
528 bio_endio(m->bio);
529 bio_put(m->bio);
530 mempool_free(m, pool);
531 }
532
533 /*
534 * Returns 0 when there is no work left to do. This must be callable without
535 * holding the target lock, as it is part of the waitqueue's check expression.
536 * When called without the lock it may spuriously indicate there is remaining
537 * work, but when called with the lock it must be accurate.
538 */
> 539 int target_poll(struct target *t)
540 {
541 return !list_empty(&t->to_user) || t->dm_destroyed;
542 }
543
> 544 void target_release(struct kref *ref)
545 {
546 struct target *t = container_of(ref, struct target, references);
547 struct list_head *cur;
548
549 /*
550 * There may be outstanding BIOs that have not yet been given to
551 * userspace. At this point there's nothing we can do about them, as
552 * there are and will never be any channels.
553 */
554 list_for_each (cur, &t->to_user) {
555 message_kill(list_entry(cur, struct message, to_user),
556 &t->message_pool);
557 }
558
559 mempool_exit(&t->message_pool);
560 mutex_unlock(&t->lock);
561 mutex_destroy(&t->lock);
562 kfree(t);
563 }
564
> 565 void target_put(struct target *t)
566 {
567 /*
568 * This both releases a reference to the target and the lock. We leave
569 * it up to the caller to hold the lock, as they probably needed it for
570 * something else.
571 */
572 lockdep_assert_held(&t->lock);
573
574 if (!kref_put(&t->references, target_release))
575 mutex_unlock(&t->lock);
576 }
577
> 578 struct channel *channel_alloc(struct target *t)
579 {
580 struct channel *c;
581
582 lockdep_assert_held(&t->lock);
583
584 c = kzalloc(sizeof(*c), GFP_KERNEL);
585 if (c == NULL)
586 return NULL;
587
588 kref_get(&t->references);
589 c->target = t;
590 c->cur_from_user = &c->scratch_message_from_user;
591 mutex_init(&c->lock);
592 INIT_LIST_HEAD(&c->from_user);
593 return c;
594 }
595
> 596 void channel_free(struct channel *c)
597 {
598 struct list_head *cur;
599
600 lockdep_assert_held(&c->lock);
601
602 /*
603 * There may be outstanding BIOs that have been given to userspace but
604 * have not yet been completed. The channel has been shut down so
605 * there's no way to process the rest of those messages, so we just go
606 * ahead and error out the BIOs. Hopefully whatever's on the other end
607 * can handle the errors. One could imagine splitting the BIOs and
608 * completing as much as we got, but that seems like overkill here.
609 *
610 * Our only other options would be to let the BIO hang around (which
611 * seems way worse) or to resubmit it to userspace in the hope there's
612 * another channel. I don't really like the idea of submitting a
613 * message twice.
614 */
615 if (c->cur_to_user != NULL)
616 message_kill(c->cur_to_user, &c->target->message_pool);
617 if (c->cur_from_user != &c->scratch_message_from_user)
618 message_kill(c->cur_from_user, &c->target->message_pool);
619 list_for_each (cur, &c->from_user)
620 message_kill(list_entry(cur, struct message, to_user),
621 &c->target->message_pool);
622
623 mutex_lock(&c->target->lock);
624 target_put(c->target);
625 mutex_unlock(&c->lock);
626 mutex_destroy(&c->lock);
627 kfree(c);
628 }
629
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
Re: [PATCH net-next v2] inet_ecn: Use csum16_add() helper for IP_ECN_set_* helpers
by kernel test robot
Hi "Toke,
I love your patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Toke-H-iland-J-rgensen/inet_ecn-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 51e13685bd93654e0e9b2559c8e103d6545ddf95
config: i386-randconfig-s001-20201209 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-179-ga00755aa-dirty
# https://github.com/0day-ci/linux/commit/30ca3d0f48b3d72f9ca0a3509eb639564...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Toke-H-iland-J-rgensen/inet_ecn-Use-csum16_add-helper-for-IP_ECN_set_-helpers/20201211-071305
git checkout 30ca3d0f48b3d72f9ca0a3509eb63956484d02ad
# 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 >>)"
net/sched/sch_fq.c: note: in included file (through include/net/tcp.h):
include/net/inet_ecn.h:97:21: sparse: sparse: restricted __be16 degrades to integer
include/net/inet_ecn.h:97:37: sparse: sparse: restricted __be16 degrades to integer
>> include/net/inet_ecn.h:97:19: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] check_add @@ got int @@
include/net/inet_ecn.h:97:19: sparse: expected restricted __be16 [usertype] check_add
include/net/inet_ecn.h:97:19: sparse: got int
--
net/sched/sch_sfq.c: note: in included file (through include/net/red.h):
include/net/inet_ecn.h:97:21: sparse: sparse: restricted __be16 degrades to integer
include/net/inet_ecn.h:97:37: sparse: sparse: restricted __be16 degrades to integer
>> include/net/inet_ecn.h:97:19: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] check_add @@ got int @@
include/net/inet_ecn.h:97:19: sparse: expected restricted __be16 [usertype] check_add
include/net/inet_ecn.h:97:19: sparse: got int
include/net/inet_ecn.h:97:21: sparse: sparse: restricted __be16 degrades to integer
include/net/inet_ecn.h:97:37: sparse: sparse: restricted __be16 degrades to integer
>> include/net/inet_ecn.h:97:19: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] check_add @@ got int @@
include/net/inet_ecn.h:97:19: sparse: expected restricted __be16 [usertype] check_add
include/net/inet_ecn.h:97:19: sparse: got int
include/net/inet_ecn.h:97:21: sparse: sparse: restricted __be16 degrades to integer
include/net/inet_ecn.h:97:37: sparse: sparse: restricted __be16 degrades to integer
>> include/net/inet_ecn.h:97:19: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] check_add @@ got int @@
include/net/inet_ecn.h:97:19: sparse: expected restricted __be16 [usertype] check_add
include/net/inet_ecn.h:97:19: sparse: got int
include/net/inet_ecn.h:97:21: sparse: sparse: restricted __be16 degrades to integer
include/net/inet_ecn.h:97:37: sparse: sparse: restricted __be16 degrades to integer
>> include/net/inet_ecn.h:97:19: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] check_add @@ got int @@
include/net/inet_ecn.h:97:19: sparse: expected restricted __be16 [usertype] check_add
include/net/inet_ecn.h:97:19: sparse: got int
--
net/sched/sch_sfb.c: note: in included file:
include/net/inet_ecn.h:97:21: sparse: sparse: restricted __be16 degrades to integer
include/net/inet_ecn.h:97:37: sparse: sparse: restricted __be16 degrades to integer
>> include/net/inet_ecn.h:97:19: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] check_add @@ got int @@
include/net/inet_ecn.h:97:19: sparse: expected restricted __be16 [usertype] check_add
include/net/inet_ecn.h:97:19: sparse: got int
--
net/sched/sch_fq_codel.c: note: in included file (through include/net/codel.h):
include/net/inet_ecn.h:97:21: sparse: sparse: restricted __be16 degrades to integer
include/net/inet_ecn.h:97:37: sparse: sparse: restricted __be16 degrades to integer
>> include/net/inet_ecn.h:97:19: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] check_add @@ got int @@
include/net/inet_ecn.h:97:19: sparse: expected restricted __be16 [usertype] check_add
include/net/inet_ecn.h:97:19: sparse: got int
include/net/inet_ecn.h:97:21: sparse: sparse: restricted __be16 degrades to integer
include/net/inet_ecn.h:97:37: sparse: sparse: restricted __be16 degrades to integer
>> include/net/inet_ecn.h:97:19: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] check_add @@ got int @@
include/net/inet_ecn.h:97:19: sparse: expected restricted __be16 [usertype] check_add
include/net/inet_ecn.h:97:19: sparse: got int
include/net/inet_ecn.h:97:21: sparse: sparse: restricted __be16 degrades to integer
include/net/inet_ecn.h:97:37: sparse: sparse: restricted __be16 degrades to integer
>> include/net/inet_ecn.h:97:19: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] check_add @@ got int @@
include/net/inet_ecn.h:97:19: sparse: expected restricted __be16 [usertype] check_add
include/net/inet_ecn.h:97:19: sparse: got int
--
net/sched/sch_choke.c: note: in included file:
include/net/inet_ecn.h:97:21: sparse: sparse: restricted __be16 degrades to integer
include/net/inet_ecn.h:97:37: sparse: sparse: restricted __be16 degrades to integer
>> include/net/inet_ecn.h:97:19: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] check_add @@ got int @@
include/net/inet_ecn.h:97:19: sparse: expected restricted __be16 [usertype] check_add
include/net/inet_ecn.h:97:19: sparse: got int
include/net/inet_ecn.h:97:21: sparse: sparse: restricted __be16 degrades to integer
include/net/inet_ecn.h:97:37: sparse: sparse: restricted __be16 degrades to integer
>> include/net/inet_ecn.h:97:19: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] check_add @@ got int @@
include/net/inet_ecn.h:97:19: sparse: expected restricted __be16 [usertype] check_add
include/net/inet_ecn.h:97:19: sparse: got int
--
net/sched/sch_codel.c: note: in included file (through include/net/codel.h):
include/net/inet_ecn.h:97:21: sparse: sparse: restricted __be16 degrades to integer
include/net/inet_ecn.h:97:37: sparse: sparse: restricted __be16 degrades to integer
>> include/net/inet_ecn.h:97:19: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] check_add @@ got int @@
include/net/inet_ecn.h:97:19: sparse: expected restricted __be16 [usertype] check_add
include/net/inet_ecn.h:97:19: sparse: got int
include/net/inet_ecn.h:97:21: sparse: sparse: restricted __be16 degrades to integer
include/net/inet_ecn.h:97:37: sparse: sparse: restricted __be16 degrades to integer
>> include/net/inet_ecn.h:97:19: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] check_add @@ got int @@
include/net/inet_ecn.h:97:19: sparse: expected restricted __be16 [usertype] check_add
include/net/inet_ecn.h:97:19: sparse: got int
include/net/inet_ecn.h:97:21: sparse: sparse: restricted __be16 degrades to integer
include/net/inet_ecn.h:97:37: sparse: sparse: restricted __be16 degrades to integer
>> include/net/inet_ecn.h:97:19: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] check_add @@ got int @@
include/net/inet_ecn.h:97:19: sparse: expected restricted __be16 [usertype] check_add
include/net/inet_ecn.h:97:19: sparse: got int
--
net/sched/sch_red.c: note: in included file:
include/net/inet_ecn.h:97:21: sparse: sparse: restricted __be16 degrades to integer
include/net/inet_ecn.h:97:37: sparse: sparse: restricted __be16 degrades to integer
>> include/net/inet_ecn.h:97:19: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] check_add @@ got int @@
include/net/inet_ecn.h:97:19: sparse: expected restricted __be16 [usertype] check_add
include/net/inet_ecn.h:97:19: sparse: got int
include/net/inet_ecn.h:97:21: sparse: sparse: restricted __be16 degrades to integer
include/net/inet_ecn.h:97:37: sparse: sparse: restricted __be16 degrades to integer
>> include/net/inet_ecn.h:97:19: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] check_add @@ got int @@
include/net/inet_ecn.h:97:19: sparse: expected restricted __be16 [usertype] check_add
include/net/inet_ecn.h:97:19: sparse: got int
--
net/sched/sch_netem.c: note: in included file:
include/net/inet_ecn.h:97:21: sparse: sparse: restricted __be16 degrades to integer
include/net/inet_ecn.h:97:37: sparse: sparse: restricted __be16 degrades to integer
>> include/net/inet_ecn.h:97:19: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] check_add @@ got int @@
include/net/inet_ecn.h:97:19: sparse: expected restricted __be16 [usertype] check_add
include/net/inet_ecn.h:97:19: sparse: got int
vim +97 include/net/inet_ecn.h
67
68 #define IP6_ECN_flow_init(label) do { \
69 (label) &= ~htonl(INET_ECN_MASK << 20); \
70 } while (0)
71
72 #define IP6_ECN_flow_xmit(sk, label) do { \
73 if (INET_ECN_is_capable(inet6_sk(sk)->tclass)) \
74 (label) |= htonl(INET_ECN_ECT_0 << 20); \
75 } while (0)
76
77 static inline int IP_ECN_set_ce(struct iphdr *iph)
78 {
79 u32 ecn = (iph->tos + 1) & INET_ECN_MASK;
80 __be16 check_add;
81
82 /*
83 * After the last operation we have (in binary):
84 * INET_ECN_NOT_ECT => 01
85 * INET_ECN_ECT_1 => 10
86 * INET_ECN_ECT_0 => 11
87 * INET_ECN_CE => 00
88 */
89 if (!(ecn & 2))
90 return !ecn;
91
92 /*
93 * The following gives us:
94 * INET_ECN_ECT_1 => check += htons(0xFFFD)
95 * INET_ECN_ECT_0 => check += htons(0xFFFE)
96 */
> 97 check_add = htons(0xFFFB) + htons(ecn);
98
99 iph->check = csum16_add(iph->check, check_add);
100 iph->tos |= INET_ECN_CE;
101 return 1;
102 }
103
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[radeon-alex:amd-staging-drm-next 534/912] drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:904:6: warning: old-style function definition
by kernel test robot
Hi Prike,
FYI, the error/warning still remains.
tree: git://people.freedesktop.org/~agd5f/linux.git amd-staging-drm-next
head: 82811178dacd6530cb2702e97e9c25f253c61a6b
commit: 16cf2b67735cdd2f97aade032f8d720c8b089523 [534/912] drm/amdgpu: add s0i3 capacity check for s0i3 routine
config: i386-randconfig-r005-20201210 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
git remote add radeon-alex git://people.freedesktop.org/~agd5f/linux.git
git fetch --no-tags radeon-alex amd-staging-drm-next
git checkout 16cf2b67735cdd2f97aade032f8d720c8b089523
# save the attached .config to linux build tree
make 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 >>):
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c: In function 'amdgpu_acpi_is_s0ix_supported':
>> drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c:904:6: warning: old-style function definition [-Wold-style-definition]
904 | bool amdgpu_acpi_is_s0ix_supported()
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +904 drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
898
899 /**
900 * amdgpu_acpi_is_s0ix_supported
901 *
902 * returns true if supported, false if not.
903 */
> 904 bool amdgpu_acpi_is_s0ix_supported()
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
Re: [RFC PATCH v2 2/6] power: supply: add sw-gauge for SOC estimation and CC correction
by kernel test robot
Hi Matti,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on 09162bc32c880a791c6c0668ce0745cf7958f576]
url: https://github.com/0day-ci/linux/commits/Matti-Vaittinen/power-supply-Add...
base: 09162bc32c880a791c6c0668ce0745cf7958f576
config: arm64-randconfig-r005-20201210 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 1968804ac726e7674d5de22bc2204b45857da344)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/0day-ci/linux/commit/d7d68650b1fb6da80b5ba5953454bae6b...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Matti-Vaittinen/power-supply-Add-some-fuel-gauge-logic/20201204-205731
git checkout d7d68650b1fb6da80b5ba5953454bae6bbe420da
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
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/power/supply/power_supply_swgauge.c:105:2: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (sw->ops.set_cycle)
^~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:56:28: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:30: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/power/supply/power_supply_swgauge.c:111:9: note: uninitialized use occurs here
return ret;
^~~
drivers/power/supply/power_supply_swgauge.c:105:2: note: remove the 'if' if its condition is always true
if (sw->ops.set_cycle)
^~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:56:23: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^
drivers/power/supply/power_supply_swgauge.c:100:9: note: initialize the variable 'ret' to silence this warning
int ret, old_cycle = sw->cycle;
^
= 0
drivers/power/supply/power_supply_swgauge.c:818:6: warning: no previous prototype for function 'stop_gauge_thread' [-Wmissing-prototypes]
void stop_gauge_thread(struct task_struct *k)
^
drivers/power/supply/power_supply_swgauge.c:818:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void stop_gauge_thread(struct task_struct *k)
^
static
2 warnings generated.
vim +105 drivers/power/supply/power_supply_swgauge.c
97
98 static int swgauge_set_cycle(struct sw_gauge *sw, int new_cycle)
99 {
100 int ret, old_cycle = sw->cycle;
101
102 if (!sw->desc->allow_set_cycle && !sw->ops.set_cycle)
103 return -EINVAL;
104
> 105 if (sw->ops.set_cycle)
106 ret = sw->ops.set_cycle(sw, old_cycle, &new_cycle);
107
108 if (!ret)
109 sw->cycle = new_cycle;
110
111 return ret;
112 }
113
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[krzk-github:n/dts-mfd-rtc-interrupt-level-fixup-exynos-sec-maxim 27/27] drivers/power/supply/max17040_battery.c:365:15: warning: variable 'flags' set but not used
by kernel test robot
tree: https://github.com/krzk/linux n/dts-mfd-rtc-interrupt-level-fixup-exynos-sec-maxim
head: 4cb9d4fa11c696c5fffcd097744f1d06360469be
commit: 4cb9d4fa11c696c5fffcd097744f1d06360469be [27/27] power: supply: max17040: Do not enforce (incorrect) interrupt trigger type
config: ia64-randconfig-p001-20201209 (attached as .config)
compiler: ia64-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/krzk/linux/commit/4cb9d4fa11c696c5fffcd097744f1d063604...
git remote add krzk-github https://github.com/krzk/linux
git fetch --no-tags krzk-github n/dts-mfd-rtc-interrupt-level-fixup-exynos-sec-maxim
git checkout 4cb9d4fa11c696c5fffcd097744f1d06360469be
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
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 arch/ia64/include/asm/pgtable.h:154,
from include/linux/pgtable.h:6,
from arch/ia64/include/asm/uaccess.h:40,
from include/linux/uaccess.h:11,
from arch/ia64/include/asm/sections.h:11,
from include/linux/interrupt.h:20,
from drivers/power/supply/max17040_battery.c:16:
arch/ia64/include/asm/mmu_context.h: In function 'reload_context':
arch/ia64/include/asm/mmu_context.h:127:41: warning: variable 'old_rr4' set but not used [-Wunused-but-set-variable]
127 | unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
| ^~~~~~~
drivers/power/supply/max17040_battery.c: In function 'max17040_enable_alert_irq':
>> drivers/power/supply/max17040_battery.c:365:15: warning: variable 'flags' set but not used [-Wunused-but-set-variable]
365 | unsigned int flags;
| ^~~~~
vim +/flags +365 drivers/power/supply/max17040_battery.c
2e17ed94de68953 Matheus Castello 2019-12-05 361
2e17ed94de68953 Matheus Castello 2019-12-05 362 static int max17040_enable_alert_irq(struct max17040_chip *chip)
2e17ed94de68953 Matheus Castello 2019-12-05 363 {
2e17ed94de68953 Matheus Castello 2019-12-05 364 struct i2c_client *client = chip->client;
2e17ed94de68953 Matheus Castello 2019-12-05 @365 unsigned int flags;
2e17ed94de68953 Matheus Castello 2019-12-05 366 int ret;
2e17ed94de68953 Matheus Castello 2019-12-05 367
2e17ed94de68953 Matheus Castello 2019-12-05 368 flags = IRQF_TRIGGER_FALLING | IRQF_ONESHOT;
2e17ed94de68953 Matheus Castello 2019-12-05 369 ret = devm_request_threaded_irq(&client->dev, client->irq, NULL,
4cb9d4fa11c696c Krzysztof Kozlowski 2020-12-10 370 max17040_thread_handler, IRQF_ONESHOT,
2e17ed94de68953 Matheus Castello 2019-12-05 371 chip->battery->desc->name, chip);
2e17ed94de68953 Matheus Castello 2019-12-05 372
2e17ed94de68953 Matheus Castello 2019-12-05 373 return ret;
2e17ed94de68953 Matheus Castello 2019-12-05 374 }
2e17ed94de68953 Matheus Castello 2019-12-05 375
:::::: The code at line 365 was first introduced by commit
:::::: 2e17ed94de68953b17ed91b64f4bd176cdf38ad4 power: supply: max17040: Add IRQ handler for low SOC alert
:::::: TO: Matheus Castello <matheus(a)castello.eng.br>
:::::: CC: Sebastian Reichel <sre(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
Re: [PATCH v2 16/18] btrfs: introduce btrfs_subpage for data inodes
by kernel test robot
Hi Qu,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on kdave/for-next]
[also build test WARNING on next-20201210]
[cannot apply to v5.10-rc7]
[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/Qu-Wenruo/btrfs-add-read-only-su...
base: https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-next
config: i386-randconfig-m021-20201209 (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>
New smatch warnings:
fs/btrfs/inode.c:8361 btrfs_page_mkwrite() warn: unsigned 'ret' is never less than zero.
Old smatch warnings:
include/linux/fs.h:862 i_size_write() warn: statement has no effect 31
vim +/ret +8361 fs/btrfs/inode.c
8283
8284 /*
8285 * btrfs_page_mkwrite() is not allowed to change the file size as it gets
8286 * called from a page fault handler when a page is first dirtied. Hence we must
8287 * be careful to check for EOF conditions here. We set the page up correctly
8288 * for a written page which means we get ENOSPC checking when writing into
8289 * holes and correct delalloc and unwritten extent mapping on filesystems that
8290 * support these features.
8291 *
8292 * We are not allowed to take the i_mutex here so we have to play games to
8293 * protect against truncate races as the page could now be beyond EOF. Because
8294 * truncate_setsize() writes the inode size before removing pages, once we have
8295 * the page lock we can determine safely if the page is beyond EOF. If it is not
8296 * beyond EOF, then the page is guaranteed safe against truncation until we
8297 * unlock the page.
8298 */
8299 vm_fault_t btrfs_page_mkwrite(struct vm_fault *vmf)
8300 {
8301 struct page *page = vmf->page;
8302 struct inode *inode = file_inode(vmf->vma->vm_file);
8303 struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
8304 struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree;
8305 struct btrfs_ordered_extent *ordered;
8306 struct extent_state *cached_state = NULL;
8307 struct extent_changeset *data_reserved = NULL;
8308 char *kaddr;
8309 unsigned long zero_start;
8310 loff_t size;
8311 vm_fault_t ret;
8312 int ret2;
8313 int reserved = 0;
8314 u64 reserved_space;
8315 u64 page_start;
8316 u64 page_end;
8317 u64 end;
8318
8319 reserved_space = PAGE_SIZE;
8320
8321 sb_start_pagefault(inode->i_sb);
8322 page_start = page_offset(page);
8323 page_end = page_start + PAGE_SIZE - 1;
8324 end = page_end;
8325
8326 /*
8327 * Reserving delalloc space after obtaining the page lock can lead to
8328 * deadlock. For example, if a dirty page is locked by this function
8329 * and the call to btrfs_delalloc_reserve_space() ends up triggering
8330 * dirty page write out, then the btrfs_writepage() function could
8331 * end up waiting indefinitely to get a lock on the page currently
8332 * being processed by btrfs_page_mkwrite() function.
8333 */
8334 ret2 = btrfs_delalloc_reserve_space(BTRFS_I(inode), &data_reserved,
8335 page_start, reserved_space);
8336 if (!ret2) {
8337 ret2 = file_update_time(vmf->vma->vm_file);
8338 reserved = 1;
8339 }
8340 if (ret2) {
8341 ret = vmf_error(ret2);
8342 if (reserved)
8343 goto out;
8344 goto out_noreserve;
8345 }
8346
8347 ret = VM_FAULT_NOPAGE; /* make the VM retry the fault */
8348 again:
8349 lock_page(page);
8350 size = i_size_read(inode);
8351
8352 if ((page->mapping != inode->i_mapping) ||
8353 (page_start >= size)) {
8354 /* page got truncated out from underneath us */
8355 goto out_unlock;
8356 }
8357 wait_on_page_writeback(page);
8358
8359 lock_extent_bits(io_tree, page_start, page_end, &cached_state);
8360 ret = set_page_extent_mapped(page);
> 8361 if (ret < 0)
8362 goto out_unlock;
8363
8364 /*
8365 * we can't set the delalloc bits if there are pending ordered
8366 * extents. Drop our locks and wait for them to finish
8367 */
8368 ordered = btrfs_lookup_ordered_range(BTRFS_I(inode), page_start,
8369 PAGE_SIZE);
8370 if (ordered) {
8371 unlock_extent_cached(io_tree, page_start, page_end,
8372 &cached_state);
8373 unlock_page(page);
8374 btrfs_start_ordered_extent(ordered, 1);
8375 btrfs_put_ordered_extent(ordered);
8376 goto again;
8377 }
8378
8379 if (page->index == ((size - 1) >> PAGE_SHIFT)) {
8380 reserved_space = round_up(size - page_start,
8381 fs_info->sectorsize);
8382 if (reserved_space < PAGE_SIZE) {
8383 end = page_start + reserved_space - 1;
8384 btrfs_delalloc_release_space(BTRFS_I(inode),
8385 data_reserved, page_start,
8386 PAGE_SIZE - reserved_space, true);
8387 }
8388 }
8389
8390 /*
8391 * page_mkwrite gets called when the page is firstly dirtied after it's
8392 * faulted in, but write(2) could also dirty a page and set delalloc
8393 * bits, thus in this case for space account reason, we still need to
8394 * clear any delalloc bits within this page range since we have to
8395 * reserve data&meta space before lock_page() (see above comments).
8396 */
8397 clear_extent_bit(&BTRFS_I(inode)->io_tree, page_start, end,
8398 EXTENT_DELALLOC | EXTENT_DO_ACCOUNTING |
8399 EXTENT_DEFRAG, 0, 0, &cached_state);
8400
8401 ret2 = btrfs_set_extent_delalloc(BTRFS_I(inode), page_start, end, 0,
8402 &cached_state);
8403 if (ret2) {
8404 unlock_extent_cached(io_tree, page_start, page_end,
8405 &cached_state);
8406 ret = VM_FAULT_SIGBUS;
8407 goto out_unlock;
8408 }
8409
8410 /* page is wholly or partially inside EOF */
8411 if (page_start + PAGE_SIZE > size)
8412 zero_start = offset_in_page(size);
8413 else
8414 zero_start = PAGE_SIZE;
8415
8416 if (zero_start != PAGE_SIZE) {
8417 kaddr = kmap(page);
8418 memset(kaddr + zero_start, 0, PAGE_SIZE - zero_start);
8419 flush_dcache_page(page);
8420 kunmap(page);
8421 }
8422 ClearPageChecked(page);
8423 set_page_dirty(page);
8424 SetPageUptodate(page);
8425
8426 BTRFS_I(inode)->last_trans = fs_info->generation;
8427 BTRFS_I(inode)->last_sub_trans = BTRFS_I(inode)->root->log_transid;
8428 BTRFS_I(inode)->last_log_commit = BTRFS_I(inode)->root->last_log_commit;
8429
8430 unlock_extent_cached(io_tree, page_start, page_end, &cached_state);
8431
8432 btrfs_delalloc_release_extents(BTRFS_I(inode), PAGE_SIZE);
8433 sb_end_pagefault(inode->i_sb);
8434 extent_changeset_free(data_reserved);
8435 return VM_FAULT_LOCKED;
8436
8437 out_unlock:
8438 unlock_page(page);
8439 out:
8440 btrfs_delalloc_release_extents(BTRFS_I(inode), PAGE_SIZE);
8441 btrfs_delalloc_release_space(BTRFS_I(inode), data_reserved, page_start,
8442 reserved_space, (ret != 0));
8443 out_noreserve:
8444 sb_end_pagefault(inode->i_sb);
8445 extent_changeset_free(data_reserved);
8446 return ret;
8447 }
8448
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[lunn:v5.10-rc5-net-next-sfp 1/1] net/ethtool/ioctl.c:2183:21: warning: unused variable 'phydev'
by kernel test robot
tree: https://github.com/lunn/linux.git v5.10-rc5-net-next-sfp
head: fcc924a183b34a15eec0a4b76fbbf86178a02d19
commit: fcc924a183b34a15eec0a4b76fbbf86178a02d19 [1/1] net: phy: Remove module_info member from phy driver
config: mips-randconfig-r026-20201209 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 1968804ac726e7674d5de22bc2204b45857da344)
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/lunn/linux/commit/fcc924a183b34a15eec0a4b76fbbf86178a0...
git remote add lunn https://github.com/lunn/linux.git
git fetch --no-tags lunn v5.10-rc5-net-next-sfp
git checkout fcc924a183b34a15eec0a4b76fbbf86178a02d19
# 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 warnings (new ones prefixed by >>):
>> net/ethtool/ioctl.c:2183:21: warning: unused variable 'phydev'
struct phy_device = dev->phydev;
^
fatal error: error in backend: Nested variants found in inline asm string: ' .set push
.set mips64r2
.if ( 0x00 ) != -1)) 0x00 ) != -1)) : ($( static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((__section__("_ftrace_branch"))) __if_trace = $( .func = __func__, .file = "arch/mips/include/asm/bitops.h", .line = 192, $); 0x00 ) != -1)) : $))) ) && ( 0 ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif
1: ll $0, $2
or $1, $0, $3
sc $1, $2
beqz $1, 1b
.set pop
'
clang-12: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 12.0.0 (git://gitmirror/llvm_project 1968804ac726e7674d5de22bc2204b45857da344)
Target: mipsel-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/cross/clang-1968804ac7/bin
clang-12: note: diagnostic msg:
Makefile arch drivers include kernel lib net scripts source usr
vim +/phydev +2183 net/ethtool/ioctl.c
c8f3a8c3106913 net/core/ethtool.c Richard Cochran 2012-04-03 2178
2f4383667d57d1 net/core/ethtool.c Ed Swierk 2015-01-02 2179 static int __ethtool_get_module_info(struct net_device *dev,
2f4383667d57d1 net/core/ethtool.c Ed Swierk 2015-01-02 2180 struct ethtool_modinfo *modinfo)
2f4383667d57d1 net/core/ethtool.c Ed Swierk 2015-01-02 2181 {
2f4383667d57d1 net/core/ethtool.c Ed Swierk 2015-01-02 2182 const struct ethtool_ops *ops = dev->ethtool_ops;
2f4383667d57d1 net/core/ethtool.c Ed Swierk 2015-01-02 @2183 struct phy_device *phydev = dev->phydev;
2f4383667d57d1 net/core/ethtool.c Ed Swierk 2015-01-02 2184
e679c9c1dbfdba net/core/ethtool.c Russell King 2018-03-28 2185 if (dev->sfp_bus)
e679c9c1dbfdba net/core/ethtool.c Russell King 2018-03-28 2186 return sfp_get_module_info(dev->sfp_bus, modinfo);
e679c9c1dbfdba net/core/ethtool.c Russell King 2018-03-28 2187
2f4383667d57d1 net/core/ethtool.c Ed Swierk 2015-01-02 2188 if (ops->get_module_info)
2f4383667d57d1 net/core/ethtool.c Ed Swierk 2015-01-02 2189 return ops->get_module_info(dev, modinfo);
2f4383667d57d1 net/core/ethtool.c Ed Swierk 2015-01-02 2190
2f4383667d57d1 net/core/ethtool.c Ed Swierk 2015-01-02 2191 return -EOPNOTSUPP;
2f4383667d57d1 net/core/ethtool.c Ed Swierk 2015-01-02 2192 }
2f4383667d57d1 net/core/ethtool.c Ed Swierk 2015-01-02 2193
:::::: The code at line 2183 was first introduced by commit
:::::: 2f4383667d57d1c719070db86b14277277752841 ethtool: Extend ethtool plugin module eeprom API to phylib
:::::: TO: Ed Swierk <eswierk(a)skyportsystems.com>
:::::: CC: David S. Miller <davem(a)davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
Re: [PATCH v3 43/66] KVM: arm64: nv: arch_timer: Support hyp timer emulation
by kernel test robot
Hi Marc,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on kvmarm/next]
[also build test WARNING on next-20201210]
[cannot apply to arm64/for-next/core soc/for-next arm/for-next xlnx/master linus/master kvm/linux-next v5.10-rc7]
[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/Marc-Zyngier/KVM-arm64-ARMv8-3-8...
base: https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git next
config: arm64-defconfig (attached as .config)
compiler: aarch64-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/af7a3cada1fa577612a86dd0a7c4016ff...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Marc-Zyngier/KVM-arm64-ARMv8-3-8-4-Nested-Virtualization-support/20201211-004741
git checkout af7a3cada1fa577612a86dd0a7c4016ffed68acc
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
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 >>):
arch/arm64/kvm/arch_timer.c: In function 'kvm_timer_vcpu_load_nested_switch':
>> arch/arm64/kvm/arch_timer.c:656:10: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
656 | int hw, ret;
| ^~~
vim +/ret +656 arch/arm64/kvm/arch_timer.c
652
653 static void kvm_timer_vcpu_load_nested_switch(struct kvm_vcpu *vcpu,
654 struct timer_map *map)
655 {
> 656 int hw, ret;
657
658 if (!irqchip_in_kernel(vcpu->kvm))
659 return;
660
661 /*
662 * We only ever unmap the vtimer irq on a VHE system that runs nested
663 * virtualization, in which case we have both a valid emul_vtimer,
664 * emul_ptimer, direct_vtimer, and direct_ptimer.
665 *
666 * Since this is called from kvm_timer_vcpu_load(), a change between
667 * vEL2 and vEL1/0 will have just happened, and the timer_map will
668 * represent this, and therefore we switch the emul/direct mappings
669 * below.
670 */
671 hw = kvm_vgic_get_map(vcpu, map->direct_vtimer->irq.irq);
672 if (hw < 0) {
673 kvm_vgic_unmap_phys_irq(vcpu, map->emul_vtimer->irq.irq);
674 kvm_vgic_unmap_phys_irq(vcpu, map->emul_ptimer->irq.irq);
675
676 ret = kvm_vgic_map_phys_irq(vcpu,
677 map->direct_vtimer->host_timer_irq,
678 map->direct_vtimer->irq.irq,
679 kvm_arch_timer_get_input_level);
680 ret = kvm_vgic_map_phys_irq(vcpu,
681 map->direct_ptimer->host_timer_irq,
682 map->direct_ptimer->irq.irq,
683 kvm_arch_timer_get_input_level);
684 }
685 }
686
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
Re: [PATCH V3 1/2] mm/highmem: Remove deprecated kmap_atomic
by kernel test robot
Hi,
I love your patch! Yet something to improve:
[auto build test ERROR on hch-configfs/for-next]
[also build test ERROR on linus/master hnaz-linux-mm/master v5.10-rc7]
[cannot apply to mmotm/master next-20201210]
[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/ira-weiny-intel-com/mm-highmem-R...
base: git://git.infradead.org/users/hch/configfs.git for-next
config: x86_64-rhel (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/d52646012878888c6a3172a07cd8bdf3d...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review ira-weiny-intel-com/mm-highmem-Remove-deprecated-kmap_atomic/20201211-021920
git checkout d52646012878888c6a3172a07cd8bdf3d0c39723
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/pagemap.h:11,
from include/linux/blkdev.h:14,
from include/linux/blk-cgroup.h:23,
from include/linux/writeback.h:14,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from arch/x86/kernel/asm-offsets.c:13:
include/linux/highmem.h: In function 'clear_user_highpage':
>> include/linux/highmem.h:229:15: error: implicit declaration of function 'kmap_local_page'; did you mean 'kmap_to_page'? [-Werror=implicit-function-declaration]
229 | void *addr = kmap_local_page(page);
| ^~~~~~~~~~~~~~~
| kmap_to_page
include/linux/highmem.h:229:15: warning: initialization of 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
>> include/linux/highmem.h:231:2: error: implicit declaration of function 'kunmap_local' [-Werror=implicit-function-declaration]
231 | kunmap_local(addr);
| ^~~~~~~~~~~~
include/linux/highmem.h: In function 'clear_highpage':
include/linux/highmem.h:282:16: warning: initialization of 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
282 | void *kaddr = kmap_local_page(page);
| ^~~~~~~~~~~~~~~
include/linux/highmem.h: In function 'zero_user_segments':
include/linux/highmem.h:291:16: warning: initialization of 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
291 | void *kaddr = kmap_local_page(page);
| ^~~~~~~~~~~~~~~
include/linux/highmem.h: In function 'copy_user_highpage':
include/linux/highmem.h:324:8: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
324 | vfrom = kmap_local_page(from);
| ^
include/linux/highmem.h:325:6: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
325 | vto = kmap_local_page(to);
| ^
include/linux/highmem.h: In function 'copy_highpage':
include/linux/highmem.h:339:8: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
339 | vfrom = kmap_local_page(from);
| ^
include/linux/highmem.h:340:6: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
340 | vto = kmap_local_page(to);
| ^
cc1: some warnings being treated as errors
--
In file included from arch/x86/kvm/vmx/vmx.c:16:
include/linux/highmem.h: In function 'clear_user_highpage':
>> include/linux/highmem.h:229:15: error: implicit declaration of function 'kmap_local_page'; did you mean 'kmap_to_page'? [-Werror=implicit-function-declaration]
229 | void *addr = kmap_local_page(page);
| ^~~~~~~~~~~~~~~
| kmap_to_page
include/linux/highmem.h:229:15: warning: initialization of 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
>> include/linux/highmem.h:231:2: error: implicit declaration of function 'kunmap_local' [-Werror=implicit-function-declaration]
231 | kunmap_local(addr);
| ^~~~~~~~~~~~
include/linux/highmem.h: In function 'clear_highpage':
include/linux/highmem.h:282:16: warning: initialization of 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
282 | void *kaddr = kmap_local_page(page);
| ^~~~~~~~~~~~~~~
include/linux/highmem.h: In function 'zero_user_segments':
include/linux/highmem.h:291:16: warning: initialization of 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
291 | void *kaddr = kmap_local_page(page);
| ^~~~~~~~~~~~~~~
include/linux/highmem.h: In function 'copy_user_highpage':
include/linux/highmem.h:324:8: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
324 | vfrom = kmap_local_page(from);
| ^
include/linux/highmem.h:325:6: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
325 | vto = kmap_local_page(to);
| ^
include/linux/highmem.h: In function 'copy_highpage':
include/linux/highmem.h:339:8: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
339 | vfrom = kmap_local_page(from);
| ^
include/linux/highmem.h:340:6: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
340 | vto = kmap_local_page(to);
| ^
In file included from arch/x86/kvm/vmx/vmx.c:51:
arch/x86/kvm/vmx/capabilities.h: At top level:
arch/x86/kvm/vmx/capabilities.h:7:10: fatal error: lapic.h: No such file or directory
7 | #include "lapic.h"
| ^~~~~~~~~
cc1: some warnings being treated as errors
compilation terminated.
--
In file included from include/linux/pagemap.h:11,
from include/linux/blkdev.h:14,
from include/linux/blk-cgroup.h:23,
from include/linux/writeback.h:14,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from arch/x86/kernel/asm-offsets.c:13:
include/linux/highmem.h: In function 'clear_user_highpage':
>> include/linux/highmem.h:229:15: error: implicit declaration of function 'kmap_local_page'; did you mean 'kmap_to_page'? [-Werror=implicit-function-declaration]
229 | void *addr = kmap_local_page(page);
| ^~~~~~~~~~~~~~~
| kmap_to_page
include/linux/highmem.h:229:15: warning: initialization of 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
>> include/linux/highmem.h:231:2: error: implicit declaration of function 'kunmap_local' [-Werror=implicit-function-declaration]
231 | kunmap_local(addr);
| ^~~~~~~~~~~~
include/linux/highmem.h: In function 'clear_highpage':
include/linux/highmem.h:282:16: warning: initialization of 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
282 | void *kaddr = kmap_local_page(page);
| ^~~~~~~~~~~~~~~
include/linux/highmem.h: In function 'zero_user_segments':
include/linux/highmem.h:291:16: warning: initialization of 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
291 | void *kaddr = kmap_local_page(page);
| ^~~~~~~~~~~~~~~
include/linux/highmem.h: In function 'copy_user_highpage':
include/linux/highmem.h:324:8: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
324 | vfrom = kmap_local_page(from);
| ^
include/linux/highmem.h:325:6: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
325 | vto = kmap_local_page(to);
| ^
include/linux/highmem.h: In function 'copy_highpage':
include/linux/highmem.h:339:8: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
339 | vfrom = kmap_local_page(from);
| ^
include/linux/highmem.h:340:6: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
340 | vto = kmap_local_page(to);
| ^
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:117: arch/x86/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1200: prepare0] Error 2
make[1]: Target 'modules_prepare' not remade because of errors.
make: *** [Makefile:185: __sub-make] Error 2
make: Target 'modules_prepare' not remade because of errors.
--
In file included from include/linux/pagemap.h:11,
from include/linux/blkdev.h:14,
from include/linux/blk-cgroup.h:23,
from include/linux/writeback.h:14,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from arch/x86/kernel/asm-offsets.c:13:
include/linux/highmem.h: In function 'clear_user_highpage':
>> include/linux/highmem.h:229:15: error: implicit declaration of function 'kmap_local_page'; did you mean 'kmap_to_page'? [-Werror=implicit-function-declaration]
229 | void *addr = kmap_local_page(page);
| ^~~~~~~~~~~~~~~
| kmap_to_page
include/linux/highmem.h:229:15: warning: initialization of 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
>> include/linux/highmem.h:231:2: error: implicit declaration of function 'kunmap_local' [-Werror=implicit-function-declaration]
231 | kunmap_local(addr);
| ^~~~~~~~~~~~
include/linux/highmem.h: In function 'clear_highpage':
include/linux/highmem.h:282:16: warning: initialization of 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
282 | void *kaddr = kmap_local_page(page);
| ^~~~~~~~~~~~~~~
include/linux/highmem.h: In function 'zero_user_segments':
include/linux/highmem.h:291:16: warning: initialization of 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
291 | void *kaddr = kmap_local_page(page);
| ^~~~~~~~~~~~~~~
include/linux/highmem.h: In function 'copy_user_highpage':
include/linux/highmem.h:324:8: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
324 | vfrom = kmap_local_page(from);
| ^
include/linux/highmem.h:325:6: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
325 | vto = kmap_local_page(to);
| ^
include/linux/highmem.h: In function 'copy_highpage':
include/linux/highmem.h:339:8: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
339 | vfrom = kmap_local_page(from);
| ^
include/linux/highmem.h:340:6: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
340 | vto = kmap_local_page(to);
| ^
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:117: arch/x86/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1200: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:185: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +229 include/linux/highmem.h
223
224
225 /* when CONFIG_HIGHMEM is not set these will be plain clear/copy_page */
226 #ifndef clear_user_highpage
227 static inline void clear_user_highpage(struct page *page, unsigned long vaddr)
228 {
> 229 void *addr = kmap_local_page(page);
230 clear_user_page(addr, vaddr, page);
> 231 kunmap_local(addr);
232 }
233 #endif
234
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months