[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for cgroup private data and DRM/i915 integration (rev3)

Jani Nikula jani.nikula at linux.intel.com
Thu Mar 22 10:12:35 UTC 2018


On Wed, 21 Mar 2018, Patchwork <patchwork at emeril.freedesktop.org> wrote:
> == Series Details ==
>
> Series: cgroup private data and DRM/i915 integration (rev3)
> URL   : https://patchwork.freedesktop.org/series/40142/
> State : warning
>
> == Summary ==
>
> $ dim checkpatch origin/drm-tip
> 8c23fa59eef7 cgroup: Allow registration and lookup of cgroup private data (v3)
> 95f12a7ecd5d cgroup: Introduce task_get_dfl_cgroup() (v2)
> b6569483024f cgroup: Introduce cgroup_priv_get_current
> f8a545376030 drm/i915: Adjust internal priority definitions (v2)
> 8e4b9162691c drm/i915: cgroup integration (v4)
> -:36: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
> #36: 
> new file mode 100644
>
> -:280: WARNING:LONG_LINE: line over 100 characters
> #280: FILE: include/uapi/drm/i915_drm.h:381:
> +#define DRM_IOCTL_I915_CGROUP_SETPARAM		DRM_IOW(DRM_COMMAND_BASE + DRM_I915_CGROUP_SETPARAM, struct drm_i915_cgroup_param)
>
> total: 0 errors, 2 warnings, 0 checks, 247 lines checked
> 44858a8e8b6f drm/i915: Introduce 'priority offset' for GPU contexts (v4)
> -:125: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'def' - possible side-effects?
> #125: FILE: drivers/gpu/drm/i915/i915_cgroup.c:173:
> +#define CGROUP_GET(name, field, def) \
> +int i915_cgroup_get_current_##name(struct drm_i915_private *dev_priv)	\
> +{									\
> +	struct kref *ref;						\
> +	int val = def;							\
> +	if (!dev_priv->cgroup_priv_key)					\
> +		return def;						\

Could return val here to only use def once. Even though none of the
macro instantiations use side-effects. No biggie.

BR,
Jani.

> +	ref = cgroup_priv_get_current(dev_priv->cgroup_priv_key);	\
> +	if (ref) {							\
> +		val = cgrp_ref_to_i915(ref)->field;			\
> +		kref_put(ref, i915_cgroup_free);			\
> +	}								\
> +	return val;							\
> +}
>
> total: 0 errors, 0 warnings, 1 checks, 164 lines checked
> 5909f05aaca5 drm/i915: Introduce per-cgroup display boost setting
> -:83: CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations
> #83: FILE: drivers/gpu/drm/i915/i915_drv.h:2719:
>  }
> +static inline int
>
> total: 0 errors, 0 warnings, 1 checks, 89 lines checked
> 5b1782be5720 drm/i915: Add context priority & priority offset to debugfs (v2)
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Technology Center


More information about the Intel-gfx mailing list