From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [hch-block:cdrom-ioctl 1/4] drivers/cdrom/cdrom.c:605:6: error: 'struct gendisk' has no member named 'cdi'
Date: Fri, 03 Apr 2020 23:35:32 +0800 [thread overview]
Message-ID: <202004032329.PRDruGOD%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4007 bytes --]
tree: git://git.infradead.org/users/hch/block.git cdrom-ioctl
head: d92a395a2879e4d28a0df8b364d6a9420aa6718e
commit: b53754b0a60252074ae989d4d8514dc2bb469806 [1/4] block: add a cdrom_device_info pointer to struct gendisk
config: openrisc-randconfig-a001-20200403 (attached as .config)
compiler: or1k-linux-gcc (GCC) 9.3.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 b53754b0a60252074ae989d4d8514dc2bb469806
# save the attached .config to linux build tree
GCC_VERSION=9.3.0 make.cross ARCH=openrisc
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/blkdev.h:11,
from drivers/cdrom/cdrom.c:283:
include/linux/genhd.h:223:2: error: expected ':', ',', ';', '}' or '__attribute__' before 'int'
223 | int node_id;
| ^~~
drivers/cdrom/cdrom.c: In function 'register_cdrom':
>> drivers/cdrom/cdrom.c:605:6: error: 'struct gendisk' has no member named 'cdi'
605 | disk->cdi = cdi;
| ^~
--
In file included from block//partitions/core.c:9:
include/linux/genhd.h:223:2: error: expected ':', ',', ';', '}' or '__attribute__' before 'int'
223 | int node_id;
| ^~~
block//partitions/core.c: In function 'add_partition':
>> block//partitions/core.c:400:56: error: 'struct gendisk' has no member named 'node_id'
400 | pinfo = kzalloc_node(sizeof(*pinfo), GFP_KERNEL, disk->node_id);
| ^~
vim +605 drivers/cdrom/cdrom.c
588
589 int register_cdrom(struct gendisk *disk, struct cdrom_device_info *cdi)
590 {
591 static char banner_printed;
592 const struct cdrom_device_ops *cdo = cdi->ops;
593
594 cd_dbg(CD_OPEN, "entering register_cdrom\n");
595
596 if (cdo->open == NULL || cdo->release == NULL)
597 return -EINVAL;
598 if (!banner_printed) {
599 pr_info("Uniform CD-ROM driver " REVISION "\n");
600 banner_printed = 1;
601 cdrom_sysctl_register();
602 }
603
604 cdi->disk = disk;
> 605 disk->cdi = cdi;
606
607 ENSURE(cdo, drive_status, CDC_DRIVE_STATUS);
608 if (cdo->check_events == NULL && cdo->media_changed == NULL)
609 WARN_ON_ONCE(cdo->capability & (CDC_MEDIA_CHANGED | CDC_SELECT_DISC));
610 ENSURE(cdo, tray_move, CDC_CLOSE_TRAY | CDC_OPEN_TRAY);
611 ENSURE(cdo, lock_door, CDC_LOCK);
612 ENSURE(cdo, select_speed, CDC_SELECT_SPEED);
613 ENSURE(cdo, get_last_session, CDC_MULTI_SESSION);
614 ENSURE(cdo, get_mcn, CDC_MCN);
615 ENSURE(cdo, reset, CDC_RESET);
616 ENSURE(cdo, generic_packet, CDC_GENERIC_PACKET);
617 cdi->mc_flags = 0;
618 cdi->options = CDO_USE_FFLAGS;
619
620 if (autoclose == 1 && CDROM_CAN(CDC_CLOSE_TRAY))
621 cdi->options |= (int) CDO_AUTO_CLOSE;
622 if (autoeject == 1 && CDROM_CAN(CDC_OPEN_TRAY))
623 cdi->options |= (int) CDO_AUTO_EJECT;
624 if (lockdoor == 1)
625 cdi->options |= (int) CDO_LOCK;
626 if (check_media_type == 1)
627 cdi->options |= (int) CDO_CHECK_TYPE;
628
629 if (CDROM_CAN(CDC_MRW_W))
630 cdi->exit = cdrom_mrw_exit;
631
632 if (cdi->disk)
633 cdi->cdda_method = CDDA_BPC_FULL;
634 else
635 cdi->cdda_method = CDDA_OLD;
636
637 WARN_ON(!cdo->generic_packet);
638
639 cd_dbg(CD_REG_UNREG, "drive \"/dev/%s\" registered\n", cdi->name);
640 mutex_lock(&cdrom_mutex);
641 list_add(&cdi->list, &cdrom_list);
642 mutex_unlock(&cdrom_mutex);
643 return 0;
644 }
645 #undef ENSURE
646
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 24742 bytes --]
reply other threads:[~2020-04-03 15:35 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=202004032329.PRDruGOD%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.