* [Qemu-devel] [PATCH] target-xtensa: mark XtensaConfig structs as unused
@ 2014-09-14 19:36 Peter Maydell
2014-09-14 20:29 ` Max Filippov
0 siblings, 1 reply; 5+ messages in thread
From: Peter Maydell @ 2014-09-14 19:36 UTC (permalink / raw)
To: qemu-devel; +Cc: Max Filippov, patches
The XtensaConfig structs will be defined but not used if they are
for the opposite endianness from that of the binary being built;
keep the compiler from complaining about this by marking them
with the 'unused' attribute.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
This works, although it's a tad ugly. If anybody wants to suggest
something better...
target-xtensa/core-dc232b.c | 2 +-
target-xtensa/core-dc233c.c | 2 +-
target-xtensa/core-fsf.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/target-xtensa/core-dc232b.c b/target-xtensa/core-dc232b.c
index c51e11e..a3b914b 100644
--- a/target-xtensa/core-dc232b.c
+++ b/target-xtensa/core-dc232b.c
@@ -33,7 +33,7 @@
#include "core-dc232b/core-isa.h"
#include "overlay_tool.h"
-static const XtensaConfig dc232b = {
+static const XtensaConfig dc232b __attribute__((unused)) = {
.name = "dc232b",
.gdb_regmap = {
.num_regs = 120,
diff --git a/target-xtensa/core-dc233c.c b/target-xtensa/core-dc233c.c
index 42dd64f..ac745d1 100644
--- a/target-xtensa/core-dc233c.c
+++ b/target-xtensa/core-dc233c.c
@@ -34,7 +34,7 @@
#include "core-dc233c/core-isa.h"
#include "overlay_tool.h"
-static const XtensaConfig dc233c = {
+static const XtensaConfig dc233c __attribute__((unused)) = {
.name = "dc233c",
.gdb_regmap = {
.num_regs = 121,
diff --git a/target-xtensa/core-fsf.c b/target-xtensa/core-fsf.c
index 6859bee..cfcc840 100644
--- a/target-xtensa/core-fsf.c
+++ b/target-xtensa/core-fsf.c
@@ -33,7 +33,7 @@
#include "core-fsf/core-isa.h"
#include "overlay_tool.h"
-static const XtensaConfig fsf = {
+static const XtensaConfig fsf __attribute__((unused)) = {
.name = "fsf",
/* GDB for this core is not supported currently */
.clock_freq_khz = 10000,
--
2.0.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] target-xtensa: mark XtensaConfig structs as unused
2014-09-14 19:36 [Qemu-devel] [PATCH] target-xtensa: mark XtensaConfig structs as unused Peter Maydell
@ 2014-09-14 20:29 ` Max Filippov
2014-10-10 16:24 ` Peter Maydell
0 siblings, 1 reply; 5+ messages in thread
From: Max Filippov @ 2014-09-14 20:29 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-devel, patches
On Sun, Sep 14, 2014 at 12:36 PM, Peter Maydell
<peter.maydell@linaro.org> wrote:
> The XtensaConfig structs will be defined but not used if they are
> for the opposite endianness from that of the binary being built;
> keep the compiler from complaining about this by marking them
> with the 'unused' attribute.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> This works, although it's a tad ugly. If anybody wants to suggest
> something better...
Fine for me.
> target-xtensa/core-dc232b.c | 2 +-
> target-xtensa/core-dc233c.c | 2 +-
> target-xtensa/core-fsf.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
--
Thanks.
-- Max
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] target-xtensa: mark XtensaConfig structs as unused
2014-09-14 20:29 ` Max Filippov
@ 2014-10-10 16:24 ` Peter Maydell
2014-10-10 17:20 ` Max Filippov
2014-10-23 6:37 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
0 siblings, 2 replies; 5+ messages in thread
From: Peter Maydell @ 2014-10-10 16:24 UTC (permalink / raw)
To: Max Filippov; +Cc: QEMU Trivial, qemu-devel, Patch Tracking
On 14 September 2014 21:29, Max Filippov <jcmvbkbc@gmail.com> wrote:
> On Sun, Sep 14, 2014 at 12:36 PM, Peter Maydell
> <peter.maydell@linaro.org> wrote:
>> The XtensaConfig structs will be defined but not used if they are
>> for the opposite endianness from that of the binary being built;
>> keep the compiler from complaining about this by marking them
>> with the 'unused' attribute.
>>
>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>> ---
>> This works, although it's a tad ugly. If anybody wants to suggest
>> something better...
>
> Fine for me.
>
>> target-xtensa/core-dc232b.c | 2 +-
>> target-xtensa/core-dc233c.c | 2 +-
>> target-xtensa/core-fsf.c | 2 +-
>> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> Acked-by: Max Filippov <jcmvbkbc@gmail.com>
Thanks. I guess we could put this one in through
-trivial ?
Patchwork url:
http://patchwork.ozlabs.org/patch/389115/
-- PMM
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] target-xtensa: mark XtensaConfig structs as unused
2014-10-10 16:24 ` Peter Maydell
@ 2014-10-10 17:20 ` Max Filippov
2014-10-23 6:37 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
1 sibling, 0 replies; 5+ messages in thread
From: Max Filippov @ 2014-10-10 17:20 UTC (permalink / raw)
To: Peter Maydell; +Cc: QEMU Trivial, qemu-devel, Patch Tracking
On Fri, Oct 10, 2014 at 8:24 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 14 September 2014 21:29, Max Filippov <jcmvbkbc@gmail.com> wrote:
>> On Sun, Sep 14, 2014 at 12:36 PM, Peter Maydell
>> <peter.maydell@linaro.org> wrote:
>>> The XtensaConfig structs will be defined but not used if they are
>>> for the opposite endianness from that of the binary being built;
>>> keep the compiler from complaining about this by marking them
>>> with the 'unused' attribute.
>>>
>>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>>> ---
>>> This works, although it's a tad ugly. If anybody wants to suggest
>>> something better...
>>
>> Fine for me.
>>
>>> target-xtensa/core-dc232b.c | 2 +-
>>> target-xtensa/core-dc233c.c | 2 +-
>>> target-xtensa/core-fsf.c | 2 +-
>>> 3 files changed, 3 insertions(+), 3 deletions(-)
>>
>> Acked-by: Max Filippov <jcmvbkbc@gmail.com>
>
> Thanks. I guess we could put this one in through
> -trivial ?
Yes, please.
> Patchwork url:
> http://patchwork.ozlabs.org/patch/389115/
--
Thanks.
-- Max
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [Qemu-trivial] [PATCH] target-xtensa: mark XtensaConfig structs as unused
2014-10-10 16:24 ` Peter Maydell
2014-10-10 17:20 ` Max Filippov
@ 2014-10-23 6:37 ` Michael Tokarev
1 sibling, 0 replies; 5+ messages in thread
From: Michael Tokarev @ 2014-10-23 6:37 UTC (permalink / raw)
To: Peter Maydell, Max Filippov; +Cc: QEMU Trivial, qemu-devel, Patch Tracking
On 10/10/2014 08:24 PM, Peter Maydell wrote:
> On 14 September 2014 21:29, Max Filippov <jcmvbkbc@gmail.com> wrote:
>> On Sun, Sep 14, 2014 at 12:36 PM, Peter Maydell
>> <peter.maydell@linaro.org> wrote:
>>> The XtensaConfig structs will be defined but not used if they are
>>> for the opposite endianness from that of the binary being built;
>>> keep the compiler from complaining about this by marking them
>>> with the 'unused' attribute.
Applied to -trivial, thanks!
/mjt
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-10-23 6:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-14 19:36 [Qemu-devel] [PATCH] target-xtensa: mark XtensaConfig structs as unused Peter Maydell
2014-09-14 20:29 ` Max Filippov
2014-10-10 16:24 ` Peter Maydell
2014-10-10 17:20 ` Max Filippov
2014-10-23 6:37 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
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).