[PATCH v2 09/10] PCI: aspeed: Add ASPEED PCIe RC driver

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

 



Hi Markus,

Thank you for your reply.

> > +++ b/drivers/pci/controller/pcie-aspeed.c
> > @@ -0,0 +1,1137 @@
>
> > +static int aspeed_irq_msi_domain_alloc(struct irq_domain *domain,
> > +				       unsigned int virq, unsigned int nr_irqs,
> > +				       void *args)
> > +{
>
> > +	mutex_lock(&pcie->lock);
> > +
> > +	bit = bitmap_find_free_region(pcie->msi_irq_in_use,
> MAX_MSI_HOST_IRQS,
> > +				      get_count_order(nr_irqs));
> > +
> > +	mutex_unlock(&pcie->lock);
>
> 
> Under which circumstances would you become interested to apply a statement
> like “guard(mutex)(&pcie->lock);”?
> https://elixir.bootlin.com/linux/v6.16-rc6/source/include/linux/mutex.h#L225
> 

Thanks for the information that made me know this method.
I just referred to the existed drivers in Linux before, and it seems there are a lot of drivers keeping the original usage.
So, I have no idea Linux have introduced these methods.
I will take care of these usages in my develop and will change it in this driver in next version.

Thanks,
Jacky





[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