* Re: [Bug 13519] New: Syntax error. Not enough parameters for macro 'qla_printk'.
2009-06-12 12:25 [Bug 13519] New: Syntax error. Not enough parameters for macro 'qla_printk' bugzilla-daemon
@ 2009-06-12 12:32 ` Matthew Wilcox
2009-06-12 12:32 ` [Bug 13519] " bugzilla-daemon
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Matthew Wilcox @ 2009-06-12 12:32 UTC (permalink / raw)
To: bugzilla-daemon; +Cc: linux-scsi
On Fri, Jun 12, 2009 at 12:25:13PM +0000, bugzilla-daemon@bugzilla.kernel.org wrote:
> i have detected a wrong macro call in file qla_sup.c. To detect this issue i
> used the static code analysis tool cppcheck. It prints the following output:
>
> [linux-2.6.30/drivers/scsi/qla2xxx/qla_sup.c:352]: (error) Syntax error. Not
> enough parameters for macro 'qla_printk'.
>
> Take a look at file qla_sup.c line 352
>
> DEBUG9_10(qla_printk(
> "NVRAM didn't go ready...\n"));
>
>
> The maro definition is in file qla_def.h (2657):
>
> #define qla_printk(level, ha, format, arg...) \
> dev_printk(level , &((ha)->pdev->dev) , format , ## arg)
>
> As you can see, it needs more than one parameter.
I believe your tool is defective. As I understand the way variadic
macros work, if there is no 'arg', the ## operator swallows up the
preceeding symbol (ie the ',') and so you'll get:
dev_printk(level , &((ha)->pdev->dev) , format);
which is perfectly fine.
--
Matthew Wilcox Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
^ permalink raw reply [flat|nested] 6+ messages in thread* [Bug 13519] Syntax error. Not enough parameters for macro 'qla_printk'.
2009-06-12 12:25 [Bug 13519] New: Syntax error. Not enough parameters for macro 'qla_printk' bugzilla-daemon
2009-06-12 12:32 ` Matthew Wilcox
@ 2009-06-12 12:32 ` bugzilla-daemon
2009-06-12 12:35 ` bugzilla-daemon
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2009-06-12 12:32 UTC (permalink / raw)
To: linux-scsi
http://bugzilla.kernel.org/show_bug.cgi?id=13519
--- Comment #1 from Matthew Wilcox <matthew@wil.cx> 2009-06-12 12:32:31 ---
On Fri, Jun 12, 2009 at 12:25:13PM +0000, bugzilla-daemon@bugzilla.kernel.org
wrote:
> i have detected a wrong macro call in file qla_sup.c. To detect this issue i
> used the static code analysis tool cppcheck. It prints the following output:
>
> [linux-2.6.30/drivers/scsi/qla2xxx/qla_sup.c:352]: (error) Syntax error. Not
> enough parameters for macro 'qla_printk'.
>
> Take a look at file qla_sup.c line 352
>
> DEBUG9_10(qla_printk(
> "NVRAM didn't go ready...\n"));
>
>
> The maro definition is in file qla_def.h (2657):
>
> #define qla_printk(level, ha, format, arg...) \
> dev_printk(level , &((ha)->pdev->dev) , format , ## arg)
>
> As you can see, it needs more than one parameter.
I believe your tool is defective. As I understand the way variadic
macros work, if there is no 'arg', the ## operator swallows up the
preceeding symbol (ie the ',') and so you'll get:
dev_printk(level , &((ha)->pdev->dev) , format);
which is perfectly fine.
--
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread* [Bug 13519] Syntax error. Not enough parameters for macro 'qla_printk'.
2009-06-12 12:25 [Bug 13519] New: Syntax error. Not enough parameters for macro 'qla_printk' bugzilla-daemon
2009-06-12 12:32 ` Matthew Wilcox
2009-06-12 12:32 ` [Bug 13519] " bugzilla-daemon
@ 2009-06-12 12:35 ` bugzilla-daemon
2009-06-29 11:50 ` bugzilla-daemon
2009-06-29 11:50 ` bugzilla-daemon
4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2009-06-12 12:35 UTC (permalink / raw)
To: linux-scsi
http://bugzilla.kernel.org/show_bug.cgi?id=13519
--- Comment #2 from Martin Ettl <ettl.martin@gmx.de> 2009-06-12 12:35:51 ---
You are right, this is a false positive of cppcheck
Thanks anyway
--
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug 13519] Syntax error. Not enough parameters for macro 'qla_printk'.
2009-06-12 12:25 [Bug 13519] New: Syntax error. Not enough parameters for macro 'qla_printk' bugzilla-daemon
` (2 preceding siblings ...)
2009-06-12 12:35 ` bugzilla-daemon
@ 2009-06-29 11:50 ` bugzilla-daemon
2009-06-29 11:50 ` bugzilla-daemon
4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2009-06-29 11:50 UTC (permalink / raw)
To: linux-scsi
http://bugzilla.kernel.org/show_bug.cgi?id=13519
Alan <alan@lxorguk.ukuu.org.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |alan@lxorguk.ukuu.org.uk
Resolution| |INVALID
--
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread* [Bug 13519] Syntax error. Not enough parameters for macro 'qla_printk'.
2009-06-12 12:25 [Bug 13519] New: Syntax error. Not enough parameters for macro 'qla_printk' bugzilla-daemon
` (3 preceding siblings ...)
2009-06-29 11:50 ` bugzilla-daemon
@ 2009-06-29 11:50 ` bugzilla-daemon
4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2009-06-29 11:50 UTC (permalink / raw)
To: linux-scsi
http://bugzilla.kernel.org/show_bug.cgi?id=13519
Alan <alan@lxorguk.ukuu.org.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |CLOSED
--
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread