From: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
To: Armin Schindler <mac@melware.de>, Karsten Keil <isdn@linux-pingi.de>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Subject: [PATCH 1/4] isdn/eicon: remove unused argument in DBG_ERR call
Date: Sat, 29 Oct 2016 14:56:02 +0200 [thread overview]
Message-ID: <20161029125605.13610-1-nicolas.iooss_linux@m4x.org> (raw)
diva_um_idi_read() can call DBG_ERR with 3 format arguments but using a
format string which only uses 2 of them. Remove the last one.
This bug has been found by adding a __printf attribute to
myDbgPrint_...() functions. As this addition leads the compiler to
report a lot of -Wformat warnings (for example the compiler complains
when "%08x" is used to format a pointer, as it is done with all usages
of "E(%08x)" in um_idi.c), this patch does not add any __printf
attribute.
This patch has only been compile-tested.
Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
---
drivers/isdn/hardware/eicon/um_idi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/isdn/hardware/eicon/um_idi.c b/drivers/isdn/hardware/eicon/um_idi.c
index e1519718ce67..13ef38fa6cb0 100644
--- a/drivers/isdn/hardware/eicon/um_idi.c
+++ b/drivers/isdn/hardware/eicon/um_idi.c
@@ -351,7 +351,7 @@ int diva_um_idi_read(void *entity,
Not enough space to read message
*/
DBG_ERR(("A: A(%d) E(%08x) read small buffer",
- a->adapter_nr, e, ret));
+ a->adapter_nr, e));
diva_os_leave_spin_lock(&adapter_lock, &old_irql,
"read");
return (-2);
--
2.10.1
next reply other threads:[~2016-10-29 12:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-29 12:56 Nicolas Iooss [this message]
2016-10-29 12:56 ` [PATCH 2/4] isdn/eicon: fix some message formatting errors Nicolas Iooss
2016-10-31 13:42 ` David Laight
2016-10-29 12:56 ` [PATCH 3/4] isdn/eicon: add some __printf attributes Nicolas Iooss
2016-10-29 12:56 ` [PATCH 4/4] isdn/eicon: use const strings with format arguments Nicolas Iooss
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=20161029125605.13610-1-nicolas.iooss_linux@m4x.org \
--to=nicolas.iooss_linux@m4x.org \
--cc=isdn@linux-pingi.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mac@melware.de \
--cc=netdev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).