Re: [PATCH 2/3] c/r: Add CR_COPY() macro (v3)

From: Dave Hansen
Date: Wed Mar 04 2009 - 15:18:34 EST


On Wed, 2009-03-04 at 13:53 -0600, Nathan Lynch wrote:
> On Tue, 03 Mar 2009 17:00:37 -0800
> Dave Hansen <dave@xxxxxxxxxxxxxxxxxx> wrote:
>
> > On Tue, 2009-03-03 at 16:57 -0800, Dan Smith wrote:
> > > DH> Did you convince Nathan that this ends up being a good idea?
> > >
> > > Technically he hasn't seen this version, but my hopes are not high
> > > that he will change his mind. If the feedback is that they're not
> > > liked, I'll happily remove them.
> >
> > I just figure if Nathan feels that strongly that we'll encounter more
> > people who feel even more so. So, I was curious if he changed his mind
> > somehow.
>
> No, not really, sorry.
>
> I understand why it's nice for the developer to have this sort of
> helper, but I don't think it's nice for someone trying to review or
> debug the code.

That's funny. I've only reviewed and debugged these things, but I don't
think I've actually written any code that would have used these macros!
As someone trying to debug and review, I love how this looks.

It gets the point across much more clearly about what is going on to me
as a reviewer and I appreciate that. memcpy()s contain a lot of gunk
that my brain can't parse easily, but this is rather clean, and it
*HALVES* the number of lines of code I have to look at.

> Surely discussing these macros has already consumed more developer time
> than they would ever save? :)

That's exactly my point. We're not trying to save development time here
at all. My argument is that this reduces the maintenance and review
burden.

-- Dave

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/