Re: [patch 2.6.29-rc] regulator: minor cleanup of virtual consumer

From: David Brownell
Date: Thu Jan 15 2009 - 20:06:29 EST


On Thursday 15 January 2009, Andrew Morton wrote:
> > - else if (strncmp(buf, "standby", strlen("standby")) == 0)
> > + else if (sysfs_streq(buf, "standby\n") == 0)
> > mode = REGULATOR_MODE_STANDBY;
>
> we don't need the \n's, do we?

No, but ...

That's what saves an extra couple dozen bytes of
memory ... the strings, with newlines, are used
to *write* these sysfs attributes.

- 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/