From: Matthew Wilcox <matthew@wil.cx>
To: bugzilla-daemon@bugzilla.kernel.org
Cc: linux-scsi@vger.kernel.org
Subject: Re: [Bug 13519] New: Syntax error. Not enough parameters for macro 'qla_printk'.
Date: Fri, 12 Jun 2009 06:32:29 -0600 [thread overview]
Message-ID: <20090612123228.GD19977@parisc-linux.org> (raw)
In-Reply-To: <bug-13519-11613@http.bugzilla.kernel.org/>
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."
next prev parent reply other threads:[~2009-06-12 12:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
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=20090612123228.GD19977@parisc-linux.org \
--to=matthew@wil.cx \
--cc=bugzilla-daemon@bugzilla.kernel.org \
--cc=linux-scsi@vger.kernel.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.