Skip to contentSkip to conversation

mailbox: make cmd_dma a __le64 to reduce warnings

PATCH In review Ben Dooks (Codethink) 2 participants 2 messages Dec 19, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mailbox: make cmd_dma a __le64 to reduce warnings

The cmd_dma of the brcm_sba_command is often set from the result of cpu_to_le64, which means it should really be an __le64 type to avoid warnings such as:

drivers/dma/bcm-sba-raid.c:583:25: warning: incorrect type in assignment (different base types)
drivers/dma/bcm-sba-raid.c:583:25: expected unsigned long long [usertype]
drivers/dma/bcm-sba-raid.c:583:25: got restricted __le64 [usertype]

Note, this header dos not seem to be covered by the maintainers file, so just sending to the normal lists.

---
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

---
 include/linux/mailbox/brcm-message.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/mailbox/brcm-message.h +1 -1
index 18da82115476..db49dc360a6b 100644
@@ -21,7 +21,7 @@ enum brcm_message_type {
 
 struct brcm_sba_command {
 	u64 cmd;
-	u64 *cmd_dma;
+	__le64 *cmd_dma;
 	dma_addr_t cmd_dma_addr;
 #define BRCM_SBA_CMD_TYPE_A		BIT(0)
 #define BRCM_SBA_CMD_TYPE_B		BIT(1)
Signature · 1 line
2.24.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Ben Dooks (Codethink)

The cmd_dma of the brcm_sba_command is often set from the result of cpu_to_le64, which means it should really be an __le64 type to avoid warnings such as:

It actually is always set from the result of cpu_to_le64() which is why this is the correct thing to do.

Quoted 9 lines

drivers/dma/bcm-sba-raid.c:583:25: warning: incorrect type in assignment (different base types)
drivers/dma/bcm-sba-raid.c:583:25: expected unsigned long long [usertype]
drivers/dma/bcm-sba-raid.c:583:25: got restricted __le64 [usertype]

Note, this header dos not seem to be covered by the maintainers file, so just sending to the normal lists.

Signature · 1 line
Florian