Skip to contentSkip to conversation

staging: emxx_udc: replace bool with unsigned base type to fix possible alignment warning

PATCH In review Jules Irenge 2 participants 2 messages Mar 8, 2019 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: emxx_udc: replace bool with unsigned base type to fix possible alignment warning

replace bool with unsigned base type to fix the checkpatch.pl warning
Avoid using bool structure members because of possible alignment issues

---
 drivers/staging/emxx_udc/emxx_udc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/emxx_udc/emxx_udc.h +1 -1
index b8c3dee5626c..4a610bc90db3 100644
@@ -528,7 +528,7 @@ struct nbu2ss_req {
 	struct list_head		queue;
 
 	u32			div_len;
-	bool		dma_flag;
+	unsigned int		dma_flag;
 	bool		zero;
 
 	bool		unaligned;
Signature · 1 line
2.20.1
maintainer
#1 lore raw
Quoted 13 lines · Jules Irenge

replace bool with unsigned base type to fix the checkpatch.pl warning
Avoid using bool structure members because of possible alignment issues

---
 drivers/staging/emxx_udc/emxx_udc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/emxx_udc/emxx_udc.h +0 -0
index b8c3dee5626c..4a610bc90db3 100644

drivers/staging/emxx_udc/emxx_udc.h struct nbu2ss_req { · line 531

Quoted 5 lines
drivers/staging/emxx_udc/emxx_udc.h +1 -1
@@ -528,7 +528,7 @@ struct nbu2ss_req {
 	struct list_head		queue;
 
 	u32			div_len;
-	bool		dma_flag;
+	unsigned int		dma_flag;

No, there's no issue with the original code here. See the archives for why making this type of change is not always what you want to do.

thanks,

greg k-h