Try this:
dev_dbg(rsz_device, "%s\n", __FUNCTION__);
It seems that starting in gcc 3.2, __FUNCTION__ is treated the same
way as __func__, which is a variable, not a string literal, so it
cannot be used in string catenation.
// pseudo-definition of __func__
static const char __func__[] = "function-name";
More information from these links:
http://www.delorie.com/gnu/docs/gcc/gcc_78.html
http://gcc.gnu.org/ml/gcc-bugs/2003-10/msg02580.html
On Tue, Apr 15, 2008 at 1:00 AM,
<[EMAIL PROTECTED]> wrote:
> Message: 1
> Date: Mon, 14 Apr 2008 12:16:07 +0800
> From: "steven.zhang" <[EMAIL PROTECTED]>
> Subject: dev_dbg compile error [HELP]
> To: davinci <[email protected]>
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain
>
> Hi, all.
> I am porting a driver supported by TI to kernel 2.6.23. But
> unfortunate get a compile error. It should be easy to fix, thought I
> would rather to see the best way.
> The problem code is :
> "dev_dbg(rsz_device, __FUNCTION__ "L\n");"
>
> its compile error message is
> "error: parse error before string constant"
>
> Can anyone tell me how to fix it ? Thanks.
>
>
> dev_dbg is define in device.h
>
> #ifdef DEBUG
> #define dev_dbg(dev, format, arg...) \
> dev_printk(KERN_DEBUG , dev , format , ## arg)
> #else
> ...
>
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source