lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201708042137.1QRfZLa9%fengguang.wu@intel.com>
Date:   Fri, 4 Aug 2017 21:12:16 +0800
From:   kbuild test robot <lkp@...el.com>
To:     SF Markus Elfring <elfring@...rs.sourceforge.net>
Cc:     kbuild-all@...org, linuxppc-dev@...ts.ozlabs.org,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Jan Kara <jack@...e.cz>, Jens Axboe <axboe@...com>,
        Dan Williams <dan.j.williams@...el.com>,
        Michael Ellerman <mpe@...erman.id.au>,
        Paul Mackerras <paulus@...ba.org>,
        LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 4/4] axonram: Delete an unnecessary variable
 initialisation in axon_ram_probe()

Hi Markus,

[auto build test ERROR on powerpc/next]
[also build test ERROR on v4.13-rc3 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/axonram-Adjustments-for-axon_ram_probe/20170804-170436
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-defconfig (attached as .config)
compiler: powerpc64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=powerpc 

All errors (new ones prefixed by >>):

   arch/powerpc/sysdev/axonram.c: In function 'axon_ram_probe':
>> arch/powerpc/sysdev/axonram.c:203:3: error: 'rc' undeclared (first use in this function)
      rc = -EFAULT;
      ^~
   arch/powerpc/sysdev/axonram.c:203:3: note: each undeclared identifier is reported only once for each function it appears in
   arch/powerpc/sysdev/axonram.c:308:1: error: control reaches end of non-void function [-Werror=return-type]
    }
    ^
   cc1: all warnings being treated as errors

vim +/rc +203 arch/powerpc/sysdev/axonram.c

dbdf04c40 Maxim Shchetynin   2007-07-20  177  
dbdf04c40 Maxim Shchetynin   2007-07-20  178  /**
dbdf04c40 Maxim Shchetynin   2007-07-20  179   * axon_ram_probe - probe() method for platform driver
000061245 Grant Likely       2011-02-22  180   * @device: see platform_driver method
dbdf04c40 Maxim Shchetynin   2007-07-20  181   */
000061245 Grant Likely       2011-02-22  182  static int axon_ram_probe(struct platform_device *device)
dbdf04c40 Maxim Shchetynin   2007-07-20  183  {
dbdf04c40 Maxim Shchetynin   2007-07-20  184  	static int axon_ram_bank_id = -1;
dbdf04c40 Maxim Shchetynin   2007-07-20  185  	struct axon_ram_bank *bank;
dbdf04c40 Maxim Shchetynin   2007-07-20  186  	struct resource resource;
dbdf04c40 Maxim Shchetynin   2007-07-20  187  
dbdf04c40 Maxim Shchetynin   2007-07-20  188  	axon_ram_bank_id++;
dbdf04c40 Maxim Shchetynin   2007-07-20  189  
dbdf04c40 Maxim Shchetynin   2007-07-20  190  	dev_info(&device->dev, "Found memory controller on %s\n",
61c7a080a Grant Likely       2010-04-13  191  			device->dev.of_node->full_name);
dbdf04c40 Maxim Shchetynin   2007-07-20  192  
12d94c464 Markus Elfring     2017-08-03  193  	bank = kzalloc(sizeof(*bank), GFP_KERNEL);
e54eff030 Markus Elfring     2017-08-03  194  	if (!bank)
e54eff030 Markus Elfring     2017-08-03  195  		return -ENOMEM;
dbdf04c40 Maxim Shchetynin   2007-07-20  196  
dbdf04c40 Maxim Shchetynin   2007-07-20  197  	device->dev.platform_data = bank;
dbdf04c40 Maxim Shchetynin   2007-07-20  198  
dbdf04c40 Maxim Shchetynin   2007-07-20  199  	bank->device = device;
dbdf04c40 Maxim Shchetynin   2007-07-20  200  
61c7a080a Grant Likely       2010-04-13  201  	if (of_address_to_resource(device->dev.of_node, 0, &resource) != 0) {
dbdf04c40 Maxim Shchetynin   2007-07-20  202  		dev_err(&device->dev, "Cannot access device tree\n");
dbdf04c40 Maxim Shchetynin   2007-07-20 @203  		rc = -EFAULT;
dbdf04c40 Maxim Shchetynin   2007-07-20  204  		goto failed;
dbdf04c40 Maxim Shchetynin   2007-07-20  205  	}
dbdf04c40 Maxim Shchetynin   2007-07-20  206  
28f65c11f Joe Perches        2011-06-09  207  	bank->size = resource_size(&resource);
dbdf04c40 Maxim Shchetynin   2007-07-20  208  
dbdf04c40 Maxim Shchetynin   2007-07-20  209  	if (bank->size == 0) {
dbdf04c40 Maxim Shchetynin   2007-07-20  210  		dev_err(&device->dev, "No DDR2 memory found for %s%d\n",
dbdf04c40 Maxim Shchetynin   2007-07-20  211  				AXON_RAM_DEVICE_NAME, axon_ram_bank_id);
dbdf04c40 Maxim Shchetynin   2007-07-20  212  		rc = -ENODEV;
dbdf04c40 Maxim Shchetynin   2007-07-20  213  		goto failed;
dbdf04c40 Maxim Shchetynin   2007-07-20  214  	}
dbdf04c40 Maxim Shchetynin   2007-07-20  215  
dbdf04c40 Maxim Shchetynin   2007-07-20  216  	dev_info(&device->dev, "Register DDR2 memory device %s%d with %luMB\n",
dbdf04c40 Maxim Shchetynin   2007-07-20  217  			AXON_RAM_DEVICE_NAME, axon_ram_bank_id, bank->size >> 20);
dbdf04c40 Maxim Shchetynin   2007-07-20  218  
dbdf04c40 Maxim Shchetynin   2007-07-20  219  	bank->ph_addr = resource.start;
40f1ce7fb Anton Blanchard    2011-05-08  220  	bank->io_addr = (unsigned long) ioremap_prot(
dbdf04c40 Maxim Shchetynin   2007-07-20  221  			bank->ph_addr, bank->size, _PAGE_NO_CACHE);
dbdf04c40 Maxim Shchetynin   2007-07-20  222  	if (bank->io_addr == 0) {
dbdf04c40 Maxim Shchetynin   2007-07-20  223  		dev_err(&device->dev, "ioremap() failed\n");
dbdf04c40 Maxim Shchetynin   2007-07-20  224  		rc = -EFAULT;
dbdf04c40 Maxim Shchetynin   2007-07-20  225  		goto failed;
dbdf04c40 Maxim Shchetynin   2007-07-20  226  	}
dbdf04c40 Maxim Shchetynin   2007-07-20  227  
dbdf04c40 Maxim Shchetynin   2007-07-20  228  	bank->disk = alloc_disk(AXON_RAM_MINORS_PER_DISK);
dbdf04c40 Maxim Shchetynin   2007-07-20  229  	if (bank->disk == NULL) {
dbdf04c40 Maxim Shchetynin   2007-07-20  230  		dev_err(&device->dev, "Cannot register disk\n");
dbdf04c40 Maxim Shchetynin   2007-07-20  231  		rc = -EFAULT;
dbdf04c40 Maxim Shchetynin   2007-07-20  232  		goto failed;
dbdf04c40 Maxim Shchetynin   2007-07-20  233  	}
dbdf04c40 Maxim Shchetynin   2007-07-20  234  
60fcd55cc Dan Williams       2017-01-25  235  
9a23409b6 Maxim Shchetynin   2008-07-16  236  	bank->disk->major = azfs_major;
9a23409b6 Maxim Shchetynin   2008-07-16  237  	bank->disk->first_minor = azfs_minor;
dbdf04c40 Maxim Shchetynin   2007-07-20  238  	bank->disk->fops = &axon_ram_devops;
dbdf04c40 Maxim Shchetynin   2007-07-20  239  	bank->disk->private_data = bank;
dbdf04c40 Maxim Shchetynin   2007-07-20  240  
dbdf04c40 Maxim Shchetynin   2007-07-20  241  	sprintf(bank->disk->disk_name, "%s%d",
dbdf04c40 Maxim Shchetynin   2007-07-20  242  			AXON_RAM_DEVICE_NAME, axon_ram_bank_id);
dbdf04c40 Maxim Shchetynin   2007-07-20  243  
60fcd55cc Dan Williams       2017-01-25  244  	bank->dax_dev = alloc_dax(bank, bank->disk->disk_name,
60fcd55cc Dan Williams       2017-01-25  245  			&axon_ram_dax_ops);
60fcd55cc Dan Williams       2017-01-25  246  	if (!bank->dax_dev) {
60fcd55cc Dan Williams       2017-01-25  247  		rc = -ENOMEM;
60fcd55cc Dan Williams       2017-01-25  248  		goto failed;
60fcd55cc Dan Williams       2017-01-25  249  	}
60fcd55cc Dan Williams       2017-01-25  250  
dbdf04c40 Maxim Shchetynin   2007-07-20  251  	bank->disk->queue = blk_alloc_queue(GFP_KERNEL);
dbdf04c40 Maxim Shchetynin   2007-07-20  252  	if (bank->disk->queue == NULL) {
dbdf04c40 Maxim Shchetynin   2007-07-20  253  		dev_err(&device->dev, "Cannot register disk queue\n");
dbdf04c40 Maxim Shchetynin   2007-07-20  254  		rc = -EFAULT;
dbdf04c40 Maxim Shchetynin   2007-07-20  255  		goto failed;
dbdf04c40 Maxim Shchetynin   2007-07-20  256  	}
dbdf04c40 Maxim Shchetynin   2007-07-20  257  
dbdf04c40 Maxim Shchetynin   2007-07-20  258  	set_capacity(bank->disk, bank->size >> AXON_RAM_SECTOR_SHIFT);
dbdf04c40 Maxim Shchetynin   2007-07-20  259  	blk_queue_make_request(bank->disk->queue, axon_ram_make_request);
e1defc4ff Martin K. Petersen 2009-05-22  260  	blk_queue_logical_block_size(bank->disk->queue, AXON_RAM_SECTOR_SIZE);
0d52c756a Dan Williams       2016-06-15  261  	device_add_disk(&device->dev, bank->disk);
dbdf04c40 Maxim Shchetynin   2007-07-20  262  
61c7a080a Grant Likely       2010-04-13  263  	bank->irq_id = irq_of_parse_and_map(device->dev.of_node, 0);
ef24ba709 Michael Ellerman   2016-09-06  264  	if (!bank->irq_id) {
dbdf04c40 Maxim Shchetynin   2007-07-20  265  		dev_err(&device->dev, "Cannot access ECC interrupt ID\n");
dbdf04c40 Maxim Shchetynin   2007-07-20  266  		rc = -EFAULT;
dbdf04c40 Maxim Shchetynin   2007-07-20  267  		goto failed;
dbdf04c40 Maxim Shchetynin   2007-07-20  268  	}
dbdf04c40 Maxim Shchetynin   2007-07-20  269  
fedcd2c53 Maxim Shchetynin   2007-08-23  270  	rc = request_irq(bank->irq_id, axon_ram_irq_handler,
dbdf04c40 Maxim Shchetynin   2007-07-20  271  			AXON_RAM_IRQ_FLAGS, bank->disk->disk_name, device);
dbdf04c40 Maxim Shchetynin   2007-07-20  272  	if (rc != 0) {
dbdf04c40 Maxim Shchetynin   2007-07-20  273  		dev_err(&device->dev, "Cannot register ECC interrupt handler\n");
ef24ba709 Michael Ellerman   2016-09-06  274  		bank->irq_id = 0;
dbdf04c40 Maxim Shchetynin   2007-07-20  275  		rc = -EFAULT;
dbdf04c40 Maxim Shchetynin   2007-07-20  276  		goto failed;
dbdf04c40 Maxim Shchetynin   2007-07-20  277  	}
dbdf04c40 Maxim Shchetynin   2007-07-20  278  
dbdf04c40 Maxim Shchetynin   2007-07-20  279  	rc = device_create_file(&device->dev, &dev_attr_ecc);
dbdf04c40 Maxim Shchetynin   2007-07-20  280  	if (rc != 0) {
dbdf04c40 Maxim Shchetynin   2007-07-20  281  		dev_err(&device->dev, "Cannot create sysfs file\n");
dbdf04c40 Maxim Shchetynin   2007-07-20  282  		rc = -EFAULT;
dbdf04c40 Maxim Shchetynin   2007-07-20  283  		goto failed;
dbdf04c40 Maxim Shchetynin   2007-07-20  284  	}
dbdf04c40 Maxim Shchetynin   2007-07-20  285  
9a23409b6 Maxim Shchetynin   2008-07-16  286  	azfs_minor += bank->disk->minors;
9a23409b6 Maxim Shchetynin   2008-07-16  287  
dbdf04c40 Maxim Shchetynin   2007-07-20  288  	return 0;
dbdf04c40 Maxim Shchetynin   2007-07-20  289  
dbdf04c40 Maxim Shchetynin   2007-07-20  290  failed:
ef24ba709 Michael Ellerman   2016-09-06  291  	if (bank->irq_id)
fedcd2c53 Maxim Shchetynin   2007-08-23  292  		free_irq(bank->irq_id, device);
dbdf04c40 Maxim Shchetynin   2007-07-20  293  	if (bank->disk != NULL) {
dbdf04c40 Maxim Shchetynin   2007-07-20  294  		if (bank->disk->major > 0)
dbdf04c40 Maxim Shchetynin   2007-07-20  295  			unregister_blkdev(bank->disk->major,
dbdf04c40 Maxim Shchetynin   2007-07-20  296  					bank->disk->disk_name);
672a2c87c Jan Kara           2017-03-08  297  		if (bank->disk->flags & GENHD_FL_UP)
dbdf04c40 Maxim Shchetynin   2007-07-20  298  			del_gendisk(bank->disk);
672a2c87c Jan Kara           2017-03-08  299  		put_disk(bank->disk);
dbdf04c40 Maxim Shchetynin   2007-07-20  300  	}
60fcd55cc Dan Williams       2017-01-25  301  	kill_dax(bank->dax_dev);
60fcd55cc Dan Williams       2017-01-25  302  	put_dax(bank->dax_dev);
dbdf04c40 Maxim Shchetynin   2007-07-20  303  	device->dev.platform_data = NULL;
dbdf04c40 Maxim Shchetynin   2007-07-20  304  	if (bank->io_addr != 0)
dbdf04c40 Maxim Shchetynin   2007-07-20  305  		iounmap((void __iomem *) bank->io_addr);
dbdf04c40 Maxim Shchetynin   2007-07-20  306  	kfree(bank);
dbdf04c40 Maxim Shchetynin   2007-07-20  307  	return rc;
dbdf04c40 Maxim Shchetynin   2007-07-20  308  }
dbdf04c40 Maxim Shchetynin   2007-07-20  309  

:::::: The code at line 203 was first introduced by commit
:::::: dbdf04c40161f81d74e27f04e201acb3a5dfad69 [CELL] driver for DDR2 memory on AXON

:::::: TO: Maxim Shchetynin <maxim@...ibm.com>
:::::: CC: Arnd Bergmann <arnd@...ppe.arndb.de>

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

Download attachment ".config.gz" of type "application/gzip" (23519 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ