== Series Details == Series: drm/mm: Add an iterator to optimally walk over holes suitable for an allocation (rev4) URL : https://patchwork.freedesktop.org/series/100136/ State : warning == Summary == $ dim checkpatch origin/drm-tip 1a82dfc67642 drm/mm: Add an iterator to optimally walk over holes for an allocation (v4) -:153: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'pos' - possible side-effects? #153: FILE: include/drm/drm_mm.h:430: +#define drm_mm_for_each_suitable_hole(pos, mm, range_start, range_end, \ + size, mode) \ + for (pos = __drm_mm_first_hole(mm, range_start, range_end, size, \ + mode & ~DRM_MM_INSERT_ONCE); \ + pos; \ + pos = mode & DRM_MM_INSERT_ONCE ? \ + NULL : __drm_mm_next_hole(mm, pos, size, \ + mode & ~DRM_MM_INSERT_ONCE)) -:153: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'mm' - possible side-effects? #153: FILE: include/drm/drm_mm.h:430: +#define drm_mm_for_each_suitable_hole(pos, mm, range_start, range_end, \ + size, mode) \ + for (pos = __drm_mm_first_hole(mm, range_start, range_end, size, \ + mode & ~DRM_MM_INSERT_ONCE); \ + pos; \ + pos = mode & DRM_MM_INSERT_ONCE ? \ + NULL : __drm_mm_next_hole(mm, pos, size, \ + mode & ~DRM_MM_INSERT_ONCE)) -:153: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'size' - possible side-effects? #153: FILE: include/drm/drm_mm.h:430: +#define drm_mm_for_each_suitable_hole(pos, mm, range_start, range_end, \ + size, mode) \ + for (pos = __drm_mm_first_hole(mm, range_start, range_end, size, \ + mode & ~DRM_MM_INSERT_ONCE); \ + pos; \ + pos = mode & DRM_MM_INSERT_ONCE ? \ + NULL : __drm_mm_next_hole(mm, pos, size, \ + mode & ~DRM_MM_INSERT_ONCE)) -:153: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'mode' - possible side-effects? #153: FILE: include/drm/drm_mm.h:430: +#define drm_mm_for_each_suitable_hole(pos, mm, range_start, range_end, \ + size, mode) \ + for (pos = __drm_mm_first_hole(mm, range_start, range_end, size, \ + mode & ~DRM_MM_INSERT_ONCE); \ + pos; \ + pos = mode & DRM_MM_INSERT_ONCE ? \ + NULL : __drm_mm_next_hole(mm, pos, size, \ + mode & ~DRM_MM_INSERT_ONCE)) -:153: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'mode' may be better as '(mode)' to avoid precedence issues #153: FILE: include/drm/drm_mm.h:430: +#define drm_mm_for_each_suitable_hole(pos, mm, range_start, range_end, \ + size, mode) \ + for (pos = __drm_mm_first_hole(mm, range_start, range_end, size, \ + mode & ~DRM_MM_INSERT_ONCE); \ + pos; \ + pos = mode & DRM_MM_INSERT_ONCE ? \ + NULL : __drm_mm_next_hole(mm, pos, size, \ + mode & ~DRM_MM_INSERT_ONCE)) total: 0 errors, 0 warnings, 5 checks, 114 lines checked 0a3739e5ef01 drm/i915/gem: Don't try to map and fence large scanout buffers (v9)