mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Wentao Liang <vulab@iscas.ac.cn>
Cc: alexander.usyskin@intel.com, arnd@arndb.de,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] mei: Add error logging in IRQ handler to prevent silent failures
Date: Thu, 20 Feb 2025 15:16:03 +0100	[thread overview]
Message-ID: <2025022023-childlike-superjet-f096@gregkh> (raw)
In-Reply-To: <20250220133435.1060-1-vulab@iscas.ac.cn>

On Thu, Feb 20, 2025 at 09:34:35PM +0800, Wentao Liang wrote:
> Log mei_irq_write_handler() errors to prevent silent IRQ handling failures.
> 
> Fixes: 962ff7bcec24 ("mei: replace callback structures used as list head by list_head")
> Cc: stable@vger.kernel.org # 4.11+
> Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
> ---
>  drivers/misc/mei/hw-me.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/misc/mei/hw-me.c b/drivers/misc/mei/hw-me.c
> index d11a0740b47c..5df42a64b4db 100644
> --- a/drivers/misc/mei/hw-me.c
> +++ b/drivers/misc/mei/hw-me.c
> @@ -1415,6 +1415,8 @@ irqreturn_t mei_me_irq_thread_handler(int irq, void *dev_id)
>  	if (dev->pg_event != MEI_PG_EVENT_WAIT &&
>  	    dev->pg_event != MEI_PG_EVENT_RECEIVED) {
>  		rets = mei_irq_write_handler(dev, &cmpl_list);
> +		if (rets)
> +			dev_err(dev->dev, "mei_irq_write_handler ret = %d.\n", rets);
>  		dev->hbuf_is_ready = mei_hbuf_is_ready(dev);
>  	}
>  
> -- 
> 2.42.0.windows.2
> 

How was this found and tested?

And why print an error message in an irq handler, isn't that going to be
messy?  What can the user do with this message?

thanks,

greg k-h

      reply	other threads:[~2025-02-20 14:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-20 13:34 Wentao Liang
2025-02-20 14:16 ` Greg KH [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=2025022023-childlike-superjet-f096@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=alexander.usyskin@intel.com \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=vulab@iscas.ac.cn \
    /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

all inboxes | Powered by JetHome®