On Wed, Nov 11, 2015 at 11:22:15AM +0300, Dan Carpenter wrote: > On Wed, Nov 11, 2015 at 02:33:30AM -0500, Jubin John wrote: > > @@ -8288,6 +8367,21 @@ static int init_cntrs(struct hfi1_devdata *dd) > > dd->ndevcntrs++; > > index++; > > } > > + } else if (dev_cntrs[i].flags & CNTR_SDMA) { > > + hfi1_dbg_early( > > + "\tProcessing per SDE counters chip enginers %u\n", > > + dd->chip_sdma_engines); > > + dev_cntrs[i].offset = index; > > + for (j = 0; j < dd->chip_sdma_engines; j++) { > > + memset(name, '\0', C_MAX_NAME); > > This patch is ok, but none of the memsets in this function are needed. > You could remove them in a later patch. > > > + snprintf(name, C_MAX_NAME, "%s%d", > > + dev_cntrs[i].name, j); > > + sz += strlen(name); > > + sz++; > > + hfi1_dbg_early("\t\t%s\n", name); > > We're basically just trying to calculate a bunch of strlen()s but there > is a lot of extra code to generate debug output. It would be better to > remove it in a later patch. > > > + dd->ndevcntrs++; > > + index++; > > + } > > regards, > dan carpenter Hi Dan, I will let this patch stand as-is and follow up with a clean up patch to remove the memsets and the debug code. Thanks, Jubin John _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel