mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Anand Gadiyar <gadiyar@ti.com>
To: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org
Cc: Anand Gadiyar <gadiyar@ti.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	paulus <paulus@samba.org>, Ingo Molnar <mingo@elte.hu>,
	Tony Lindgren <tony@atomide.com>,
	Russell King <linux@arm.linux.org.uk>
Subject: [PATCH] arm: perf: Fix build break due to a typo
Date: Thu, 14 Oct 2010 20:04:01 +0530	[thread overview]
Message-ID: <1287066841-28569-1-git-send-email-gadiyar@ti.com> (raw)

armpmu is a pointer to a structure - We need to use the
structure pointer operator to access num_events, and not
the structure member operator.

This fixes the following build break when building for OMAP4.

  CC      arch/arm/kernel/perf_event.o
arch/arm/kernel/perf_event.c: In function 'armpmu_event_init':
arch/arm/kernel/perf_event.c:543: error: request for member 'num_events' in something not a structure or union
make[1]: *** [arch/arm/kernel/perf_event.o] Error 1
make: *** [arch/arm/kernel] Error 2

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: paulus <paulus@samba.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Russell King <linux@arm.linux.org.uk>
---
This break is reproducible on linux-next as of 20101014.

This was introduced in commit 15ac9a395a75 in linux-next
<http://git.kernel.org/?p=linux/kernel/git/sfr/linux-next.git;a=commitdiff;h=15ac9a395a753cb28c674e7ea80386ffdff21785>

Strangely, I did not catch it with a standard omap2plus_defconfig
build, but it showed up when I build a custom OMAP4-only config.
I've saved the defconfig for later analysis.

 arch/arm/kernel/perf_event.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: mainline/arch/arm/kernel/perf_event.c
===================================================================
--- mainline.orig/arch/arm/kernel/perf_event.c
+++ mainline/arch/arm/kernel/perf_event.c
@@ -540,7 +540,7 @@ static int armpmu_event_init(struct perf
 	event->destroy = hw_perf_event_destroy;
 
 	if (!atomic_inc_not_zero(&active_events)) {
-		if (atomic_read(&active_events) > armpmu.num_events) {
+		if (atomic_read(&active_events) > armpmu->num_events) {
 			atomic_dec(&active_events);
 			return -ENOSPC;
 		}

             reply	other threads:[~2010-10-14 14:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-14 14:34 Anand Gadiyar [this message]
2010-10-14 16:23 ` Ingo Molnar

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=1287066841-28569-1-git-send-email-gadiyar@ti.com \
    --to=gadiyar@ti.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=tony@atomide.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

all inboxes | Powered by JetHome®