RE: sisusb: Use static const, fix typo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux