[PATCH linux dev-4.10 1/3] drivers/fsi/sbefifo: refactor to upstream list state

Andrew Jeffery andrew at aj.id.au
Mon Sep 25 15:46:28 AEST 2017


On Mon, 2017-09-25 at 14:27 +0930, Andrew Jeffery wrote:
> >  static int sbefifo_remove(struct device *dev)
> >  {
> > -     struct fsi_device *fsi_dev = to_fsi_dev(dev);
> > -     struct sbefifo *sbefifo, *sbefifo_tmp;
> > +     struct sbefifo *sbefifo = dev_get_drvdata(dev);
> >       struct sbefifo_xfr *xfr;
> >  
> > -     list_for_each_entry_safe(sbefifo, sbefifo_tmp, &sbefifo_fifos, link) {
> > -             if (sbefifo->fsi_dev != fsi_dev)
> > -                     continue;
> > -
> > -             device_for_each_child(dev, NULL, sbefifo_unregister_child);
> > +     WRITE_ONCE(sbefifo->rc, -ENODEV);
> > +     wake_up(&sbefifo->wait);

Also, do we want wake_up_all() here? Or does it not matter (exclusive
vs non-exclusive)?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20170925/2c2bdf52/attachment.sig>


More information about the openbmc mailing list