Hi Chandru, On Tue, 8 Jul 2008 00:14:24 +0530 Chandru <chandru at in.ibm.com> wrote: > > @@ -917,7 +918,33 @@ static int __init early_init_dt_scan_drc > if ((base + size) > 0x80000000ul) > size = 0x80000000ul - base; > } > - lmb_add(base, size); > + strcpy(buf, "linux,usable-memory"); > + sprintf(t, "%d", (int)n); > + strcat(buf, t); Why don't you use snprintf(buf, sizeof(buf), "linux,usable-memory%ld", n); instead? > + usm = (cell_t *)of_get_flat_dt_prop(node, > + (const char *)buf, &l); ^^^^^^^^^^ ^^^^^^^^^^^^^^ unnecessary casts. > static void __init parse_drconf_memory(struct device_node *memory) > { > + strcpy(buf, "linux,usable-memory"); > + sprintf(t, "%d", (int)n); > + strcat(buf, t); See snprint comment above. > + usm = of_get_property(memory, (const char *)buf, &len); ^^^^^^^^^^^^^^ unnecessary cast. > + if (usm != NULL) { > + ranges = (len >> 2) / (n_mem_addr_cells + ^^^^^^^^^^ len / sizeof(u32) ? -- Cheers, Stephen Rothwell sfr at canb.auug.org.au http://www.canb.auug.org.au/~sfr/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: not available Url : http://lists.infradead.org/pipermail/kexec/attachments/20080708/7197c6e3/attachment.bin