RE: sisusb: Use static const, fix typo

From: David Laight
Date: Tue Feb 25 2014 - 04:11:19 EST


From: Joe Perches [
> On Mon, 2014-02-24 at 10:26 +0000, David Laight wrote:
> > From: Joe Perches
> > > Reduce text a bit by using static const.
> >
> > If you want to save a few bytes remove the pointers.
> > (and the fixed RAM text to get below 7 chars).
>
> Hi David.
>
> > eg:
> >
> > > - const char *ramtypetext2[] = { "SDR SDRAM", "SDR SGRAM",
> > > - "DDR SDRAM", "DDR SGRAM" };
>
> The idea was use static to avoid the array reload
> on each function entry.
>
> > static const char ramtypetext2[8][] = {
> > "SDR SD", "SDR SG", "DDR SD", "DDR SG"
>
> 8 is an odd number here.

Brain fade - not enough coffee.
I meant 'char ramtypetext2[][8]' so that you avoid the pointers as well.

David



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