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

Laurent Pinchart laurent.pinchart at ideasonboard.com
Tue Dec 13 21:26:19 UTC 2016

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 at ideasonboard.com>
> Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> 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.


Laurent Pinchart

More information about the dri-devel mailing list