== Series Details == Series: iosys-map: Add word-sized reads URL : https://patchwork.freedesktop.org/series/104947/ State : warning == Summary == Error: dim checkpatch failed 9f93e9ff5930 iosys-map: Add word-sized reads -:38: WARNING:TYPO_SPELLING: 'accidentaly' may be misspelled - perhaps 'accidentally'? #38: changes to track object creation time. This happens to accidentaly ^^^^^^^^^^^ -: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, 5 warnings, 7 checks, 38 lines checked