Re: [PATCH V2] staging: vchiq_2835_arm: Make cache-line-size a required DT property

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

 



On Sat, 2017-02-25 at 14:38 +0100, Stefan Wahren wrote:
> [add Eric]
> 
> > Michael Zoran <mzoran@xxxxxxxxxxxx> hat am 18. Februar 2017 um
> > 12:59 geschrieben:
> > 
> > 
> > On Sat, 2017-02-18 at 03:22 -0800, Michael Zoran wrote:
> > > The original github source allowed for the cache-line-size
> > > property
> > > to be missing.  Since recent firmwares also require this
> > > property,
> > > it makes sense to always require it in the driver as well.
> > > 
> > > If the cache-line-size property is missing, then the driver probe
> > > should fail as no dev since the kernel and dt may be out of sync.
> > > The fix is to add a check for the return value of
> > > of_property_read_u32.
> > > 
> > > Changes V2:
> > > 	1. Add error message if cache-line-size is missing.
> > > 	2. Simple check for non-zero return value from 
> > > 	   of_property_read_u32.
> > > 
> > > Signed-off-by: Michael Zoran <mzoran@xxxxxxxxxxxx>
> > > ---
> > >  .../staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c  
> > >   |
> > > 8 +++++++-
> > >  1 file changed, 7 insertions(+), 1 deletion(-)
> > > 
> > > diff --git
> > > a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_ar
> > > m.c
> > > b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_ar
> > > m.c
> > > index e6241fb5cfa6..3aeffcb9c87e 100644
> > > ---
> > > a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_ar
> > > m.c
> > > +++
> > > b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_ar
> > > m.c
> > > @@ -121,8 +121,14 @@ int vchiq_platform_init(struct
> > > platform_device
> > > *pdev, VCHIQ_STATE_T *state)
> > >  	if (err < 0)
> > >  		return err;
> > >  
> > > -	(void)of_property_read_u32(dev->of_node, "cache-line-
> > > size",
> > > +	err = of_property_read_u32(dev->of_node, "cache-line-
> > > size",
> > >  				   &g_cache_line_size);
> > > +
> > > +	if (err) {
> > > +		dev_err(dev, "Missing cache-line-size
> > > property\n");
> > > +		return -ENODEV;
> > > +	}
> > > +
> > >  	g_fragments_size = 2 * g_cache_line_size;
> > >  
> > >  	/* Allocate space for the channels in coherent memory */
> > 
> > If anybody is willing to add an Reviewed-by, Acked, or even tested-
> > by
> > to this it would be great.  I know gregk is a busy guy so it might
> > make
> > sense to make a note that someone else looked at this and that I'm
> > not
> > out in left field.
> > 
> > It would be really great if this made it into 4.11.  I'm a bit
> > concerned about someone accidently trying to mix this driver with
> > an
> > ancient DT. Things would probably sort of work if that was done,
> > but it
> > would result in difficult to debug errors.
> 
> I think Greg is waiting for Eric's Ack, but it seems you didn't send
> him a copy.
> 
> @Eric: Are you okay with this patch?

What's the rule as to who exactly I should be including on patches? 
get_maintainer.pl displays a very long list for stagging, so it isn't
clear to me who should be getting this.

Also, I wonder if I should complain to someone about the linux-rpi-
kernel email list.  It appears to be really unreliable.  I don't think
it's my e-mail server since I seem to get everything else and it's
running on a very major provider in my area.  I occasionally see others
complain about e-mail not getting through too.

Thanks.
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux