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