Re: [PATCH 1/5] mtip32xx: Delete an error message for a failed memory allocation in five functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Markus,

[auto build test WARNING on linus/master]
[also build test WARNING on v4.13-rc4 next-20170804]
[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/SF-Markus-Elfring/mtip32xx-Adjustments-for-some-function-implementations/20170807-033055
config: x86_64-randconfig-b0-08071209 (attached as .config)
compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from include/uapi/linux/uuid.h:21,
                    from include/linux/uuid.h:19,
                    from include/linux/mod_devicetable.h:12,
                    from include/linux/pci.h:20,
                    from drivers/block/mtip32xx/mtip32xx.c:21:
   include/linux/string.h: In function 'strncpy':
   include/linux/string.h:209: warning: '______f' is static but declared in inline function 'strncpy' which is not static
   include/linux/string.h:211: warning: '______f' is static but declared in inline function 'strncpy' which is not static
   include/linux/string.h: In function 'strcat':
   include/linux/string.h:219: warning: '______f' is static but declared in inline function 'strcat' which is not static
   include/linux/string.h:221: warning: '______f' is static but declared in inline function 'strcat' which is not static
   include/linux/string.h: In function 'strlen':
   include/linux/string.h:230: warning: '______f' is static but declared in inline function 'strlen' which is not static
   include/linux/string.h:233: warning: '______f' is static but declared in inline function 'strlen' which is not static
   include/linux/string.h: In function 'strnlen':
   include/linux/string.h:243: warning: '______f' is static but declared in inline function 'strnlen' which is not static
   include/linux/string.h: In function 'strlcpy':
   include/linux/string.h:255: warning: '______f' is static but declared in inline function 'strlcpy' which is not static
   include/linux/string.h:258: warning: '______f' is static but declared in inline function 'strlcpy' which is not static
   include/linux/string.h:260: warning: '______f' is static but declared in inline function 'strlcpy' which is not static
   include/linux/string.h:262: warning: '______f' is static but declared in inline function 'strlcpy' which is not static
   include/linux/string.h: In function 'strncat':
   include/linux/string.h:276: warning: '______f' is static but declared in inline function 'strncat' which is not static
   include/linux/string.h:280: warning: '______f' is static but declared in inline function 'strncat' which is not static
   include/linux/string.h: In function 'memset':
   include/linux/string.h:290: warning: '______f' is static but declared in inline function 'memset' which is not static
   include/linux/string.h:292: warning: '______f' is static but declared in inline function 'memset' which is not static
   include/linux/string.h: In function 'memcpy':
   include/linux/string.h:301: warning: '______f' is static but declared in inline function 'memcpy' which is not static
   include/linux/string.h:302: warning: '______f' is static but declared in inline function 'memcpy' which is not static
   include/linux/string.h:304: warning: '______f' is static but declared in inline function 'memcpy' which is not static
   include/linux/string.h:307: warning: '______f' is static but declared in inline function 'memcpy' which is not static
   include/linux/string.h: In function 'memmove':
   include/linux/string.h:316: warning: '______f' is static but declared in inline function 'memmove' which is not static
   include/linux/string.h:317: warning: '______f' is static but declared in inline function 'memmove' which is not static
   include/linux/string.h:319: warning: '______f' is static but declared in inline function 'memmove' which is not static
   include/linux/string.h:322: warning: '______f' is static but declared in inline function 'memmove' which is not static
   include/linux/string.h: In function 'memscan':
   include/linux/string.h:331: warning: '______f' is static but declared in inline function 'memscan' which is not static
   include/linux/string.h:333: warning: '______f' is static but declared in inline function 'memscan' which is not static
   include/linux/string.h: In function 'memcmp':
   include/linux/string.h:342: warning: '______f' is static but declared in inline function 'memcmp' which is not static
   include/linux/string.h:343: warning: '______f' is static but declared in inline function 'memcmp' which is not static
   include/linux/string.h:345: warning: '______f' is static but declared in inline function 'memcmp' which is not static
   include/linux/string.h:348: warning: '______f' is static but declared in inline function 'memcmp' which is not static
   include/linux/string.h: In function 'memchr':
   include/linux/string.h:356: warning: '______f' is static but declared in inline function 'memchr' which is not static
   include/linux/string.h:358: warning: '______f' is static but declared in inline function 'memchr' which is not static
   include/linux/string.h: In function 'memchr_inv':
   include/linux/string.h:367: warning: '______f' is static but declared in inline function 'memchr_inv' which is not static
   include/linux/string.h:369: warning: '______f' is static but declared in inline function 'memchr_inv' which is not static
   include/linux/string.h: In function 'kmemdup':
   include/linux/string.h:378: warning: '______f' is static but declared in inline function 'kmemdup' which is not static
   include/linux/string.h:380: warning: '______f' is static but declared in inline function 'kmemdup' which is not static
   include/linux/string.h: In function 'strcpy':
   include/linux/string.h:390: warning: '______f' is static but declared in inline function 'strcpy' which is not static
   drivers/block/mtip32xx/mtip32xx.c: In function 'mtip_hw_read_device_status':
>> drivers/block/mtip32xx/mtip32xx.c:2373: warning: unused variable 'dd'

vim +/dd +2373 drivers/block/mtip32xx/mtip32xx.c

0caff003 Asai Thambi S P 2013-04-03  2369  
0caff003 Asai Thambi S P 2013-04-03  2370  static ssize_t mtip_hw_read_device_status(struct file *f, char __user *ubuf,
0caff003 Asai Thambi S P 2013-04-03  2371  						size_t len, loff_t *offset)
0caff003 Asai Thambi S P 2013-04-03  2372  {
c8afd0dc David Milburn   2013-05-23 @2373  	struct driver_data *dd =  (struct driver_data *)f->private_data;
0caff003 Asai Thambi S P 2013-04-03  2374  	int size = *offset;
c8afd0dc David Milburn   2013-05-23  2375  	char *buf;
c8afd0dc David Milburn   2013-05-23  2376  	int rv = 0;
0caff003 Asai Thambi S P 2013-04-03  2377  
0caff003 Asai Thambi S P 2013-04-03  2378  	if (!len || *offset)
0caff003 Asai Thambi S P 2013-04-03  2379  		return 0;
0caff003 Asai Thambi S P 2013-04-03  2380  
c8afd0dc David Milburn   2013-05-23  2381  	buf = kzalloc(MTIP_DFS_MAX_BUF_SIZE, GFP_KERNEL);
b4f96ba8 Markus Elfring  2017-08-06  2382  	if (!buf)
c8afd0dc David Milburn   2013-05-23  2383  		return -ENOMEM;
c8afd0dc David Milburn   2013-05-23  2384  
0caff003 Asai Thambi S P 2013-04-03  2385  	size += show_device_status(NULL, buf);
0caff003 Asai Thambi S P 2013-04-03  2386  
0caff003 Asai Thambi S P 2013-04-03  2387  	*offset = size <= len ? size : len;
0caff003 Asai Thambi S P 2013-04-03  2388  	size = copy_to_user(ubuf, buf, *offset);
0caff003 Asai Thambi S P 2013-04-03  2389  	if (size)
c8afd0dc David Milburn   2013-05-23  2390  		rv = -EFAULT;
0caff003 Asai Thambi S P 2013-04-03  2391  
c8afd0dc David Milburn   2013-05-23  2392  	kfree(buf);
c8afd0dc David Milburn   2013-05-23  2393  	return rv ? rv : *offset;
0caff003 Asai Thambi S P 2013-04-03  2394  }
0caff003 Asai Thambi S P 2013-04-03  2395  

:::::: The code at line 2373 was first introduced by commit
:::::: c8afd0dcbd14e2352258f2e2d359b36d0edd459f mtip32xx: dynamically allocate buffer in debugfs functions

:::::: TO: David Milburn <dmilburn@xxxxxxxxxx>
:::::: CC: Jens Axboe <axboe@xxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux