lkml.org 
[lkml]   [2011]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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/

\
 
 \ /
  Last update: 2011-07-03 10:27    [W:0.219 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site