Re: [PATCH 3/4] mmc: bcm2835: Drop pointer to mmc_host from bcm2835_host

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

 



> Lukas Wunner <lukas@xxxxxxxxx> hat am 22. Januar 2019 um 14:44 geschrieben:
> 
> 
> On Mon, Jan 21, 2019 at 03:20:37PM +0100, Alexander Graf wrote:
> > On 01/19/2019 04:31 PM, Lukas Wunner wrote:
> > > --- a/include/linux/mmc/host.h
> > > +++ b/include/linux/mmc/host.h
> > > @@ -478,6 +478,11 @@ static inline void *mmc_priv(struct mmc_host *host)
> > >   	return (void *)host->private;
> > >   }
> > > +static inline struct mmc_host *mmc_from_priv(void *priv)
> > > +{
> > > +	return priv - offsetof(struct mmc_host, private);
> > 
> > Can you use container_of() instead here?
> 
> Absolutely.  I've no idea why I didn't use it in the first place.

Except of this i'm fine with the whole series:

Tested-by: Stefan Wahren <stefan.wahren@xxxxxxxx>

Please add a cover letter for V2.

Thanks

> 
> Thanks,
> 
> Lukas



[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux