Re: [PATCH 1/2] drm: omapdrm: Use sizeof(*var) instead of sizeof(type) for structures

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

 



On Tuesday 13 Dec 2016 22:12:12 Daniel Vetter wrote:
> On Tue, Dec 13, 2016 at 05:21:42PM +0200, Laurent Pinchart wrote:
> > By linking the sizeof to a variable type the code will be less prone to
> > bugs due to future type changes of variables.
> > 
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
> 
> Reviewed-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
> 
> Isn't there some cocci magic that does this for you?

There should be, but as it was only a handful of calls (well, for anyone who 
has a hand with 7 fingers) I was done before I thought I could use coccinelle.

-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux