Message ID | 82857a0c04d3c11ca6758f05c13a3cec4f1a2f01.1722951405.git.jani.nikula@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/i915: remove __i915_printk() | expand |
-----Original Message----- From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Jani Nikula Sent: Tuesday, August 6, 2024 6:39 AM To: intel-gfx@lists.freedesktop.org Cc: Nikula, Jani <jani.nikula@intel.com> Subject: [PATCH 1/3] drm/i915: remove a few __i915_printk() uses > > __i915_printk() does nothing for notice/info levels. Just use the > regular drm_notice() and drm_info() calls. > > Signed-off-by: Jani Nikula <jani.nikula@intel.com> LGTM. Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> -Jonathan Cavitt > --- > drivers/gpu/drm/i915/i915_utils.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_utils.c b/drivers/gpu/drm/i915/i915_utils.c > index 6f9e7b354b54..bee32222f0fd 100644 > --- a/drivers/gpu/drm/i915/i915_utils.c > +++ b/drivers/gpu/drm/i915/i915_utils.c > @@ -54,8 +54,8 @@ __i915_printk(struct drm_i915_private *dev_priv, const char *level, > > void add_taint_for_CI(struct drm_i915_private *i915, unsigned int taint) > { > - __i915_printk(i915, KERN_NOTICE, "CI tainted:%#x by %pS\n", > - taint, (void *)_RET_IP_); > + drm_notice(&i915->drm, "CI tainted: %#x by %pS\n", > + taint, __builtin_return_address(0)); > > /* Failures that occur during fault injection testing are expected */ > if (!i915_error_injected()) > @@ -74,9 +74,9 @@ int __i915_inject_probe_error(struct drm_i915_private *i915, int err, > if (++i915_probe_fail_count < i915_modparams.inject_probe_failure) > return 0; > > - __i915_printk(i915, KERN_INFO, > - "Injecting failure %d at checkpoint %u [%s:%d]\n", > - err, i915_modparams.inject_probe_failure, func, line); > + drm_info(&i915->drm, "Injecting failure %d at checkpoint %u [%s:%d]\n", > + err, i915_modparams.inject_probe_failure, func, line); > + > i915_modparams.inject_probe_failure = 0; > return err; > } > -- > 2.39.2 > >
On 06/08/2024 14:38, Jani Nikula wrote: > __i915_printk() does nothing for notice/info levels. Just use the > regular drm_notice() and drm_info() calls. "does nothing"? You mean does nothing _special_? The patch itself looks okay. Regards, Tvrtko > Signed-off-by: Jani Nikula <jani.nikula@intel.com> > --- > drivers/gpu/drm/i915/i915_utils.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_utils.c b/drivers/gpu/drm/i915/i915_utils.c > index 6f9e7b354b54..bee32222f0fd 100644 > --- a/drivers/gpu/drm/i915/i915_utils.c > +++ b/drivers/gpu/drm/i915/i915_utils.c > @@ -54,8 +54,8 @@ __i915_printk(struct drm_i915_private *dev_priv, const char *level, > > void add_taint_for_CI(struct drm_i915_private *i915, unsigned int taint) > { > - __i915_printk(i915, KERN_NOTICE, "CI tainted:%#x by %pS\n", > - taint, (void *)_RET_IP_); > + drm_notice(&i915->drm, "CI tainted: %#x by %pS\n", > + taint, __builtin_return_address(0)); > > /* Failures that occur during fault injection testing are expected */ > if (!i915_error_injected()) > @@ -74,9 +74,9 @@ int __i915_inject_probe_error(struct drm_i915_private *i915, int err, > if (++i915_probe_fail_count < i915_modparams.inject_probe_failure) > return 0; > > - __i915_printk(i915, KERN_INFO, > - "Injecting failure %d at checkpoint %u [%s:%d]\n", > - err, i915_modparams.inject_probe_failure, func, line); > + drm_info(&i915->drm, "Injecting failure %d at checkpoint %u [%s:%d]\n", > + err, i915_modparams.inject_probe_failure, func, line); > + > i915_modparams.inject_probe_failure = 0; > return err; > }
On Wed, 07 Aug 2024, Tvrtko Ursulin <tursulin@ursulin.net> wrote: > On 06/08/2024 14:38, Jani Nikula wrote: >> __i915_printk() does nothing for notice/info levels. Just use the >> regular drm_notice() and drm_info() calls. > > "does nothing"? You mean does nothing _special_? Yeah, does nothing in addition to the regular drm logging that we switch to. > > The patch itself looks okay. > > Regards, > > Tvrtko > >> Signed-off-by: Jani Nikula <jani.nikula@intel.com> >> --- >> drivers/gpu/drm/i915/i915_utils.c | 10 +++++----- >> 1 file changed, 5 insertions(+), 5 deletions(-) >> >> diff --git a/drivers/gpu/drm/i915/i915_utils.c b/drivers/gpu/drm/i915/i915_utils.c >> index 6f9e7b354b54..bee32222f0fd 100644 >> --- a/drivers/gpu/drm/i915/i915_utils.c >> +++ b/drivers/gpu/drm/i915/i915_utils.c >> @@ -54,8 +54,8 @@ __i915_printk(struct drm_i915_private *dev_priv, const char *level, >> >> void add_taint_for_CI(struct drm_i915_private *i915, unsigned int taint) >> { >> - __i915_printk(i915, KERN_NOTICE, "CI tainted:%#x by %pS\n", >> - taint, (void *)_RET_IP_); >> + drm_notice(&i915->drm, "CI tainted: %#x by %pS\n", >> + taint, __builtin_return_address(0)); >> >> /* Failures that occur during fault injection testing are expected */ >> if (!i915_error_injected()) >> @@ -74,9 +74,9 @@ int __i915_inject_probe_error(struct drm_i915_private *i915, int err, >> if (++i915_probe_fail_count < i915_modparams.inject_probe_failure) >> return 0; >> >> - __i915_printk(i915, KERN_INFO, >> - "Injecting failure %d at checkpoint %u [%s:%d]\n", >> - err, i915_modparams.inject_probe_failure, func, line); >> + drm_info(&i915->drm, "Injecting failure %d at checkpoint %u [%s:%d]\n", >> + err, i915_modparams.inject_probe_failure, func, line); >> + >> i915_modparams.inject_probe_failure = 0; >> return err; >> }
Hi Jani, On Tue, Aug 06, 2024 at 04:38:30PM +0300, Jani Nikula wrote: > __i915_printk() does nothing for notice/info levels. Just use the > regular drm_notice() and drm_info() calls. > > Signed-off-by: Jani Nikula <jani.nikula@intel.com> With the commit log improvements suggested by Tvrtko and yourself: Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Thanks, Andi
diff --git a/drivers/gpu/drm/i915/i915_utils.c b/drivers/gpu/drm/i915/i915_utils.c index 6f9e7b354b54..bee32222f0fd 100644 --- a/drivers/gpu/drm/i915/i915_utils.c +++ b/drivers/gpu/drm/i915/i915_utils.c @@ -54,8 +54,8 @@ __i915_printk(struct drm_i915_private *dev_priv, const char *level, void add_taint_for_CI(struct drm_i915_private *i915, unsigned int taint) { - __i915_printk(i915, KERN_NOTICE, "CI tainted:%#x by %pS\n", - taint, (void *)_RET_IP_); + drm_notice(&i915->drm, "CI tainted: %#x by %pS\n", + taint, __builtin_return_address(0)); /* Failures that occur during fault injection testing are expected */ if (!i915_error_injected()) @@ -74,9 +74,9 @@ int __i915_inject_probe_error(struct drm_i915_private *i915, int err, if (++i915_probe_fail_count < i915_modparams.inject_probe_failure) return 0; - __i915_printk(i915, KERN_INFO, - "Injecting failure %d at checkpoint %u [%s:%d]\n", - err, i915_modparams.inject_probe_failure, func, line); + drm_info(&i915->drm, "Injecting failure %d at checkpoint %u [%s:%d]\n", + err, i915_modparams.inject_probe_failure, func, line); + i915_modparams.inject_probe_failure = 0; return err; }
__i915_printk() does nothing for notice/info levels. Just use the regular drm_notice() and drm_info() calls. Signed-off-by: Jani Nikula <jani.nikula@intel.com> --- drivers/gpu/drm/i915/i915_utils.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)