Re: [PATCH 3/4] PCI/AER: Report the ratelimit interval in milliseconds

From: Sang-Heon Jeon

Date: Wed Nov 18 2026 - 11:39:57 EST


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@xxxxxxx>
> ---
> 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@xxxxxxxxx>

Best Regards,
Sang-Heon Jeon