LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [hch-block:remove-disk_name 7/9] block/partitions/mac.c:136:29: error: no member named 'bdev' in 'struct parsed_partitions'
@ 2021-07-24 19:43 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-07-24 19:43 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: clang-built-linux, kbuild-all, linux-kernel

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

tree:   git://git.infradead.org/users/hch/block.git remove-disk_name
head:   87e656f4eded79b0bb2d6dbe35f2b421b7444de3
commit: 00a22dc0ea475f8e3b0d871f0e99e20eaf3ed3b7 [7/9] block: store a gendisk in struct parsed_partitions
config: powerpc-randconfig-r033-20210723 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 3f2c1e99e44d028d5e9dd685f3c568f2661f2f68)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install powerpc cross compiling tool for clang build
        # apt-get install binutils-powerpc-linux-gnu
        git remote add hch-block git://git.infradead.org/users/hch/block.git
        git fetch --no-tags hch-block remove-disk_name
        git checkout 00a22dc0ea475f8e3b0d871f0e99e20eaf3ed3b7
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=powerpc SHELL=/bin/bash block/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> block/partitions/mac.c:136:29: error: no member named 'bdev' in 'struct parsed_partitions'
                   note_bootable_part(state->bdev->bd_dev, found_root,
                                      ~~~~~  ^
   1 error generated.


vim +136 block/partitions/mac.c

^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   30  
1493bf217f7f59 fs/partitions/mac.c    Tejun Heo              2010-05-15   31  int mac_partition(struct parsed_partitions *state)
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   32  {
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   33  	Sector sect;
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   34  	unsigned char *data;
fa7ea87a057958 fs/partitions/mac.c    Timo Warns             2011-02-17   35  	int slot, blocks_in_map;
02e2a5bfebe99e block/partitions/mac.c Kees Cook              2015-11-19   36  	unsigned secsize, datasize, partoffset;
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   37  #ifdef CONFIG_PPC_PMAC
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   38  	int found_root = 0;
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   39  	int found_root_goodness = 0;
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   40  #endif
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   41  	struct mac_partition *part;
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   42  	struct mac_driver_desc *md;
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   43  
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   44  	/* Get 0th block and look at the first partition map entry. */
1493bf217f7f59 fs/partitions/mac.c    Tejun Heo              2010-05-15   45  	md = read_part_sector(state, 0, &sect);
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   46  	if (!md)
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   47  		return -1;
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   48  	if (be16_to_cpu(md->signature) != MAC_DRIVER_MAGIC) {
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   49  		put_dev_sector(sect);
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   50  		return 0;
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   51  	}
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   52  	secsize = be16_to_cpu(md->block_size);
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   53  	put_dev_sector(sect);
02e2a5bfebe99e block/partitions/mac.c Kees Cook              2015-11-19   54  	datasize = round_down(secsize, 512);
02e2a5bfebe99e block/partitions/mac.c Kees Cook              2015-11-19   55  	data = read_part_sector(state, datasize / 512, &sect);
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   56  	if (!data)
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   57  		return -1;
02e2a5bfebe99e block/partitions/mac.c Kees Cook              2015-11-19   58  	partoffset = secsize % 512;
02e2a5bfebe99e block/partitions/mac.c Kees Cook              2015-11-19   59  	if (partoffset + sizeof(*part) > datasize)
02e2a5bfebe99e block/partitions/mac.c Kees Cook              2015-11-19   60  		return -1;
02e2a5bfebe99e block/partitions/mac.c Kees Cook              2015-11-19   61  	part = (struct mac_partition *) (data + partoffset);
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   62  	if (be16_to_cpu(part->signature) != MAC_PARTITION_MAGIC) {
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   63  		put_dev_sector(sect);
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   64  		return 0;		/* not a MacOS disk */
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   65  	}
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   66  	blocks_in_map = be32_to_cpu(part->map_count);
fa7ea87a057958 fs/partitions/mac.c    Timo Warns             2011-02-17   67  	if (blocks_in_map < 0 || blocks_in_map >= DISK_MAX_PARTS) {
fa7ea87a057958 fs/partitions/mac.c    Timo Warns             2011-02-17   68  		put_dev_sector(sect);
fa7ea87a057958 fs/partitions/mac.c    Timo Warns             2011-02-17   69  		return 0;
fa7ea87a057958 fs/partitions/mac.c    Timo Warns             2011-02-17   70  	}
06004e6eebdaf1 block/partitions/mac.c Ming Lei               2013-02-27   71  
06004e6eebdaf1 block/partitions/mac.c Ming Lei               2013-02-27   72  	if (blocks_in_map >= state->limit)
06004e6eebdaf1 block/partitions/mac.c Ming Lei               2013-02-27   73  		blocks_in_map = state->limit - 1;
06004e6eebdaf1 block/partitions/mac.c Ming Lei               2013-02-27   74  
fa7ea87a057958 fs/partitions/mac.c    Timo Warns             2011-02-17   75  	strlcat(state->pp_buf, " [mac]", PAGE_SIZE);
fa7ea87a057958 fs/partitions/mac.c    Timo Warns             2011-02-17   76  	for (slot = 1; slot <= blocks_in_map; ++slot) {
fa7ea87a057958 fs/partitions/mac.c    Timo Warns             2011-02-17   77  		int pos = slot * secsize;
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   78  		put_dev_sector(sect);
1493bf217f7f59 fs/partitions/mac.c    Tejun Heo              2010-05-15   79  		data = read_part_sector(state, pos/512, &sect);
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   80  		if (!data)
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   81  			return -1;
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   82  		part = (struct mac_partition *) (data + pos%512);
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   83  		if (be16_to_cpu(part->signature) != MAC_PARTITION_MAGIC)
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   84  			break;
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   85  		put_partition(state, slot,
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   86  			be32_to_cpu(part->start_block) * (secsize/512),
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   87  			be32_to_cpu(part->block_count) * (secsize/512));
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   88  
582940508b5d58 block/partitions/mac.c Rasmus Villemoes       2014-09-16   89  		if (!strncasecmp(part->type, "Linux_RAID", 10))
cc9106247de925 fs/partitions/mac.c    Cesar Eduardo Barros   2010-04-17   90  			state->parts[slot].flags = ADDPART_FLAG_RAID;
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   91  #ifdef CONFIG_PPC_PMAC
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   92  		/*
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   93  		 * If this is the first bootable partition, tell the
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   94  		 * setup code, in case it wants to make this the root.
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   95  		 */
e8222502ee6157 fs/partitions/mac.c    Benjamin Herrenschmidt 2006-03-28   96  		if (machine_is(powermac)) {
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   97  			int goodness = 0;
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   98  
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16   99  			mac_fix_string(part->processor, 16);
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16  100  			mac_fix_string(part->name, 32);
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16  101  			mac_fix_string(part->type, 32);					
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16  102  		    
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16  103  			if ((be32_to_cpu(part->status) & MAC_STATUS_BOOTABLE)
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16  104  			    && strcasecmp(part->processor, "powerpc") == 0)
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16  105  				goodness++;
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16  106  
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16  107  			if (strcasecmp(part->type, "Apple_UNIX_SVR2") == 0
582940508b5d58 block/partitions/mac.c Rasmus Villemoes       2014-09-16  108  			    || (strncasecmp(part->type, "Linux", 5) == 0
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16  109  			        && strcasecmp(part->type, "Linux_swap") != 0)) {
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16  110  				int i, l;
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16  111  
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16  112  				goodness++;
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16  113  				l = strlen(part->name);
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16  114  				if (strcmp(part->name, "/") == 0)
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16  115  					goodness++;
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16  116  				for (i = 0; i <= l - 4; ++i) {
582940508b5d58 block/partitions/mac.c Rasmus Villemoes       2014-09-16  117  					if (strncasecmp(part->name + i, "root",
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16  118  						     4) == 0) {
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16  119  						goodness += 2;
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16  120  						break;
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16  121  					}
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16  122  				}
582940508b5d58 block/partitions/mac.c Rasmus Villemoes       2014-09-16  123  				if (strncasecmp(part->name, "swap", 4) == 0)
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16  124  					goodness--;
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16  125  			}
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16  126  
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16  127  			if (goodness > found_root_goodness) {
fa7ea87a057958 fs/partitions/mac.c    Timo Warns             2011-02-17  128  				found_root = slot;
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16  129  				found_root_goodness = goodness;
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16  130  			}
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16  131  		}
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16  132  #endif /* CONFIG_PPC_PMAC */
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16  133  	}
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16  134  #ifdef CONFIG_PPC_PMAC
^1da177e4c3f41 fs/partitions/mac.c    Linus Torvalds         2005-04-16  135  	if (found_root_goodness)
1493bf217f7f59 fs/partitions/mac.c    Tejun Heo              2010-05-15 @136  		note_bootable_part(state->bdev->bd_dev, found_root,

:::::: The code at line 136 was first introduced by commit
:::::: 1493bf217f7f59a5d9e2095a7dbcec00fb36ca8b block: use struct parsed_partitions *state universally in partition check code

:::::: TO: Tejun Heo <tj@kernel.org>
:::::: CC: Jens Axboe <jens.axboe@oracle.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-24 20:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-24 19:43 [hch-block:remove-disk_name 7/9] block/partitions/mac.c:136:29: error: no member named 'bdev' in 'struct parsed_partitions' kernel test robot

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).