Re: [PATCH v5 6/8] PCI/AER: Introduce ratelimit for error logs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 31, 2025 at 11:48 AM Bjorn Helgaas <helgaas@xxxxxxxxxx> wrote:
> I found the __ratelimit() return values a little confusing (1 == print
> the message, 0 == don't print), so this is appealing because it's less
> confusing by itself.
>
> But I think we should name this "aer_ratelimit()" and return the
> result of __ratelimit() without inverting it so it works the same way
> as __ratelimit() and similar wrappers like ata_ratelimit(),
> net_ratelimit(), drbd_ratelimit().

Ack. Caught between readability and consistency :).

> On Thu, Mar 20, 2025 at 06:58:04PM -0700, Jon Pan-Doh wrote:
> > --- a/drivers/pci/pci.h
> > +++ b/drivers/pci/pci.h
> > @@ -533,6 +533,7 @@ static inline bool pci_dev_test_and_set_removed(struct pci_dev *dev)
> >
> >  struct aer_err_info {
> >       struct pci_dev *dev[AER_MAX_MULTI_ERR_DEVICES];
> > +     bool ratelimited[AER_MAX_MULTI_ERR_DEVICES];

s/ratelimited/ratelimit here as well? Should it store aer_ratelimit()
or !aer_ratelimit()?

Thanks,
Jon





[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux