From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
To: Roel Kluin <roel.kluin@gmail.com>
Cc: lkml <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH 29/31] markers: Make static
Date: Tue, 9 Dec 2008 17:53:21 -0500 [thread overview]
Message-ID: <20081209225321.GA6034@Krystal> (raw)
In-Reply-To: <493EEFB6.3080901@gmail.com>
* Roel Kluin (roel.kluin@gmail.com) wrote:
> Sparse asked whether these could be static.
>
Yes, I guess they should. But beware that when using trace_mark_tp()
helper within tracepoint probes, the probe functions should *not* be
made static. Making them static would make the compiler thing that
nobody is actually using them, which is false, because they are used
through the declaration made in the marker section. So we should be very
careful when turning probe functions to "static" that an external
reference to that function will be seen.
trace_mark_tp() is the only "weird" case I have seen so far.
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> samples/markers/probe-example.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/samples/markers/probe-example.c b/samples/markers/probe-example.c
> index 2dfb3b3..d816aad 100644
> --- a/samples/markers/probe-example.c
> +++ b/samples/markers/probe-example.c
> @@ -20,7 +20,7 @@ struct probe_data {
> marker_probe_func *probe_func;
> };
>
> -void probe_subsystem_event(void *probe_data, void *call_data,
> +static void probe_subsystem_event(void *probe_data, void *call_data,
> const char *format, va_list *args)
> {
> /* Declare args */
> @@ -37,9 +37,9 @@ void probe_subsystem_event(void *probe_data, void *call_data,
> /* or count, check rights, serialize data in a buffer */
> }
>
> -atomic_t eventb_count = ATOMIC_INIT(0);
> +static atomic_t eventb_count = ATOMIC_INIT(0);
>
> -void probe_subsystem_eventb(void *probe_data, void *call_data,
> +static void probe_subsystem_eventb(void *probe_data, void *call_data,
> const char *format, va_list *args)
> {
> /* Increment counter */
>
--
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
next prev parent reply other threads:[~2008-12-09 22:53 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-09 16:53 [PATCH 0/33] Make static Roel Kluin
2008-12-09 16:55 ` [PATCH 1/33] Documentation: " Roel Kluin
2008-12-22 19:38 ` Randy Dunlap
2008-12-09 16:58 ` [PATCH 2/33] x86: " Roel Kluin
2008-12-09 19:50 ` Frederik Deweerdt
2008-12-09 19:57 ` [PATCH 2/33 V2] " Roel Kluin
2008-12-09 17:00 ` [PATCH 3/33] block: " Roel Kluin
2008-12-10 14:46 ` Jens Axboe
2008-12-09 17:02 ` [PATCH 4/33] drivers/acpi: " Roel Kluin
2008-12-09 19:45 ` [PATCH 4/33 v2] " Roel Kluin
2008-12-09 17:05 ` [PATCH 5/33] drivers/block/floppy: " Roel Kluin
2008-12-09 17:12 ` [PATCH 6/33] drivers/char: " Roel Kluin
2008-12-09 17:52 ` [PATCH 7/33] drivers/dca: " Roel Kluin
2008-12-09 17:54 ` [PATCH 8/33] drivers/edac: " Roel Kluin
2008-12-09 18:26 ` [PATCH 10/33] drm/i915: " Roel Kluin
2008-12-09 18:41 ` [PATCH 12/33] i2c: " Roel Kluin
2008-12-09 19:04 ` Jean Delvare
2008-12-09 22:53 ` roel kluin
2008-12-09 18:44 ` [PATCH 13/33] Input: " Roel Kluin
2008-12-09 18:50 ` [PATCH 14/33] isdn: " Roel Kluin
2008-12-11 9:48 ` Armin Schindler
2008-12-09 18:52 ` [PATCH 15/33] leds: " Roel Kluin
2008-12-09 18:56 ` [PATCH 16/33] DVB: " Roel Kluin
2008-12-09 18:59 ` [PATCH 17/33] drivers/misc: " Roel Kluin
2008-12-09 19:06 ` [PATCH 18/33] drivers/net: " Roel Kluin
2008-12-10 0:42 ` Jeff Kirsher
2008-12-09 20:49 ` [PATCH 18/31] drivers/pci: " Roel Kluin
2008-12-09 22:53 ` Jesse Barnes
2008-12-09 21:12 ` [PATCH 19/31] drivers/pcmcia: " Roel Kluin
2008-12-09 21:20 ` [PATCH 20/31] drivers/pnp: " Roel Kluin
2008-12-09 21:41 ` [PATCH 21/31] drivers/power: " Roel Kluin
2008-12-09 21:50 ` [PATCH 23/31] drivers/usb: " Roel Kluin
2008-12-09 21:56 ` [PATCH 24/31] drivers/video: " Roel Kluin
2008-12-09 22:06 ` [PATCH 25/31] fs: " Roel Kluin
2008-12-09 22:11 ` [PATCH 26/31] kernel: " Roel Kluin
2008-12-09 22:14 ` [PATCH 27/31] mm: " Roel Kluin
2008-12-09 22:20 ` [PATCH 28/31] net: " Roel Kluin
2008-12-10 23:18 ` David Miller
2008-12-09 22:22 ` [PATCH 29/31] markers: " Roel Kluin
2008-12-09 22:53 ` Mathieu Desnoyers [this message]
2009-02-19 4:29 ` Mathieu Desnoyers
2008-12-09 22:26 ` [PATCH 30/31] sound: " Roel Kluin
2008-12-10 14:21 ` Takashi Iwai
2008-12-09 22:28 ` [PATCH 31/31] virt: " Roel Kluin
2008-12-10 10:07 ` Avi Kivity
2008-12-10 10:23 ` Avi Kivity
2008-12-09 22:52 ` [PATCH 22/31] scsi: " Roel Kluin
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=20081209225321.GA6034@Krystal \
--to=mathieu.desnoyers@polymtl.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=roel.kluin@gmail.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