lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <37D7C6CF3E00A74B8858931C1DB2F07701604EBA@SHSMSX103.ccr.corp.intel.com>
Date:	Thu, 2 Oct 2014 17:33:07 +0000
From:	"Liang, Kan" <kan.liang@...el.com>
To:	'Jiri Olsa' <jolsa@...hat.com>
CC:	"acme@...nel.org" <acme@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"ak@...ux.intel.com" <ak@...ux.intel.com>
Subject: RE: [PATCH V6 2/3] perf tools: parse the pmu event prefix and surfix



> >
> > +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.

Kan


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ