mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sang-Heon Jeon <ekffu200098@gmail.com>
To: Yazen Ghannam <yazen.ghannam@amd.com>
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	bhelgaas@google.com
Subject: Re: [PATCH 3/4] PCI/AER: Report the ratelimit interval in milliseconds
Date: Thu, 19 Nov 2026 01:39:32 +0900	[thread overview]
Message-ID: <20261118163934.96979-1-ekffu200098@gmail.com> (raw)
In-Reply-To: <20261110215614.3931232-4-yazen.ghannam@amd.com>

On Tue, Nov 10, 2026 at 03:56:13PM -0600, Yazen Ghannam wrote:
> The "*_ratelimit_interval_ms" attributes convert milliseconds to jiffies
> when storing. But they don't convert jiffies to milliseconds when
> showing. So the user is presented with the raw jiffies value.
>
> Do the jiffies to milliseconds conversion when showing the value.
>
> Fixes: b4fe7398def6 ("PCI/AER: Add sysfs attributes for log ratelimits")
> Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
> ---
>  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 401cd3a1b3d0..32a4c9101946 100644
> --- a/drivers/pci/pcie/aer.c
> +++ b/drivers/pci/pcie/aer.c
> @@ -699,9 +699,9 @@ const struct attribute_group aer_stats_attr_group = {
>  					 char *buf)			\
>  	{								\
>  		struct pci_dev *pdev = to_pci_dev(dev);			\
> +		unsigned long iv = pdev->aer_info->ratelimit.interval;	\
>  									\
> -		return sysfs_emit(buf, "%d\n",				\
> -				  pdev->aer_info->ratelimit.interval);	\
> +		return sysfs_emit(buf, "%u\n", jiffies_to_msecs(iv));	\
>  	}								\
>  									\
>  	static ssize_t							\

I found a similar issue in other subsystems, and this looks good to me.

Reviewed-by: Sang-Heon Jeon <ekffu200098@gmail.com>

Best Regards,
Sang-Heon Jeon

  reply	other threads:[~2026-11-18 16:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10 21:56 [PATCH 0/4] AER sysfs fixes Yazen Ghannam
2026-11-10 21:56 ` [PATCH 1/4] MAINTAINERS: Add the AER sysfs ABI file to PCI SUBSYSTEM Yazen Ghannam
2026-11-10 21:56 ` [PATCH 2/4] PCI/AER: Clamp negative ratelimit burst to zero Yazen Ghannam
2026-11-10 21:56 ` [PATCH 3/4] PCI/AER: Report the ratelimit interval in milliseconds Yazen Ghannam
2026-11-18 16:39   ` Sang-Heon Jeon [this message]
2026-11-10 21:56 ` [PATCH 4/4] PCI/AER: Hide the "aer" sysfs directory on devices without AER Yazen Ghannam

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=20261118163934.96979-1-ekffu200098@gmail.com \
    --to=ekffu200098@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=yazen.ghannam@amd.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

all inboxes | Powered by JetHome®