All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [hch-block:partitions-cleanup 15/19] block/partitions/msdos.c:70:31: error: initialization of 'struct msods_partition *' from incompatible pointer type 'struct msdos_partition *'
Date: Tue, 10 Mar 2020 03:37:46 +0800	[thread overview]
Message-ID: <202003100332.lsbDdErY%lkp@intel.com> (raw)

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

tree:   git://git.infradead.org/users/hch/block.git partitions-cleanup
head:   9afcbc4dac2e04e5ea9702fb4f3ad1508d7ad7b5
commit: d4f21164f4da96d8028c84105afd8b41d8923d38 [15/19] block: move struct partition out of genhd.h
config: openrisc-randconfig-a001-20200309 (attached as .config)
compiler: or1k-linux-gcc (GCC) 9.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 d4f21164f4da96d8028c84105afd8b41d8923d38
        # save the attached .config to linux build tree
        GCC_VERSION=9.2.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 >>):

   block/partitions/msdos.c: In function 'aix_magic_present':
>> block/partitions/msdos.c:70:31: error: initialization of 'struct msods_partition *' from incompatible pointer type 'struct msdos_partition *' [-Werror=incompatible-pointer-types]
      70 |  struct msods_partition *pt = (struct msdos_partition *) (p + 0x1be);
         |                               ^
   block/partitions/msdos.c:81:38: error: increment of pointer to an incomplete type 'struct msods_partition'
      81 |  for (slot = 1; slot <= 4; slot++, pt++) {
         |                                      ^~
   block/partitions/msdos.c:82:9: error: dereferencing pointer to incomplete type 'struct msods_partition'
      82 |   if (pt->sys_ind == LINUX_SWAP_PARTITION ||
         |         ^~
   block/partitions/msdos.c:86:26: error: passing argument 1 of 'is_extended_partition' from incompatible pointer type [-Werror=incompatible-pointer-types]
      86 |    is_extended_partition(pt))
         |                          ^~
         |                          |
         |                          struct msods_partition *
   block/partitions/msdos.c:47:65: note: expected 'struct msdos_partition *' but argument is of type 'struct msods_partition *'
      47 | static inline int is_extended_partition(struct msdos_partition *p)
         |                                         ~~~~~~~~~~~~~~~~~~~~~~~~^
   cc1: some warnings being treated as errors

vim +70 block/partitions/msdos.c

    62	
    63	/* Value is EBCDIC 'IBMA' */
    64	#define AIX_LABEL_MAGIC1	0xC9
    65	#define AIX_LABEL_MAGIC2	0xC2
    66	#define AIX_LABEL_MAGIC3	0xD4
    67	#define AIX_LABEL_MAGIC4	0xC1
    68	static int aix_magic_present(struct parsed_partitions *state, unsigned char *p)
    69	{
  > 70		struct msods_partition *pt = (struct msdos_partition *) (p + 0x1be);
    71		Sector sect;
    72		unsigned char *d;
    73		int slot, ret = 0;
    74	
    75		if (!(p[0] == AIX_LABEL_MAGIC1 &&
    76			p[1] == AIX_LABEL_MAGIC2 &&
    77			p[2] == AIX_LABEL_MAGIC3 &&
    78			p[3] == AIX_LABEL_MAGIC4))
    79			return 0;
    80		/* Assume the partition table is valid if Linux partitions exists */
    81		for (slot = 1; slot <= 4; slot++, pt++) {
    82			if (pt->sys_ind == LINUX_SWAP_PARTITION ||
    83				pt->sys_ind == LINUX_RAID_PARTITION ||
    84				pt->sys_ind == LINUX_DATA_PARTITION ||
    85				pt->sys_ind == LINUX_LVM_PARTITION ||
    86				is_extended_partition(pt))
    87				return 0;
    88		}
    89		d = read_part_sector(state, 7, &sect);
    90		if (d) {
    91			if (d[0] == '_' && d[1] == 'L' && d[2] == 'V' && d[3] == 'M')
    92				ret = 1;
    93			put_dev_sector(sect);
    94		}
    95		return ret;
    96	}
    97	

---
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: 30237 bytes --]

                 reply	other threads:[~2020-03-09 19:37 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=202003100332.lsbDdErY%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.