[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6D0F6CA653@AcuExch.aculab.com>
Date: Tue, 25 Feb 2014 09:09:38 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Joe Perches' <joe@...ches.com>
CC: Thomas Winischhofer <thomas@...ischhofer.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-usb <linux-usb@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: RE: sisusb: Use static const, fix typo
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists