Re: [PATCH] drivers/usb: Convert concatenated __FILE__ to %s,__FILE__

From: Joe Perches
Date: Mon Feb 08 2010 - 17:47:17 EST


On Sun, 2010-02-07 at 20:49 -0800, Greg KH wrote:
> On Fri, Feb 05, 2010 at 05:51:13PM -0800, Joe Perches wrote:
> > Reduces string space a bit
> It does? Does gcc optimize all of the __FILE__ instances to point to
> the same place in the object?

Yes, just like any other duplicated const string.

Converting a source unit with a single use of __FILE__
wastes space (direct string vs pointer + "%s" + string)

Multiple conversions generally save space.


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