[PATCHv4 05/11] of: pci: add registry of MSI chips

Bjorn Helgaas bhelgaas at google.com
Tue Jul 9 12:30:42 EDT 2013


On Tue, Jul 9, 2013 at 8:01 AM, Thomas Petazzoni
<thomas.petazzoni at free-electrons.com> wrote:
> On Tue, 9 Jul 2013 08:43:36 -0500, Rob Herring wrote:
>> > +{
>> > +       struct msi_chip *c;
>> > +       list_for_each_entry(c, &msi_chip_list, list) {
>>
>> Need the safe variant here?
>
> As suggested by Bjorn, I've changed this function to grab the
> msi_chip_mutex while traversing the list.

The "safe" list functions don't do any mutual exclusion.  The only
safety they provide is that we won't go in the weeds if the body of
the loop deletes the current list entry.  This loop doesn't delete
entries, so we don't need the safe variant.

Bjorn



More information about the linux-arm-kernel mailing list