From: John Harrison <john.c.harrison@intel.com>
To: Andi Shyti <andi.shyti@linux.intel.com>
Cc: Intel-GFX@lists.freedesktop.org, DRI-Devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 1/2] drm/i915/gt: More use of GT specific print helpers
Date: Mon, 9 Oct 2023 13:17:38 -0700 [thread overview]
Message-ID: <15878423-fa15-4885-a276-bcc1e8d4c851@intel.com> (raw)
In-Reply-To: <ZSRcYYZrwZ+fatQv@ashyti-mobl2.lan>
On 10/9/2023 13:02, Andi Shyti wrote:
> Hi John,
>
> ...
>
>>>> if (intf_id >= INTEL_GSC_NUM_INTERFACES) {
>>>> - drm_warn_once(>->i915->drm, "GSC irq: intf_id %d is out of range", intf_id);
>>>> + gt_warn_once(gt, "GSC irq: intf_id %d is out of range", intf_id);
>>>> return;
>>>> }
>>>> if (!HAS_HECI_GSC(gt->i915)) {
>>>> - drm_warn_once(>->i915->drm, "GSC irq: not supported");
>>>> + gt_warn_once(gt, "GSC irq: not supported");
>>>> return;
>>>> }
>>>> @@ -300,7 +301,7 @@ static void gsc_irq_handler(struct intel_gt *gt, unsigned int intf_id)
>>>> ret = generic_handle_irq(gt->gsc.intf[intf_id].irq);
>>>> if (ret)
>>>> - drm_err_ratelimited(>->i915->drm, "error handling GSC irq: %d\n", ret);
>>>> + gt_err_ratelimited(gt, "error handling GSC irq: %d\n", ret);
>>>> }
>>>> void intel_gsc_irq_handler(struct intel_gt *gt, u32 iir)
>>>> diff --git a/drivers/gpu/drm/i915/gt/intel_gt_print.h b/drivers/gpu/drm/i915/gt/intel_gt_print.h
>>>> index 55a336a9ff061..7fdc78c79273e 100644
>>>> --- a/drivers/gpu/drm/i915/gt/intel_gt_print.h
>>>> +++ b/drivers/gpu/drm/i915/gt/intel_gt_print.h
>>>> @@ -16,6 +16,9 @@
>>>> #define gt_warn(_gt, _fmt, ...) \
>>>> drm_warn(&(_gt)->i915->drm, "GT%u: " _fmt, (_gt)->info.id, ##__VA_ARGS__)
>>>> +#define gt_warn_once(_gt, _fmt, ...) \
>>>> + drm_warn_once(&(_gt)->i915->drm, "GT%u: " _fmt, (_gt)->info.id, ##__VA_ARGS__)
>>>> +
>>> I would add the gt_warn_once() part in a different patch.
>> But this is the patch that uses it. You should not add dead code. The only
>> exception being if it is something large and complex that needs to be added
>> in stages for ease of code review. But this really doesn't count as large or
>> complex!
> I wouldn't call it dead code if it's used right after... you
> could also put all the *_warn_* changes in different patch.
I did start splitting it into errors vs debugs but then decided it
wasn't worth the effort ;)
>
> Anyway, I don't have a strong opinion for such a straight forward
> patch, so that I'm fine with it as it is:
>
> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Thanks :).
>
> Andi
next prev parent reply other threads:[~2023-10-09 20:17 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-09 18:38 [Intel-gfx] [PATCH 0/2] More print message helper updates John.C.Harrison
2023-10-09 18:38 ` [Intel-gfx] [PATCH 1/2] drm/i915/gt: More use of GT specific print helpers John.C.Harrison
2023-10-09 19:50 ` Andi Shyti
2023-10-09 19:54 ` John Harrison
2023-10-09 20:02 ` Andi Shyti
2023-10-09 20:17 ` John Harrison [this message]
2023-10-09 18:38 ` [Intel-gfx] [PATCH 2/2] drm/i915: " John.C.Harrison
2023-10-09 19:54 ` Andi Shyti
2023-10-09 19:57 ` John Harrison
2023-10-10 20:22 ` Andi Shyti
2023-10-10 2:08 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for More print message helper updates Patchwork
2023-10-10 2:08 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-10-10 2:26 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2023-10-10 18:31 ` John Harrison
2023-10-10 5:02 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for More print message helper updates (rev2) Patchwork
2023-10-10 5:02 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-10-10 5:19 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-10-10 11:36 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-10-10 18:29 ` John Harrison
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=15878423-fa15-4885-a276-bcc1e8d4c851@intel.com \
--to=john.c.harrison@intel.com \
--cc=DRI-Devel@lists.freedesktop.org \
--cc=Intel-GFX@lists.freedesktop.org \
--cc=andi.shyti@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox