From: Jani Nikula <jani.nikula@linux.intel.com>
To: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>,
daniel@ffwll.ch, intel-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
David Airlie <airlied@linux.ie>
Cc: pankaj.laxminarayan.bharadiya@intel.com
Subject: Re: [PATCH] drm/i915: Remove WARN_ON and WARN_ON_ONCE overrides.
Date: Thu, 02 Apr 2020 09:22:47 +0300 [thread overview]
Message-ID: <87lfnemmo8.fsf@intel.com> (raw)
In-Reply-To: <20200402055241.24789-1-pankaj.laxminarayan.bharadiya@intel.com>
On Thu, 02 Apr 2020, Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com> wrote:
> Now we have new struct drm_device based drm_WARN* macros. These are
> preferred over the regular WARN* macros.
>
> Remove WARN_ON and WARN_ON_ONCE overriedes to avoid any temptations to
> use them in the future.
Well, since they are overrides of macros in bug.h, the users are still
there. There are still 100+ users in i915. You just don't get as much
information with them after this patch.
I'm not opposed to this patch, but at the same time I'd like to see more
converted to the drm_WARN* alternatives.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
BR,
Jani.
>
> Suggested-by: Jani Nikula <jani.nikula@intel.com>
> Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
> ---
> drivers/gpu/drm/i915/i915_utils.h | 15 ---------------
> 1 file changed, 15 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_utils.h b/drivers/gpu/drm/i915/i915_utils.h
> index 03a73d2bd50d..c666a64375d9 100644
> --- a/drivers/gpu/drm/i915/i915_utils.h
> +++ b/drivers/gpu/drm/i915/i915_utils.h
> @@ -36,21 +36,6 @@ struct timer_list;
>
> #define FDO_BUG_URL "https://gitlab.freedesktop.org/drm/intel/-/wikis/How-to-file-i915-bugs"
>
> -#undef WARN_ON
> -/* Many gcc seem to no see through this and fall over :( */
> -#if 0
> -#define WARN_ON(x) ({ \
> - bool __i915_warn_cond = (x); \
> - if (__builtin_constant_p(__i915_warn_cond)) \
> - BUILD_BUG_ON(__i915_warn_cond); \
> - WARN(__i915_warn_cond, "WARN_ON(" #x ")"); })
> -#else
> -#define WARN_ON(x) WARN((x), "%s", "WARN_ON(" __stringify(x) ")")
> -#endif
> -
> -#undef WARN_ON_ONCE
> -#define WARN_ON_ONCE(x) WARN_ONCE((x), "%s", "WARN_ON_ONCE(" __stringify(x) ")")
> -
> #define MISSING_CASE(x) WARN(1, "Missing case (%s == %ld)\n", \
> __stringify(x), (long)(x))
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>,
daniel@ffwll.ch, intel-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
David Airlie <airlied@linux.ie>
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Remove WARN_ON and WARN_ON_ONCE overrides.
Date: Thu, 02 Apr 2020 09:22:47 +0300 [thread overview]
Message-ID: <87lfnemmo8.fsf@intel.com> (raw)
In-Reply-To: <20200402055241.24789-1-pankaj.laxminarayan.bharadiya@intel.com>
On Thu, 02 Apr 2020, Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com> wrote:
> Now we have new struct drm_device based drm_WARN* macros. These are
> preferred over the regular WARN* macros.
>
> Remove WARN_ON and WARN_ON_ONCE overriedes to avoid any temptations to
> use them in the future.
Well, since they are overrides of macros in bug.h, the users are still
there. There are still 100+ users in i915. You just don't get as much
information with them after this patch.
I'm not opposed to this patch, but at the same time I'd like to see more
converted to the drm_WARN* alternatives.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
BR,
Jani.
>
> Suggested-by: Jani Nikula <jani.nikula@intel.com>
> Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
> ---
> drivers/gpu/drm/i915/i915_utils.h | 15 ---------------
> 1 file changed, 15 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_utils.h b/drivers/gpu/drm/i915/i915_utils.h
> index 03a73d2bd50d..c666a64375d9 100644
> --- a/drivers/gpu/drm/i915/i915_utils.h
> +++ b/drivers/gpu/drm/i915/i915_utils.h
> @@ -36,21 +36,6 @@ struct timer_list;
>
> #define FDO_BUG_URL "https://gitlab.freedesktop.org/drm/intel/-/wikis/How-to-file-i915-bugs"
>
> -#undef WARN_ON
> -/* Many gcc seem to no see through this and fall over :( */
> -#if 0
> -#define WARN_ON(x) ({ \
> - bool __i915_warn_cond = (x); \
> - if (__builtin_constant_p(__i915_warn_cond)) \
> - BUILD_BUG_ON(__i915_warn_cond); \
> - WARN(__i915_warn_cond, "WARN_ON(" #x ")"); })
> -#else
> -#define WARN_ON(x) WARN((x), "%s", "WARN_ON(" __stringify(x) ")")
> -#endif
> -
> -#undef WARN_ON_ONCE
> -#define WARN_ON_ONCE(x) WARN_ONCE((x), "%s", "WARN_ON_ONCE(" __stringify(x) ")")
> -
> #define MISSING_CASE(x) WARN(1, "Missing case (%s == %ld)\n", \
> __stringify(x), (long)(x))
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2020-04-02 6:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-02 5:52 [PATCH] drm/i915: Remove WARN_ON and WARN_ON_ONCE overrides Pankaj Bharadiya
2020-04-02 5:52 ` [Intel-gfx] " Pankaj Bharadiya
2020-04-02 6:22 ` Jani Nikula [this message]
2020-04-02 6:22 ` Jani Nikula
2020-04-02 7:27 ` Daniel Vetter
2020-04-02 7:27 ` [Intel-gfx] " Daniel Vetter
2020-04-02 8:09 ` Jani Nikula
2020-04-02 8:09 ` [Intel-gfx] " Jani Nikula
2020-04-02 7:01 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2020-04-03 10:34 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lfnemmo8.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=joonas.lahtinen@linux.intel.com \
--cc=pankaj.laxminarayan.bharadiya@intel.com \
--cc=rodrigo.vivi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.