On Tue, Aug 05, 2008 at 11:06:28AM +0200, Fathi BOUDRA wrote: > -void onenand_print_device_info(int device, int verbose) > +char * onenand_print_device_info(int device) > { > int vcc, demuxed, ddp, density; > - > - if (!verbose) > - return; > + char *dev_info; > > vcc = device & ONENAND_DEVICE_VCC_MASK; > demuxed = device & ONENAND_DEVICE_IS_DEMUX; > ddp = device & ONENAND_DEVICE_IS_DDP; > density = device >> ONENAND_DEVICE_DENSITY_SHIFT; > - printk(KERN_INFO "%sOneNAND%s %dMB %sV 16-bit (0x%02x)\n", > + sprintf(dev_info, "%sOneNAND%s %dMB %sV 16-bit (0x%02x)", > demuxed ? "" : "Muxed ", > ddp ? "(DDP)" : "", > (16 << density), vcc ? "2.65/3.3" : "1.8", device); > + > + return dev_info;
Please don't write to uninitialized pointers. -Scott ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users