linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
To: Ian Rogers <irogers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	Andi Kleen <ak@linux.intel.com>,
	Jin Yao <yao.jin@linux.intel.com>,
	Zhengjun Xing <zhengjun.xing@linux.intel.com>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] perf bench: Fix two numa NDEBUG warnings
Date: Fri, 29 Apr 2022 14:51:25 +0530	[thread overview]
Message-ID: <FDBE8FEC-CC4B-43C2-B2AA-3ECCFF95A98E@linux.vnet.ibm.com> (raw)
In-Reply-To: <20220428202912.1056444-1-irogers@google.com>



> On 29-Apr-2022, at 1:59 AM, Ian Rogers <irogers@google.com> wrote:
> 
> BUG_ON is a no-op if NDEBUG is defined, otherwise it is an assert.
> Compiling with NDEBUG yields:
> 
> bench/numa.c: In function ‘bind_to_cpu’:
> bench/numa.c:314:1: error: control reaches end of non-void function [-Werror=return-type]
>  314 | }
>      | ^
> bench/numa.c: In function ‘bind_to_node’:
> bench/numa.c:367:1: error: control reaches end of non-void function [-Werror=return-type]
>  367 | }
>      | ^
> 
> Add return statements to cover this case.

Looks fine to me

Reviewed-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>

Thanks
Athira
> 
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
> tools/perf/bench/numa.c | 2 ++
> 1 file changed, 2 insertions(+)
> 
> diff --git a/tools/perf/bench/numa.c b/tools/perf/bench/numa.c
> index 44e1f8a44087..d5289fa58a4f 100644
> --- a/tools/perf/bench/numa.c
> +++ b/tools/perf/bench/numa.c
> @@ -311,6 +311,7 @@ static cpu_set_t *bind_to_cpu(int target_cpu)
> 
> 	/* BUG_ON due to failure in allocation of orig_mask/mask */
> 	BUG_ON(-1);
> +	return NULL;
> }
> 
> static cpu_set_t *bind_to_node(int target_node)
> @@ -364,6 +365,7 @@ static cpu_set_t *bind_to_node(int target_node)
> 
> 	/* BUG_ON due to failure in allocation of orig_mask/mask */
> 	BUG_ON(-1);
> +	return NULL;
> }
> 
> static void bind_to_cpumask(cpu_set_t *mask)
> -- 
> 2.36.0.464.gb9c8b46e94-goog
> 


  parent reply	other threads:[~2022-04-29  9:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-28 20:29 [PATCH 1/2] perf bench: Fix two numa NDEBUG warnings Ian Rogers
2022-04-28 20:29 ` [PATCH 2/2] perf vendor events intel: Add cpuid for sapphirerapids Ian Rogers
2022-04-29  3:17   ` Xing Zhengjun
2022-04-29  9:21 ` Athira Rajeev [this message]
2022-04-30  1:58   ` [PATCH 1/2] perf bench: Fix two numa NDEBUG warnings Ian Rogers
2022-04-30 15:27     ` Arnaldo Carvalho de Melo

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=FDBE8FEC-CC4B-43C2-B2AA-3ECCFF95A98E@linux.vnet.ibm.com \
    --to=atrajeev@linux.vnet.ibm.com \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=yao.jin@linux.intel.com \
    --cc=zhengjun.xing@linux.intel.com \
    /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).