[Intel-gfx] [RFC 1/7] treewide: device: add condition support to dev_WARN
Jani Nikula
jani.nikula at intel.com
Wed Jan 8 11:13:53 UTC 2020
On Mon, 06 Jan 2020, Pankaj Bharadiya <pankaj.laxminarayan.bharadiya at intel.com> wrote:
> dev_WARN does not support conditional warning unlike WARN.
>
> Add condition support to dev_WARN (file: include/linux/device.h)
> to make it work like WARN and modify all existing callers to use it.
>
> This is quite useful where we want to replace existing WARN with
> dev_WARN.
>
> Following cocci script is used to replace all the caller
>
> @@
> expression T;
> @@
> -dev_WARN(T,
> +dev_WARN(T, 1,
> ...)
>
> command: spatch --sp-file <.cocci> --dir ./ --in-place --include-headers
>
> Fix "drivers/gpu/drm/nouveau/include/nvkm/subdev/timer.h" manually as
> coccinelle is unable to parse this file.
Regardless of whether this patch itself makes sense or not, basing the
rest of your series on a treewide change subject to massive amounts of
bikeshedding is probably a bad idea. You'll potentially delay the
merging of the series by several kernel releases.
You'll probably want to handle this in i915 or drm level.
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
More information about the Intel-gfx
mailing list