Hi Yangtao,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on block/for-next]
[also build test ERROR on v4.20-rc4 next-20181130]
[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/Yangtao-Li/block-Change-to-use-DEFINE_SHOW_ATTRIBUTE-macro/20181201-211704
base:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git 
for-next
config: i386-randconfig-x075-201847 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

>> drivers//block/pktcdvd.c:2244:12: error: conflicting types for 'pkt_open'
    static int pkt_open(struct block_device *bdev, fmode_t mode)
               ^~~~~~~~
   In file included from include/linux/cgroup.h:18:0,
                    from include/linux/kthread.h:7,
                    from drivers//block/pktcdvd.c:54:
   drivers//block/pktcdvd.c:455:23: note: previous definition of 'pkt_open' was 
here
    DEFINE_SHOW_ATTRIBUTE(pkt);
                          ^
   include/linux/seq_file.h:149:12: note: in definition of macro 
'DEFINE_SHOW_ATTRIBUTE'
    static int __name ## _open(struct inode *inode, struct file *file) \
               ^~~~~~

vim +/pkt_open +2244 drivers//block/pktcdvd.c

^1da177e Linus Torvalds  2005-04-16  2243  
5e5e007c Al Viro         2008-03-02 @2244  static int pkt_open(struct 
block_device *bdev, fmode_t mode)
^1da177e Linus Torvalds  2005-04-16  2245  {
^1da177e Linus Torvalds  2005-04-16  2246       struct pktcdvd_device *pd = 
NULL;
^1da177e Linus Torvalds  2005-04-16  2247       int ret;
^1da177e Linus Torvalds  2005-04-16  2248  
2a48fc0a Arnd Bergmann   2010-06-02  2249       mutex_lock(&pktcdvd_mutex);
1657f824 Jes Sorensen    2006-03-23  2250       mutex_lock(&ctl_mutex);
5e5e007c Al Viro         2008-03-02  2251       pd = 
pkt_find_dev_from_minor(MINOR(bdev->bd_dev));
^1da177e Linus Torvalds  2005-04-16  2252       if (!pd) {
^1da177e Linus Torvalds  2005-04-16  2253               ret = -ENODEV;
^1da177e Linus Torvalds  2005-04-16  2254               goto out;
^1da177e Linus Torvalds  2005-04-16  2255       }
^1da177e Linus Torvalds  2005-04-16  2256       BUG_ON(pd->refcnt < 0);
^1da177e Linus Torvalds  2005-04-16  2257  
^1da177e Linus Torvalds  2005-04-16  2258       pd->refcnt++;
46f4e1b7 Peter Osterlund 2005-05-20  2259       if (pd->refcnt > 1) {
5e5e007c Al Viro         2008-03-02  2260               if ((mode & 
FMODE_WRITE) &&
46f4e1b7 Peter Osterlund 2005-05-20  2261                   
!test_bit(PACKET_WRITABLE, &pd->flags)) {
46f4e1b7 Peter Osterlund 2005-05-20  2262                       ret = -EBUSY;
46f4e1b7 Peter Osterlund 2005-05-20  2263                       goto out_dec;
46f4e1b7 Peter Osterlund 2005-05-20  2264               }
46f4e1b7 Peter Osterlund 2005-05-20  2265       } else {
5e5e007c Al Viro         2008-03-02  2266               ret = pkt_open_dev(pd, 
mode & FMODE_WRITE);
01fd9fda Peter Osterlund 2006-02-14  2267               if (ret)
^1da177e Linus Torvalds  2005-04-16  2268                       goto out_dec;
^1da177e Linus Torvalds  2005-04-16  2269               /*
^1da177e Linus Torvalds  2005-04-16  2270                * needed here as well, 
since ext2 (among others) may change
^1da177e Linus Torvalds  2005-04-16  2271                * the blocksize at 
mount time
^1da177e Linus Torvalds  2005-04-16  2272                */
5e5e007c Al Viro         2008-03-02  2273               set_blocksize(bdev, 
CD_FRAMESIZE);
^1da177e Linus Torvalds  2005-04-16  2274       }
^1da177e Linus Torvalds  2005-04-16  2275  
1657f824 Jes Sorensen    2006-03-23  2276       mutex_unlock(&ctl_mutex);
2a48fc0a Arnd Bergmann   2010-06-02  2277       mutex_unlock(&pktcdvd_mutex);
^1da177e Linus Torvalds  2005-04-16  2278       return 0;
^1da177e Linus Torvalds  2005-04-16  2279  
^1da177e Linus Torvalds  2005-04-16  2280  out_dec:
^1da177e Linus Torvalds  2005-04-16  2281       pd->refcnt--;
^1da177e Linus Torvalds  2005-04-16  2282  out:
1657f824 Jes Sorensen    2006-03-23  2283       mutex_unlock(&ctl_mutex);
2a48fc0a Arnd Bergmann   2010-06-02  2284       mutex_unlock(&pktcdvd_mutex);
^1da177e Linus Torvalds  2005-04-16  2285       return ret;
^1da177e Linus Torvalds  2005-04-16  2286  }
^1da177e Linus Torvalds  2005-04-16  2287  

:::::: The code at line 2244 was first introduced by commit
:::::: 5e5e007c25009c304af693b7fc49bab8d1d25801 [PATCH] switch pktdvdcd

:::::: TO: Al Viro <v...@zeniv.linux.org.uk>
:::::: CC: Al Viro <v...@zeniv.linux.org.uk>

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

Attachment: .config.gz
Description: application/gzip

Reply via email to