All of lore.kernel.org
 help / color / mirror / Atom feed
From: Raag Jadav <raag.jadav@intel.com>
To: "Cavitt, Jonathan" <jonathan.cavitt@intel.com>
Cc: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
	"Gupta, Saurabhg" <saurabhg.gupta@intel.com>,
	"Zuo, Alex" <alex.zuo@intel.com>
Subject: Re: [PATCH] drm/xe/i2c: Report i2c irq handler issue
Date: Thu, 4 Jun 2026 21:04:29 +0200	[thread overview]
Message-ID: <aiHMPVNbGDCvxjno@black.igk.intel.com> (raw)
In-Reply-To: <SN6PR11MB2717A1C01529294A3A96277CE5102@SN6PR11MB2717.namprd11.prod.outlook.com>

On Thu, Jun 04, 2026 at 07:52:56PM +0530, Cavitt, Jonathan wrote:
> -----Original Message-----
> From: Jadav, Raag <raag.jadav@intel.com> 
> > On Thu, Jun 04, 2026 at 04:10:07AM +0800, Jonathan Cavitt wrote:
> > > xe_i2c_irq_handler calls generic_handle_irq_safe, which can return an
> > 
> > Use '()' for functions.
> > 
> > > error value.  In all other cases, this is passed to a
> > 
> > Why the early wrapping? Looks like the next word can fit here.
> > 
> > > .*_err_ratelimited error message helper.  Add the missing error handler.
> > 
> > There's no change in the code path so it wasn't "missing".
> > I'd rephrase this as "Log the error".
> 
> It's supposed to be there, but it isn't.  That is, by definition, "missing",
> regardless of its effective impact.
> But I can at least s/handler/logger.

Yes, they are different in _both_ definition and impact ;)

> > > This issue was caught by static analysis.
> > 
> > This is redundant information but I'll leave it to you.
> > 
> > > Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
> > > Cc: Raag Jadav <raag.jadav@intel.com>
> > > ---
> > >  drivers/gpu/drm/xe/xe_i2c.c | 5 ++++-
> > >  1 file changed, 4 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/gpu/drm/xe/xe_i2c.c b/drivers/gpu/drm/xe/xe_i2c.c
> > > index 706783863d07..acfc171483b2 100644
> > > --- a/drivers/gpu/drm/xe/xe_i2c.c
> > > +++ b/drivers/gpu/drm/xe/xe_i2c.c
> > > @@ -177,12 +177,15 @@ static bool xe_i2c_irq_present(struct xe_device *xe)
> > >  void xe_i2c_irq_handler(struct xe_device *xe, u32 master_ctl)
> > >  {
> > >  	struct xe_mmio *mmio = xe_root_tile_mmio(xe);
> > > +	int ret;
> > >  
> > >  	if (!(master_ctl & I2C_IRQ) || !xe_i2c_irq_present(xe))
> > >  		return;
> > >  
> > >  	/* Forward interrupt to I2C adapter */
> > > -	generic_handle_irq_safe(xe->i2c->adapter_irq);
> > > +	ret = generic_handle_irq_safe(xe->i2c->adapter_irq);
> > > +	if (ret)
> > > +		drm_err_ratelimited(&xe->drm, "error handling i2c irq: %d\n", ret);
> > 
> > drm_err_ratelimited() already logs "error" so I'd rephrase this as
> > "failed to handle i2c irq".
> 
> The current phrasing is consistent with all other uses of .*_err_ratelimited()
> with respect to generic_handle_irq_safe(), so I won't be changing it.

They are to be refactored, I just haven't got to it yet.

Raag

> > >  	/* Deassert after I2C adapter clears the interrupt */
> > >  	xe_mmio_rmw32(mmio, I2C_CONFIG_CMD, 0, PCI_COMMAND_INTX_DISABLE);
> > > -- 
> > > 2.53.0
> > > 
> > 

      reply	other threads:[~2026-06-04 19:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-03 20:10 [PATCH] drm/xe/i2c: Report i2c irq handler issue Jonathan Cavitt
2026-06-03 20:40 ` ✓ CI.KUnit: success for " Patchwork
2026-06-03 21:36 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-06-04 11:30 ` ✓ Xe.CI.FULL: success " Patchwork
2026-06-04 12:38 ` [PATCH] " Raag Jadav
2026-06-04 14:22   ` Cavitt, Jonathan
2026-06-04 19:04     ` Raag Jadav [this message]

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=aiHMPVNbGDCvxjno@black.igk.intel.com \
    --to=raag.jadav@intel.com \
    --cc=alex.zuo@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jonathan.cavitt@intel.com \
    --cc=saurabhg.gupta@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.