[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] iosys-map: Add per-word read
Patchwork
patchwork at emeril.freedesktop.org
Fri Jun 10 23:59:32 UTC 2022
== Series Details ==
Series: series starting with [1/3] iosys-map: Add per-word read
URL : https://patchwork.freedesktop.org/series/105011/
State : warning
== Summary ==
Error: dim checkpatch failed
553952dee006 iosys-map: Add per-word read
-:69: ERROR:SPACING: spaces required around that ':' (ctx:VxW)
#69: FILE: include/linux/iosys-map.h:338:
+ u64: val_ = readq(vaddr_iomem_),
^
-:69: WARNING:INDENTED_LABEL: labels should not be indented
#69: FILE: include/linux/iosys-map.h:338:
+ u64: val_ = readq(vaddr_iomem_),
-:74: CHECK:CAMELCASE: Avoid CamelCase: <_Generic>
#74: FILE: include/linux/iosys-map.h:343:
+#define __iosys_map_rd_io(val__, vaddr_iomem__, type__) _Generic(val__, \
-:74: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'val__' - possible side-effects?
#74: FILE: include/linux/iosys-map.h:343:
+#define __iosys_map_rd_io(val__, vaddr_iomem__, type__) _Generic(val__, \
+ u8: val__ = readb(vaddr_iomem__), \
+ u16: val__ = readw(vaddr_iomem__), \
+ u32: val__ = readl(vaddr_iomem__), \
+ __iosys_map_rd_io_u64_case(val__, vaddr_iomem__) \
+ default: memcpy_fromio(&(val__), vaddr_iomem__, sizeof(val__)))
-:74: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'vaddr_iomem__' - possible side-effects?
#74: FILE: include/linux/iosys-map.h:343:
+#define __iosys_map_rd_io(val__, vaddr_iomem__, type__) _Generic(val__, \
+ u8: val__ = readb(vaddr_iomem__), \
+ u16: val__ = readw(vaddr_iomem__), \
+ u32: val__ = readl(vaddr_iomem__), \
+ __iosys_map_rd_io_u64_case(val__, vaddr_iomem__) \
+ default: memcpy_fromio(&(val__), vaddr_iomem__, sizeof(val__)))
-:75: ERROR:SPACING: spaces required around that ':' (ctx:VxW)
#75: FILE: include/linux/iosys-map.h:344:
+ u8: val__ = readb(vaddr_iomem__), \
^
-:75: WARNING:INDENTED_LABEL: labels should not be indented
#75: FILE: include/linux/iosys-map.h:344:
+ u8: val__ = readb(vaddr_iomem__), \
-:76: ERROR:SPACING: spaces required around that ':' (ctx:VxW)
#76: FILE: include/linux/iosys-map.h:345:
+ u16: val__ = readw(vaddr_iomem__), \
^
-:76: WARNING:INDENTED_LABEL: labels should not be indented
#76: FILE: include/linux/iosys-map.h:345:
+ u16: val__ = readw(vaddr_iomem__), \
-:77: ERROR:SPACING: spaces required around that ':' (ctx:VxW)
#77: FILE: include/linux/iosys-map.h:346:
+ u32: val__ = readl(vaddr_iomem__), \
^
-:77: WARNING:INDENTED_LABEL: labels should not be indented
#77: FILE: include/linux/iosys-map.h:346:
+ u32: val__ = readl(vaddr_iomem__), \
-:79: ERROR:SPACING: spaces required around that ':' (ctx:VxW)
#79: FILE: include/linux/iosys-map.h:348:
+ default: memcpy_fromio(&(val__), vaddr_iomem__, sizeof(val__)))
^
-:79: ERROR:TRAILING_STATEMENTS: trailing statements should be on next line
#79: FILE: include/linux/iosys-map.h:348:
+ default: memcpy_fromio(&(val__), vaddr_iomem__, sizeof(val__)))
-:92: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'map__' - possible side-effects?
#92: FILE: include/linux/iosys-map.h:363:
+#define iosys_map_rd(map__, offset__, type__) ({ \
+ type__ val; \
+ if ((map__)->is_iomem) { \
+ __iosys_map_rd_io(val, (map__)->vaddr_iomem + offset__, type__);\
+ } else { \
+ memcpy(&val, (map__)->vaddr + offset__, sizeof(val)); \
+ } \
+ val; \
})
-:92: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'offset__' - possible side-effects?
#92: FILE: include/linux/iosys-map.h:363:
+#define iosys_map_rd(map__, offset__, type__) ({ \
+ type__ val; \
+ if ((map__)->is_iomem) { \
+ __iosys_map_rd_io(val, (map__)->vaddr_iomem + offset__, type__);\
+ } else { \
+ memcpy(&val, (map__)->vaddr + offset__, sizeof(val)); \
+ } \
+ val; \
})
-:92: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'offset__' may be better as '(offset__)' to avoid precedence issues
#92: FILE: include/linux/iosys-map.h:363:
+#define iosys_map_rd(map__, offset__, type__) ({ \
+ type__ val; \
+ if ((map__)->is_iomem) { \
+ __iosys_map_rd_io(val, (map__)->vaddr_iomem + offset__, type__);\
+ } else { \
+ memcpy(&val, (map__)->vaddr + offset__, sizeof(val)); \
+ } \
+ val; \
})
-:92: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'type__' - possible side-effects?
#92: FILE: include/linux/iosys-map.h:363:
+#define iosys_map_rd(map__, offset__, type__) ({ \
+ type__ val; \
+ if ((map__)->is_iomem) { \
+ __iosys_map_rd_io(val, (map__)->vaddr_iomem + offset__, type__);\
+ } else { \
+ memcpy(&val, (map__)->vaddr + offset__, sizeof(val)); \
+ } \
+ val; \
})
total: 6 errors, 4 warnings, 7 checks, 38 lines checked
977a62b00c03 iosys-map: Add per-word write
-:20: ERROR:SPACING: spaces required around that ':' (ctx:VxW)
#20: FILE: include/linux/iosys-map.h:340:
+ u64: writeq(val_, vaddr_iomem_),
^
-:20: WARNING:INDENTED_LABEL: labels should not be indented
#20: FILE: include/linux/iosys-map.h:340:
+ u64: writeq(val_, vaddr_iomem_),
-:31: CHECK:CAMELCASE: Avoid CamelCase: <_Generic>
#31: FILE: include/linux/iosys-map.h:353:
+#define __iosys_map_wr_io(val__, vaddr_iomem__, type__) _Generic(val__, \
-:31: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'val__' - possible side-effects?
#31: FILE: include/linux/iosys-map.h:353:
+#define __iosys_map_wr_io(val__, vaddr_iomem__, type__) _Generic(val__, \
+ u8: writeb(val__, vaddr_iomem__), \
+ u16: writew(val__, vaddr_iomem__), \
+ u32: writel(val__, vaddr_iomem__), \
+ __iosys_map_wr_io_u64_case(val__, vaddr_iomem__) \
+ default: memcpy_toio(vaddr_iomem__, &val, sizeof(val)))
-:31: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'vaddr_iomem__' - possible side-effects?
#31: FILE: include/linux/iosys-map.h:353:
+#define __iosys_map_wr_io(val__, vaddr_iomem__, type__) _Generic(val__, \
+ u8: writeb(val__, vaddr_iomem__), \
+ u16: writew(val__, vaddr_iomem__), \
+ u32: writel(val__, vaddr_iomem__), \
+ __iosys_map_wr_io_u64_case(val__, vaddr_iomem__) \
+ default: memcpy_toio(vaddr_iomem__, &val, sizeof(val)))
-:32: ERROR:SPACING: spaces required around that ':' (ctx:VxW)
#32: FILE: include/linux/iosys-map.h:354:
+ u8: writeb(val__, vaddr_iomem__), \
^
-:32: WARNING:INDENTED_LABEL: labels should not be indented
#32: FILE: include/linux/iosys-map.h:354:
+ u8: writeb(val__, vaddr_iomem__), \
-:33: ERROR:SPACING: spaces required around that ':' (ctx:VxW)
#33: FILE: include/linux/iosys-map.h:355:
+ u16: writew(val__, vaddr_iomem__), \
^
-:33: WARNING:INDENTED_LABEL: labels should not be indented
#33: FILE: include/linux/iosys-map.h:355:
+ u16: writew(val__, vaddr_iomem__), \
-:34: ERROR:SPACING: spaces required around that ':' (ctx:VxW)
#34: FILE: include/linux/iosys-map.h:356:
+ u32: writel(val__, vaddr_iomem__), \
^
-:34: WARNING:INDENTED_LABEL: labels should not be indented
#34: FILE: include/linux/iosys-map.h:356:
+ u32: writel(val__, vaddr_iomem__), \
-:36: ERROR:SPACING: spaces required around that ':' (ctx:VxW)
#36: FILE: include/linux/iosys-map.h:358:
+ default: memcpy_toio(vaddr_iomem__, &val, sizeof(val)))
^
-:36: ERROR:TRAILING_STATEMENTS: trailing statements should be on next line
#36: FILE: include/linux/iosys-map.h:358:
+ default: memcpy_toio(vaddr_iomem__, &val, sizeof(val)))
-:48: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'map__' - possible side-effects?
#48: FILE: include/linux/iosys-map.h:394:
+#define iosys_map_wr(map__, offset__, type__, val__) ({ \
+ type__ val = (val__); \
+ if ((map__)->is_iomem) { \
+ __iosys_map_wr_io(val, (map__)->vaddr_iomem + offset__, type__);\
+ } else { \
+ memcpy((map__)->vaddr + offset__, &val, sizeof(val)); \
+ } \
})
-:48: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'offset__' - possible side-effects?
#48: FILE: include/linux/iosys-map.h:394:
+#define iosys_map_wr(map__, offset__, type__, val__) ({ \
+ type__ val = (val__); \
+ if ((map__)->is_iomem) { \
+ __iosys_map_wr_io(val, (map__)->vaddr_iomem + offset__, type__);\
+ } else { \
+ memcpy((map__)->vaddr + offset__, &val, sizeof(val)); \
+ } \
})
-:48: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'offset__' may be better as '(offset__)' to avoid precedence issues
#48: FILE: include/linux/iosys-map.h:394:
+#define iosys_map_wr(map__, offset__, type__, val__) ({ \
+ type__ val = (val__); \
+ if ((map__)->is_iomem) { \
+ __iosys_map_wr_io(val, (map__)->vaddr_iomem + offset__, type__);\
+ } else { \
+ memcpy((map__)->vaddr + offset__, &val, sizeof(val)); \
+ } \
})
-:48: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'type__' - possible side-effects?
#48: FILE: include/linux/iosys-map.h:394:
+#define iosys_map_wr(map__, offset__, type__, val__) ({ \
+ type__ val = (val__); \
+ if ((map__)->is_iomem) { \
+ __iosys_map_wr_io(val, (map__)->vaddr_iomem + offset__, type__);\
+ } else { \
+ memcpy((map__)->vaddr + offset__, &val, sizeof(val)); \
+ } \
})
total: 6 errors, 4 warnings, 7 checks, 40 lines checked
a823cb121a12 iosys-map: Fix typo in documentation
More information about the Intel-gfx
mailing list