From: hartleys@visionengravers.com (H Hartley Sweeten)
To: linux-arm-kernel@lists.infradead.org
Subject: Question about return_address()
Date: Thu, 12 Apr 2012 12:37:14 -0500 [thread overview]
Message-ID: <ADE657CA350FB648AAC2C43247A983F00206986C0886@AUSP01VMBX24.collaborationhost.net> (raw)
Hello all,
I have a question about the return_address() function.
In arch/arm/include/asm/ftrace.h we have this (comment removed):
#if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND)
void *return_address(unsigned int);
#else
extern inline void *return_address(unsigned int level)
{
return NULL;
}
#endif
And in arch/arm/kernel/return_address.c we have this (only relevant
parts):
#include <linux/ftrace.h>
#if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND)
void *return_address(unsigned int level)
{
...
}
#else /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) */
#if defined(CONFIG_ARM_UNWIND)
#warning "TODO: return_address should use unwind tables"
#endif
void *return_address(unsigned int level)
{
return NULL;
}
#endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) / else */
EXPORT_SYMBOL_GPL(return_address);
It appears that when CONFIG_FRAME_POINTER is set and CONFIG_ARM_UNWIND
is not the function is declared twice, once as an inline in the header and again as an
exported function in the source.
Is this a problem which should be fixed?
Right now it's producing a sparse warning:
warning: symbol 'return_address' was not declared. Should it be static?
Regards,
Hartley
reply other threads:[~2012-04-12 17:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=ADE657CA350FB648AAC2C43247A983F00206986C0886@AUSP01VMBX24.collaborationhost.net \
--to=hartleys@visionengravers.com \
--cc=linux-arm-kernel@lists.infradead.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.