From: "Arnd Bergmann" <arnd@kernel.org>
To: "Randy Dunlap" <rdunlap@infradead.org>,
"Damien Le Moal" <damien.lemoal@opensource.wdc.com>
Cc: linux-kernel@vger.kernel.org, "Arnd Bergmann" <arnd@arndb.de>,
"Luis Machado" <luis.machado@arm.com>,
linux-ide@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] ata: ahci: fix enum constants for gcc-13
Date: Thu, 01 Dec 2022 22:27:34 +0100 [thread overview]
Message-ID: <c88afa91-72a9-4905-a710-90655f97831d@app.fastmail.com> (raw)
In-Reply-To: <7e5f86c0-04b3-aa68-565a-7b86f1e1553d@infradead.org>
On Thu, Dec 1, 2022, at 21:48, Randy Dunlap wrote:
> On 12/1/22 12:43, Arnd Bergmann wrote:
>> From: Arnd Bergmann <arnd@arndb.de>
>>
>> gcc-13 slightly changes the type of constant expressions that are deifined
>
> defined
fixed
>> ---
>> drivers/ata/ahci.h | 234 ++++++++++++++++++++++-----------------------
>> 1 file changed, 117 insertions(+), 117 deletions(-)
>
> What #include <linux/bits.h> ?
> or is it just done indirectly?
Good point. It survived a build test, and it's one of the headers that
is almost always included from somewhere, but you are correct that
there should be an explicit include here as well.
I also found that PORT_CMD_ICC_MASK is still a negative number
that needs to be changed:
@@ -178,10 +178,10 @@ enum {
PORT_CMD_SPIN_UP = BIT(1), /* Spin up device */
PORT_CMD_START = BIT(0), /* Enable port DMA engine */
- PORT_CMD_ICC_MASK = (0xf << 28), /* i/f ICC state mask */
- PORT_CMD_ICC_ACTIVE = (0x1 << 28), /* Put i/f in active state */
- PORT_CMD_ICC_PARTIAL = (0x2 << 28), /* Put i/f in partial state */
- PORT_CMD_ICC_SLUMBER = (0x6 << 28), /* Put i/f in slumber state */
+ PORT_CMD_ICC_MASK = (0xfu << 28), /* i/f ICC state mask */
+ PORT_CMD_ICC_ACTIVE = (0x1u << 28), /* Put i/f in active state */
+ PORT_CMD_ICC_PARTIAL = (0x2u << 28), /* Put i/f in partial state */
+ PORT_CMD_ICC_SLUMBER = (0x6u << 28), /* Put i/f in slumber state */
/* PORT_CMD capabilities mask */
PORT_CMD_CAP = PORT_CMD_HPCP | PORT_CMD_MPSP |
I've addressed all three issues now, will send a v2 after Luis is
able to validate that this fixes the problem.
Arnd
prev parent reply other threads:[~2022-12-01 21:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-01 20:43 [PATCH] ata: ahci: fix enum constants for gcc-13 Arnd Bergmann
2022-12-01 20:48 ` Randy Dunlap
2022-12-01 21:27 ` Arnd Bergmann [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=c88afa91-72a9-4905-a710-90655f97831d@app.fastmail.com \
--to=arnd@kernel.org \
--cc=arnd@arndb.de \
--cc=damien.lemoal@opensource.wdc.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luis.machado@arm.com \
--cc=rdunlap@infradead.org \
--cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox