All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Burton <paulburton@kernel.org>
To: Jonas Gorski <jonas.gorski@gmail.com>
Cc: linux-mips@vger.kernel.org
Cc: Ralf Baechle <ralf@linux-mips.org>,
	Paul Burton <paulburton@kernel.org>,
	James Hogan <jhogan@kernel.org>,
	Florian Fainelli <f.fainelli@gmail.com>
Cc: linux-mips@vger.kernel.org
Subject: Re: [PATCH v2] MIPS: bmips: mark exception vectors as char arrays
Date: Wed, 23 Oct 2019 22:02:16 -0700	[thread overview]
Message-ID: <5db13059.1c69fb81.8b85a.373d@mx.google.com> (raw)
In-Reply-To: <20191022191100.19373-1-jonas.gorski@gmail.com>

Hello,

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;

Applied to mips-fixes.

> commit e4f5cb1a9b27
> https://git.kernel.org/mips/c/e4f5cb1a9b27
> 
> Fixes: 18a1eef92dcd ("MIPS: BMIPS: Introduce bmips.h")
> Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
> Signed-off-by: Paul Burton <paulburton@kernel.org>

Thanks,
    Paul

[ This message was auto-generated; if you believe anything is incorrect
  then please email paulburton@kernel.org to report it. ]

      parent reply	other threads:[~2019-10-24  5:02 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
2019-10-24  5:02 ` Paul Burton [this message]

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=5db13059.1c69fb81.8b85a.373d@mx.google.com \
    --to=paulburton@kernel.org \
    --cc=jonas.gorski@gmail.com \
    --cc=linux-mips@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 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.