linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org
Subject: drivers/cdrom/gdrom.c:797:3: error: 'rc' undeclared
Date: Thu, 25 Oct 2018 14:19:48 +0800	[thread overview]
Message-ID: <201810251440.SeZ4xMtb%fengguang.wu@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 3834 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   01aa9d518eae8a4d75cd3049defc6ed0b6d0a658
commit: ad5fc6bb72214615f300af1f4ed57f71bc3be510 gdrom: convert to blk-mq
date:   9 days ago
config: sh-dreamcast_defconfig (attached as .config)
compiler: sh4-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout ad5fc6bb72214615f300af1f4ed57f71bc3be510
        # save the attached .config to linux build tree
        GCC_VERSION=7.2.0 make.cross ARCH=sh 

All errors (new ones prefixed by >>):

   drivers/cdrom/gdrom.c: In function 'probe_gdrom':
>> drivers/cdrom/gdrom.c:797:3: error: 'rc' undeclared (first use in this function)
      rc = PTR_ERR(gd.gdrom_rq);
      ^~
   drivers/cdrom/gdrom.c:797:3: note: each undeclared identifier is reported only once for each function it appears in

vim +/rc +797 drivers/cdrom/gdrom.c

   749	
   750	/*
   751	 * register this as a block device and as compliant with the
   752	 * universal CD Rom driver interface
   753	 */
   754	static int probe_gdrom(struct platform_device *devptr)
   755	{
   756		int err;
   757		/* Start the device */
   758		if (gdrom_execute_diagnostic() != 1) {
   759			pr_warning("ATA Probe for GDROM failed\n");
   760			return -ENODEV;
   761		}
   762		/* Print out firmware ID */
   763		if (gdrom_outputversion())
   764			return -ENOMEM;
   765		/* Register GDROM */
   766		gdrom_major = register_blkdev(0, GDROM_DEV_NAME);
   767		if (gdrom_major <= 0)
   768			return gdrom_major;
   769		pr_info("Registered with major number %d\n",
   770			gdrom_major);
   771		/* Specify basic properties of drive */
   772		gd.cd_info = kzalloc(sizeof(struct cdrom_device_info), GFP_KERNEL);
   773		if (!gd.cd_info) {
   774			err = -ENOMEM;
   775			goto probe_fail_no_mem;
   776		}
   777		probe_gdrom_setupcd();
   778		gd.disk = alloc_disk(1);
   779		if (!gd.disk) {
   780			err = -ENODEV;
   781			goto probe_fail_no_disk;
   782		}
   783		probe_gdrom_setupdisk();
   784		if (register_cdrom(gd.cd_info)) {
   785			err = -ENODEV;
   786			goto probe_fail_cdrom_register;
   787		}
   788		gd.disk->fops = &gdrom_bdops;
   789		/* latch on to the interrupt */
   790		err = gdrom_set_interrupt_handlers();
   791		if (err)
   792			goto probe_fail_cmdirq_register;
   793	
   794		gd.gdrom_rq = blk_mq_init_sq_queue(&gd.tag_set, &gdrom_mq_ops, 1,
   795					BLK_MQ_F_SHOULD_MERGE | BLK_MQ_F_BLOCKING);
   796		if (IS_ERR(gd.gdrom_rq)) {
 > 797			rc = PTR_ERR(gd.gdrom_rq);
   798			gd.gdrom_rq = NULL;
   799			goto probe_fail_requestq;
   800		}
   801	
   802		blk_queue_bounce_limit(gd.gdrom_rq, BLK_BOUNCE_HIGH);
   803	
   804		err = probe_gdrom_setupqueue();
   805		if (err)
   806			goto probe_fail_toc;
   807	
   808		gd.toc = kzalloc(sizeof(struct gdromtoc), GFP_KERNEL);
   809		if (!gd.toc) {
   810			err = -ENOMEM;
   811			goto probe_fail_toc;
   812		}
   813		add_disk(gd.disk);
   814		return 0;
   815	
   816	probe_fail_toc:
   817		blk_cleanup_queue(gd.gdrom_rq);
   818		blk_mq_free_tag_set(&gd.tag_set);
   819	probe_fail_requestq:
   820		free_irq(HW_EVENT_GDROM_DMA, &gd);
   821		free_irq(HW_EVENT_GDROM_CMD, &gd);
   822	probe_fail_cmdirq_register:
   823	probe_fail_cdrom_register:
   824		del_gendisk(gd.disk);
   825	probe_fail_no_disk:
   826		kfree(gd.cd_info);
   827	probe_fail_no_mem:
   828		unregister_blkdev(gdrom_major, GDROM_DEV_NAME);
   829		gdrom_major = 0;
   830		pr_warning("Probe failed - error is 0x%X\n", err);
   831		return err;
   832	}
   833	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 11077 bytes --]

                 reply	other threads:[~2018-10-25  6:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201810251440.SeZ4xMtb%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=axboe@kernel.dk \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).