[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] hw/ssi/xilinx_spips.c:52:1: warning: "CS" redefined
From: |
Peter Crosthwaite |
Subject: |
Re: [Qemu-devel] hw/ssi/xilinx_spips.c:52:1: warning: "CS" redefined |
Date: |
Fri, 14 Jun 2013 22:40:20 +1000 |
Hi Michael,
On Fri, Jun 14, 2013 at 5:11 PM, Michael Tokarev <address@hidden> wrote:
> This warning is produced when compiling qemu on solaris
> (openindiana).
>
> /usr/include/sys/regset.h:98:1: warning: this is the location
> of the previous definition
>
> (I don't know how regset.h is included)
>
> The code reads:
>
> ...
> #define MANUAL_CS (1 << 14)
> #define CS (0xF << 10)
> #define CS_SHIFT (10)
> ...
>
>
> And other than the #define, this constant is never used.
> There are a few usages of CS_SHIFT (shouldn't it be used
> when defining CS too?) and MANUAL_CS. A few other
> constants defined in there, like, for example, IFMODE,
> are not used too.
>
I prefer to keep the macro definition set complete to match the TRM as
it makes the device model closer to self documenting.
> Can we get rid of this so-likely-to-clash-with-something
> definition?
>
CS_MASK would probably be the best short term substitution. Longer
term we should preface field macros with their reg names which will
make them more bullet proof.
Regards,
Peter
> Thanks,
>
> /mjt