linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Jonas Gorski <jonas.gorski@gmail.com>, linux-mips@vger.kernel.org
Cc: Ralf Baechle <ralf@linux-mips.org>,
	Paul Burton <paulburton@kernel.org>,
	James Hogan <jhogan@kernel.org>
Subject: Re: [PATCH v2] MIPS: bmips: mark exception vectors as char arrays
Date: Wed, 23 Oct 2019 20:44:36 -0700	[thread overview]
Message-ID: <6ead3ba9-7e7c-b134-e9e4-4e3faca99f41@gmail.com> (raw)
In-Reply-To: <20191022191100.19373-1-jonas.gorski@gmail.com>



On 10/22/2019 12:11 PM, Jonas Gorski wrote:
> The vectors span more than one byte, so mark them as arrays.
> 
> Fixes the following build error when building when using GCC 8.3:
> 
> In file included from ./include/linux/string.h:19,
>                  from ./include/linux/bitmap.h:9,
>                  from ./include/linux/cpumask.h:12,
>                  from ./arch/mips/include/asm/processor.h:15,
>                  from ./arch/mips/include/asm/thread_info.h:16,
>                  from ./include/linux/thread_info.h:38,
>                  from ./include/asm-generic/preempt.h:5,
>                  from ./arch/mips/include/generated/asm/preempt.h:1,
>                  from ./include/linux/preempt.h:81,
>                  from ./include/linux/spinlock.h:51,
>                  from ./include/linux/mmzone.h:8,
>                  from ./include/linux/bootmem.h:8,
>                  from arch/mips/bcm63xx/prom.c:10:
> arch/mips/bcm63xx/prom.c: In function 'prom_init':
> ./arch/mips/include/asm/string.h:162:11: error: '__builtin_memcpy' forming offset [2, 32] is out of the bounds [0, 1] of object 'bmips_smp_movevec' with type 'char' [-Werror=array-bounds]
>    __ret = __builtin_memcpy((dst), (src), __len); \
>            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> arch/mips/bcm63xx/prom.c:97:3: note: in expansion of macro 'memcpy'
>    memcpy((void *)0xa0000200, &bmips_smp_movevec, 0x20);
>    ^~~~~~
> In file included from arch/mips/bcm63xx/prom.c:14:
> ./arch/mips/include/asm/bmips.h:80:13: note: 'bmips_smp_movevec' declared here
>  extern char bmips_smp_movevec;
> 
> Fixes: 18a1eef92dcd ("MIPS: BMIPS: Introduce bmips.h")
> Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

  reply	other threads:[~2019-10-24  3:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-22 19:11 [PATCH v2] MIPS: bmips: mark exception vectors as char arrays Jonas Gorski
2019-10-24  3:44 ` Florian Fainelli [this message]
2019-10-24  5:02 ` Paul Burton

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=6ead3ba9-7e7c-b134-e9e4-4e3faca99f41@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=jhogan@kernel.org \
    --cc=jonas.gorski@gmail.com \
    --cc=linux-mips@vger.kernel.org \
    --cc=paulburton@kernel.org \
    --cc=ralf@linux-mips.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).