* [Qemu-devel] [PATCH] ahci: fix ICC mask definition
@ 2015-07-21 18:02 John Snow
2015-07-30 18:41 ` John Snow
0 siblings, 1 reply; 3+ messages in thread
From: John Snow @ 2015-07-21 18:02 UTC (permalink / raw)
To: qemu-block; +Cc: John Snow, peter.maydell, qemu-devel
There are likely others that could be updated, but we'll
go with a light touch for 2.4 for now.
Without the Unsigned specifier, this shifts bits into the
signed bit, which makes clang unhappy and could cause
unwanted behavior.
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: John Snow <jsnow@redhat.com>
---
hw/ide/ahci.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/ide/ahci.h b/hw/ide/ahci.h
index 68d5074..79a463d 100644
--- a/hw/ide/ahci.h
+++ b/hw/ide/ahci.h
@@ -127,7 +127,7 @@
#define PORT_CMD_SPIN_UP (1 << 1) /* Spin up device */
#define PORT_CMD_START (1 << 0) /* Enable port DMA engine */
-#define PORT_CMD_ICC_MASK (0xf << 28) /* i/f ICC state mask */
+#define PORT_CMD_ICC_MASK (0xfU << 28) /* i/f ICC state mask */
#define PORT_CMD_ICC_ACTIVE (0x1 << 28) /* Put i/f in active state */
#define PORT_CMD_ICC_PARTIAL (0x2 << 28) /* Put i/f in partial state */
#define PORT_CMD_ICC_SLUMBER (0x6 << 28) /* Put i/f in slumber state */
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] ahci: fix ICC mask definition
2015-07-21 18:02 [Qemu-devel] [PATCH] ahci: fix ICC mask definition John Snow
@ 2015-07-30 18:41 ` John Snow
2015-07-30 20:11 ` Peter Maydell
0 siblings, 1 reply; 3+ messages in thread
From: John Snow @ 2015-07-30 18:41 UTC (permalink / raw)
To: qemu-block; +Cc: peter.maydell, qemu-devel
Peter: I assume you still want this for 2.4 to fix the clang warnings, yes?
On 07/21/2015 02:02 PM, John Snow wrote:
> There are likely others that could be updated, but we'll
> go with a light touch for 2.4 for now.
>
> Without the Unsigned specifier, this shifts bits into the
> signed bit, which makes clang unhappy and could cause
> unwanted behavior.
>
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
> hw/ide/ahci.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/ide/ahci.h b/hw/ide/ahci.h
> index 68d5074..79a463d 100644
> --- a/hw/ide/ahci.h
> +++ b/hw/ide/ahci.h
> @@ -127,7 +127,7 @@
> #define PORT_CMD_SPIN_UP (1 << 1) /* Spin up device */
> #define PORT_CMD_START (1 << 0) /* Enable port DMA engine */
>
> -#define PORT_CMD_ICC_MASK (0xf << 28) /* i/f ICC state mask */
> +#define PORT_CMD_ICC_MASK (0xfU << 28) /* i/f ICC state mask */
> #define PORT_CMD_ICC_ACTIVE (0x1 << 28) /* Put i/f in active state */
> #define PORT_CMD_ICC_PARTIAL (0x2 << 28) /* Put i/f in partial state */
> #define PORT_CMD_ICC_SLUMBER (0x6 << 28) /* Put i/f in slumber state */
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-07-30 20:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-21 18:02 [Qemu-devel] [PATCH] ahci: fix ICC mask definition John Snow
2015-07-30 18:41 ` John Snow
2015-07-30 20:11 ` Peter Maydell
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).