[Intel-gfx] [PATCH 09/15] drm/i915: Add NV12 support to intel_framebuffer_init

Daniel Vetter daniel at ffwll.ch
Mon Sep 14 01:45:58 PDT 2015


On Thu, Sep 10, 2015 at 08:45:48PM +0000, Konduru, Chandra wrote:
> > > > > +		if (obj->tiling_mode == I915_TILING_X &&
> > > > > +			!(mode_cmd->flags & DRM_MODE_FB_MODIFIERS)) {
> > > >
> > > > Your editor still seems to mess up the indentation in these cases. Can
> > > > you try to fix that?
> > >
> > > If condition isn't fitting in a single line, so continued in next line like any other if
> > condition.
> > > Not sure what the exact indentation issue you are observing.
> > 
> > Stuff should line up nicely after the opening (
> > 
> > if (foo &&
> >     bar &&
> >     zonk)
> > 
> > and not
> > 
> > if (foo &&
> > 	bar &&
> > 	zonk)
> 
> I am continuing tab to indent the line below "if" to move past "if".
> In the code, I see "space" or "tab" to move past "if" in line below.
> One or the other, I used tab. But if that is causing issue, it is
> Fine to use "spaces".
> 
> Anyway, this code is going away, as it is being merged into
> beginning of the function.

Yeah, continuation lines should be aligned with the opening ( whether
that's an if condition, function parameter list or something else.
checkpatch --strict will spot these for you.

I don't mind if it's just the occasional one, but if you get it
consistently wrong it does make the code a bit harder to follow (simply
because it's unexpected).
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list