On Fri, Jul 25, 2014 at 10:18:57AM +0900, Namhyung Kim wrote: SNIP
> } > > -#define __HPP_WIDTH_FN(_type, _str) \ > +#define __HPP_WIDTH_FN(_type) > \ > static int hpp__width_##_type(struct perf_hpp_fmt *fmt, > \ > struct perf_hpp *hpp __maybe_unused, \ > struct perf_evsel *evsel) \ > @@ -219,19 +219,19 @@ static int hpp__width_##_type(struct perf_hpp_fmt *fmt, > \ > if (symbol_conf.event_group) \ > len = max(len, evsel->nr_members * fmt->len); \ > \ > - if (len < (int)strlen(_str)) \ > - len = strlen(_str); \ > + if (len < (int)strlen(fmt->name)) \ > + len = strlen(fmt->name); \ hum, so with the '_str' string argument missing we dont need this function to be generated by macro, right? could be one single function called hpp__width_entry or something like that > \ > return len; \ > } > > -#define __HPP_HEADER_FN(_type, _str) > \ > +#define __HPP_HEADER_FN(_type) > \ > static int hpp__header_##_type(struct perf_hpp_fmt *fmt, \ > struct perf_hpp *hpp, \ > struct perf_evsel *evsel) \ > { \ > int len = hpp__width_##_type(fmt, hpp, evsel); \ > - return scnprintf(hpp->buf, hpp->size, "%*s", len, _str); \ > + return scnprintf(hpp->buf, hpp->size, "%*s", len, fmt->name); \ > } > same here ^^^ for hpp__header_##_type jirka -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/