linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Baron <jbaron@akamai.com>
To: Randy Dunlap <rdunlap@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 1/2] dynamic_debug: fix optional/omitted ending line number to be LARGE instead of 0
Date: Fri, 10 Nov 2017 16:44:08 -0500	[thread overview]
Message-ID: <8c9caf12-178b-b228-09fc-abd3d043993a@akamai.com> (raw)
In-Reply-To: <10a6a101-e2be-209f-1f41-54637824788e@infradead.org>

On 11/09/2017 04:52 PM, Randy Dunlap wrote:
> From: Randy Dunlap <rdunlap@infradead.org>
> 
> line-range is supposed to treat "1-" as "1-endoffile", so
> handle the special case by setting last_lineno to UINT_MAX.
> 
> Fixes this error:
> 
> dynamic_debug:ddebug_parse_query: last-line:0 < 1st-line:1
> dynamic_debug:ddebug_exec_query: query parse failed
> 
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Jason Baron <jbaron@akamai.com>
> ---
>  lib/dynamic_debug.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> --- lnx-414-rc8.orig/lib/dynamic_debug.c
> +++ lnx-414-rc8/lib/dynamic_debug.c
> @@ -360,6 +360,10 @@ static int ddebug_parse_query(char *word
>  				if (parse_lineno(last, &query->last_lineno) < 0)
>  					return -EINVAL;
>  
> +				/* special case for last lineno not specified */
> +				if (query->last_lineno == 0)
> +					query->last_lineno = UINT_MAX;
> +
>  				if (query->last_lineno < query->first_lineno) {
>  					pr_err("last-line:%d < 1st-line:%d\n",
>  						query->last_lineno,
> 

Acked-by: Jason Baron <jbaron@akamai.com>

      reply	other threads:[~2017-11-10 21:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-09 21:52 [PATCH 1/2] dynamic_debug: fix optional/omitted ending line number to be LARGE instead of 0 Randy Dunlap
2017-11-10 21:44 ` Jason Baron [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8c9caf12-178b-b228-09fc-abd3d043993a@akamai.com \
    --to=jbaron@akamai.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).