Messages in this thread | | | From | Bart Van Assche <> | Date | Sun, 3 Jul 2011 10:24:33 +0200 | Subject | Re: [PATCH 09/11] dynamic_debug: add_to_pending() saves non-matching queries for later. |
| |
On Tue, Jun 28, 2011 at 9:17 PM, Jim Cromie <jim.cromie@gmail.com> wrote: > On Tue, Jun 28, 2011 at 1:09 AM, Jim Cromie <jim.cromie@gmail.com> wrote: >> +static char prbuf_query[300]; >> + >> +static char *show_ddebug_query(const struct ddebug_query *q) >> +{ > > > this part (the static fixed-length var) > gives me some heartburn. > > I almost went with macros using pr_info to replace the > 2 show_*_query fns, but a <debugfs/dynamic_debug/pending file > might want to use show_pending_query > > advice ?
How about using kasprintf() inside show_ddebug_query() and let the show_ddebug_query() free the buffer that has been allocated by kasprintf() ?
Bart. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |