linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Abhinav Jain <jain.abhinav177@gmail.com>
Cc: javier.carrasco.cruz@gmail.com, linux-pci@vger.kernel.org,
	mahesh@linux.ibm.com, linux-kernel@vger.kernel.org,
	oohall@gmail.com, skhan@linuxfoundation.org, bhelgaas@google.com,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v2] PCI/AER: Print error message as per the TODO
Date: Wed, 5 Jun 2024 16:58:48 -0500	[thread overview]
Message-ID: <20240605215848.GA782210@bhelgaas> (raw)
In-Reply-To: <20240605212344.21808-1-jain.abhinav177@gmail.com>

On Wed, Jun 05, 2024 at 09:23:44PM +0000, Abhinav Jain wrote:
> Print the add device error in find_device_iter()
> 
> Signed-off-by: Abhinav Jain <jain.abhinav177@gmail.com>
> 
> PATCH v1 link : https://lore.kernel.org/all/20240415161055.8316-1-jain.abhinav177@gmail.com/
> 
> Changes since v1:
>  - Replaced pr_err() with pr_notice()
>  - Removed unncessary whitespaces
> ---

Thanks for looking at this.

  - It doesn't apply to -rc1 (the TODO message is missing).  In PCI,
    we normally apply patches on topic branches based on -rc1.

  - The subject should be more specific so it makes sense all by
    itself, e.g., "Log note if we find too many devices with errors"

  - Add period at end of sentence in commit log.

  - Move historical notes (v1 URL, changes since v1) below the "---"
    line so they don't get included in the commit log.

  - __func__ is not relevant here -- that's generally a debugging
    thing.  We can find the function by searching for the message
    text.  In cases like this, I'd rather have something that helps
    identify a *device* that's related to the message, e.g., the
    pci_dev in this case.  So I'd suggest pci_err(dev, "...") here.

  - I'd keep pci_err() instead of switching to pr_notice().  If we get
    this message, we should re-think the way we collect this
    information, so I want to hear about it.

>  drivers/pci/pcie/aer.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
> index 0e1ad2998116..8b820a74dd6b 100644
> --- a/drivers/pci/pcie/aer.c
> +++ b/drivers/pci/pcie/aer.c
> @@ -885,8 +885,8 @@ static int find_device_iter(struct pci_dev *dev, void *data)
>  		/* List this device */
>  		if (add_error_device(e_info, dev)) {
>  			/* We cannot handle more... Stop iteration */
> -			pr_err("find_device_iter: Cannot handle more devices.
> -					Stopping iteration");
> +			pr_notice("%s: Cannot handle more devices - iteration stopped\n",
> +					__func__);
>  			return 1;
>  		}
>  
> -- 
> 2.34.1
> 

  reply	other threads:[~2024-06-05 21:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-15 16:10 [PATCH] PCI/AER: Print error message as per the TODO Abhinav Jain
2024-04-15 16:19 ` Joe Perches
2024-06-05 21:23 ` [PATCH v2] " Abhinav Jain
2024-06-05 21:58   ` Bjorn Helgaas [this message]
2024-06-05 23:11     ` Abhinav Jain

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=20240605215848.GA782210@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=jain.abhinav177@gmail.com \
    --cc=javier.carrasco.cruz@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mahesh@linux.ibm.com \
    --cc=oohall@gmail.com \
    --cc=skhan@linuxfoundation.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;
as well as URLs for NNTP newsgroup(s).