lkml.org 
[lkml]   [2022]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] ata: ahci: fix enum constants for gcc-13
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

\
 
 \ /
  Last update: 2022-12-01 22:31    [W:0.029 / U:0.680 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site