Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915: make debug printer shown_bug_once variable to drm_i915_private
Date: Fri, 15 Nov 2019 12:20:11 +0200	[thread overview]
Message-ID: <87eey91lwk.fsf@intel.com> (raw)
In-Reply-To: <20191115101840.23921-2-jani.nikula@intel.com>

On Fri, 15 Nov 2019, Jani Nikula <jani.nikula@intel.com> wrote:
> Get rid of the module specific static variable.

Subject should say s/make/move/.

>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.h   | 2 ++
>  drivers/gpu/drm/i915/i915_utils.c | 9 ++++-----
>  2 files changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 1779f600fcfb..e11ee3268ae3 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1283,6 +1283,8 @@ struct drm_i915_private {
>  	/* Mutex to protect the above hdcp component related values. */
>  	struct mutex hdcp_comp_mutex;
>  
> +	bool shown_bug_once;
> +
>  	I915_SELFTEST_DECLARE(struct i915_selftest_stash selftest;)
>  
>  	/*
> diff --git a/drivers/gpu/drm/i915/i915_utils.c b/drivers/gpu/drm/i915/i915_utils.c
> index c47261ae86ea..f434274b0b29 100644
> --- a/drivers/gpu/drm/i915/i915_utils.c
> +++ b/drivers/gpu/drm/i915/i915_utils.c
> @@ -13,11 +13,10 @@
>  		    "providing the dmesg log by booting with drm.debug=0xf"
>  
>  void
> -__i915_printk(struct drm_i915_private *dev_priv, const char *level,
> +__i915_printk(struct drm_i915_private *i915, const char *level,
>  	      const char *fmt, ...)
>  {
> -	static bool shown_bug_once;
> -	struct device *kdev = dev_priv->drm.dev;
> +	struct device *kdev = i915->drm.dev;
>  	bool is_error = level[1] <= KERN_ERR[1];
>  	bool is_debug = level[1] == KERN_DEBUG[1];
>  	struct va_format vaf;
> @@ -39,7 +38,7 @@ __i915_printk(struct drm_i915_private *dev_priv, const char *level,
>  
>  	va_end(args);
>  
> -	if (is_error && !shown_bug_once) {
> +	if (is_error && !i915->shown_bug_once) {
>  		/*
>  		 * Ask the user to file a bug report for the error, except
>  		 * if they may have caused the bug by fiddling with unsafe
> @@ -47,7 +46,7 @@ __i915_printk(struct drm_i915_private *dev_priv, const char *level,
>  		 */
>  		if (!test_taint(TAINT_USER))
>  			dev_notice(kdev, "%s", FDO_BUG_MSG);
> -		shown_bug_once = true;
> +		i915->shown_bug_once = true;
>  	}
>  }

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

WARNING: multiple messages have this Message-ID (diff)
From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 2/2] drm/i915: make debug printer shown_bug_once variable to drm_i915_private
Date: Fri, 15 Nov 2019 12:20:11 +0200	[thread overview]
Message-ID: <87eey91lwk.fsf@intel.com> (raw)
Message-ID: <20191115102011.Wj6wau7HBebbiKJ7pJbYfPw6HrU_kvOwX9ZP30A5fbg@z> (raw)
In-Reply-To: <20191115101840.23921-2-jani.nikula@intel.com>

On Fri, 15 Nov 2019, Jani Nikula <jani.nikula@intel.com> wrote:
> Get rid of the module specific static variable.

Subject should say s/make/move/.

>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.h   | 2 ++
>  drivers/gpu/drm/i915/i915_utils.c | 9 ++++-----
>  2 files changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 1779f600fcfb..e11ee3268ae3 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1283,6 +1283,8 @@ struct drm_i915_private {
>  	/* Mutex to protect the above hdcp component related values. */
>  	struct mutex hdcp_comp_mutex;
>  
> +	bool shown_bug_once;
> +
>  	I915_SELFTEST_DECLARE(struct i915_selftest_stash selftest;)
>  
>  	/*
> diff --git a/drivers/gpu/drm/i915/i915_utils.c b/drivers/gpu/drm/i915/i915_utils.c
> index c47261ae86ea..f434274b0b29 100644
> --- a/drivers/gpu/drm/i915/i915_utils.c
> +++ b/drivers/gpu/drm/i915/i915_utils.c
> @@ -13,11 +13,10 @@
>  		    "providing the dmesg log by booting with drm.debug=0xf"
>  
>  void
> -__i915_printk(struct drm_i915_private *dev_priv, const char *level,
> +__i915_printk(struct drm_i915_private *i915, const char *level,
>  	      const char *fmt, ...)
>  {
> -	static bool shown_bug_once;
> -	struct device *kdev = dev_priv->drm.dev;
> +	struct device *kdev = i915->drm.dev;
>  	bool is_error = level[1] <= KERN_ERR[1];
>  	bool is_debug = level[1] == KERN_DEBUG[1];
>  	struct va_format vaf;
> @@ -39,7 +38,7 @@ __i915_printk(struct drm_i915_private *dev_priv, const char *level,
>  
>  	va_end(args);
>  
> -	if (is_error && !shown_bug_once) {
> +	if (is_error && !i915->shown_bug_once) {
>  		/*
>  		 * Ask the user to file a bug report for the error, except
>  		 * if they may have caused the bug by fiddling with unsafe
> @@ -47,7 +46,7 @@ __i915_printk(struct drm_i915_private *dev_priv, const char *level,
>  		 */
>  		if (!test_taint(TAINT_USER))
>  			dev_notice(kdev, "%s", FDO_BUG_MSG);
> -		shown_bug_once = true;
> +		i915->shown_bug_once = true;
>  	}
>  }

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2019-11-15 10:20 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-15 10:18 [PATCH 1/2] drm/i915: move power domains dumped variable to drm_i915_private Jani Nikula
2019-11-15 10:18 ` [Intel-gfx] " Jani Nikula
2019-11-15 10:18 ` [PATCH 2/2] drm/i915: make debug printer shown_bug_once " Jani Nikula
2019-11-15 10:18   ` [Intel-gfx] " Jani Nikula
2019-11-15 10:20   ` Jani Nikula [this message]
2019-11-15 10:20     ` Jani Nikula
2019-11-15 10:21   ` Chris Wilson
2019-11-15 10:21     ` [Intel-gfx] " Chris Wilson
2019-11-15 11:04     ` Jani Nikula
2019-11-15 11:04       ` [Intel-gfx] " Jani Nikula
2019-11-15 11:08       ` Chris Wilson
2019-11-15 11:08         ` [Intel-gfx] " Chris Wilson
2019-12-11 10:36         ` Jani Nikula
2019-12-11 15:25           ` Joonas Lahtinen
2019-12-12  7:33             ` Vivi, Rodrigo
2019-12-12  7:34             ` Jani Nikula
2019-11-15 12:05 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: move power domains dumped " Patchwork
2019-11-15 12:05   ` [Intel-gfx] " Patchwork
2019-11-16 16:36 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-11-16 16:36   ` [Intel-gfx] " 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=87eey91lwk.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox