All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: "Liang, Kan" <kan.liang@intel.com>
Cc: "acme@kernel.org" <acme@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"ak@linux.intel.com" <ak@linux.intel.com>,
	Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH V6 2/3] perf tools: parse the pmu event prefix and surfix
Date: Fri, 3 Oct 2014 10:23:51 +0200	[thread overview]
Message-ID: <20141003082351.GF19087@krava.brq.redhat.com> (raw)
In-Reply-To: <37D7C6CF3E00A74B8858931C1DB2F07701604EBA@SHSMSX103.ccr.corp.intel.com>

On Thu, Oct 02, 2014 at 05:33:07PM +0000, Liang, Kan wrote:
> 
> 
> > >
> > > +static int
> > > +comp_pmu(const void *p1, const void *p2) {
> > > +	struct perf_pmu_event_symbol *pmu1 =
> > > +			(struct perf_pmu_event_symbol *) p1;
> > > +	struct perf_pmu_event_symbol *pmu2 =
> > > +			(struct perf_pmu_event_symbol *) p2;
> > 
> > please keep it on one line, like:
> > 	const struct perf_pmu_event_symbol *pmu1 = p1;
> > 	const struct perf_pmu_event_symbol *pmu2 = p2;
> > 
> 
> 
> Removing (struct perf_pmu_event_symbol *) will cause compiler error as below.
> 
> util/parse-events.c:877:39: error: initialization discards âconstâ qualifier from pointer target type [-Werror]
>   struct perf_pmu_event_symbol *pmu1 = p1;
> 
> If we keep (struct perf_pmu_event_symbol *), we may not keep it on one line. The line will over 80 characters. There will be error from checkpatch.pl.
> 
> 
> > > +	perf_pmu_events_list =
> > > +		malloc(sizeof(struct perf_pmu_event_symbol) * len);
> > 
> > please keep above on one line
> 
> If so, the line will over 80 characters. There will be error from checkpatch.pl.

AFAIK we are not that strict on this warning.. I think the current
notion is to keep the code easy to read with reasonable breakages
of this rule

jirka

  reply	other threads:[~2014-10-03  8:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-11 19:08 [PATCH V6 0/3] perf tools: pmu event new style format fix kan.liang
2014-09-11 19:08 ` [PATCH V6 1/3] Revert "perf tools: Default to cpu// for events v5" kan.liang
2014-09-11 19:08 ` [PATCH V6 2/3] perf tools: parse the pmu event prefix and surfix kan.liang
2014-09-14 13:23   ` Jiri Olsa
2014-10-02 17:33     ` Liang, Kan
2014-10-03  8:23       ` Jiri Olsa [this message]
2014-09-11 19:08 ` [PATCH V6 3/3] perf tools: Add support to new style format of kernel PMU event kan.liang
2014-09-14 13:23 ` [PATCH V6 0/3] perf tools: pmu event new style format fix Jiri Olsa
2014-10-02 17:33   ` Liang, Kan
2014-10-03  8:24     ` Jiri Olsa

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=20141003082351.GF19087@krava.brq.redhat.com \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=kan.liang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.