Re: [PATCH 1/5] mm: convert bdi_writeback_congested.refcnt from atomic_t to refcount_t

From: kbuild test robot
Date: Mon Feb 20 2017 - 06:33:58 EST


Hi Elena,

[auto build test ERROR on mmotm/master]
[also build test ERROR on next-20170220]
[cannot apply to linus/master linux/master]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Elena-Reshetova/mm-subsystem-refcounter-conversions/20170220-190351
base: git://git.cmpxchg.org/linux-mmotm.git master
config: i386-tinyconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386

All errors (new ones prefixed by >>):

mm/backing-dev.c: In function 'cgwb_bdi_init':
>> mm/backing-dev.c:798:13: error: passing argument 1 of 'atomic_set' from incompatible pointer type [-Werror=incompatible-pointer-types]
atomic_set(&bdi->wb_congested->refcnt, 1);
^
In file included from include/linux/atomic.h:4:0,
from arch/x86/include/asm/thread_info.h:53,
from include/linux/thread_info.h:25,
from arch/x86/include/asm/preempt.h:6,
from include/linux/preempt.h:59,
from include/linux/spinlock.h:50,
from include/linux/wait.h:8,
from mm/backing-dev.c:2:
arch/x86/include/asm/atomic.h:36:29: note: expected 'atomic_t * {aka struct <anonymous> *}' but argument is of type 'refcount_t * {aka struct refcount_struct *}'
static __always_inline void atomic_set(atomic_t *v, int i)
^~~~~~~~~~
cc1: some warnings being treated as errors

vim +/atomic_set +798 mm/backing-dev.c

a13f35e8 Tejun Heo 2015-07-02 792 int err;
a13f35e8 Tejun Heo 2015-07-02 793
a13f35e8 Tejun Heo 2015-07-02 794 bdi->wb_congested = kzalloc(sizeof(*bdi->wb_congested), GFP_KERNEL);
a13f35e8 Tejun Heo 2015-07-02 795 if (!bdi->wb_congested)
a13f35e8 Tejun Heo 2015-07-02 796 return -ENOMEM;
a13f35e8 Tejun Heo 2015-07-02 797
d3036542 mmotm auto import 2017-02-18 @798 atomic_set(&bdi->wb_congested->refcnt, 1);
d3036542 mmotm auto import 2017-02-18 799
a13f35e8 Tejun Heo 2015-07-02 800 err = wb_init(&bdi->wb, bdi, 1, GFP_KERNEL);
a13f35e8 Tejun Heo 2015-07-02 801 if (err) {

:::::: The code at line 798 was first introduced by commit
:::::: d3036542f0baefd61fb18ce9023c2cd96c89349c linux-next

:::::: TO: mmotm auto import <mm-commits@xxxxxxxxxxxxxxx>
:::::: CC: Johannes Weiner <hannes@xxxxxxxxxxx>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip