From: Thomas Fjellstrom <thomas-T/OQ2aoscs6U4IzBdx3r/Q@public.gmane.org>
To: Larry Finger <Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
Cc: Vladimir Kondratiev
<qca_vkondrat-A+ZNKFmMK5xy9aJCnZT0Uw@public.gmane.org>,
linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org,
linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
wil6210-A+ZNKFmMK5xy9aJCnZT0Uw@public.gmane.org,
Stable <stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] ath: wil6210: Fix build error
Date: Sun, 21 Jul 2013 09:35:40 -0600 [thread overview]
Message-ID: <1559869.yu0fjJXVeX@balsa> (raw)
In-Reply-To: <51EBFABB.8080701-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
On Sun 21 July 2013 10:14:03 Larry Finger wrote:
> On 07/21/2013 02:06 AM, Vladimir Kondratiev wrote:
> > On Saturday, July 20, 2013 09:46:48 PM Larry Finger wrote:
> >> Building driver wil6210 in 3.10 and 3.11 kernels yields the following
errors:
> >>
> >> CC [M] drivers/net/wireless/ath/wil6210/debugfs.o
> >> drivers/net/wireless/ath/wil6210/debugfs.c: In function 'wil_print_ring':
> >> drivers/net/wireless/ath/wil6210/debugfs.c:163:11: error: pointer targets
in passing argument 5 of 'hex_dump_to_buffer' differ in signedness [-
Werror=pointer-sign]
> >> false);
> >> ^
> >> In file included from include/linux/kernel.h:13:0,
> >> from include/linux/cache.h:4,
> >> from include/linux/time.h:4,
> >> from include/linux/stat.h:18,
> >> from include/linux/module.h:10,
> >> from drivers/net/wireless/ath/wil6210/debugfs.c:17:
> >> include/linux/printk.h:361:13: note: expected 'char *' but argument is of
type 'unsigned char *'
> >> extern void hex_dump_to_buffer(const void *buf, size_t len,
> >> ^
> >> drivers/net/wireless/ath/wil6210/debugfs.c: In function
'wil_txdesc_debugfs_show':
> >> drivers/net/wireless/ath/wil6210/debugfs.c:429:10: error: pointer targets
in passing argument 5 of 'hex_dump_to_buffer' differ in signedness [-
Werror=pointer-sign]
> >> sizeof(printbuf), false);
> >> ^
> >> In file included from include/linux/kernel.h:13:0,
> >> from include/linux/cache.h:4,
> >> from include/linux/time.h:4,
> >> from include/linux/stat.h:18,
> >> from include/linux/module.h:10,
> >> from drivers/net/wireless/ath/wil6210/debugfs.c:17:
> >> include/linux/printk.h:361:13: note: expected 'char *' but argument is of
type 'unsigned char *'
> >> extern void hex_dump_to_buffer(const void *buf, size_t len,
> >> ^
> >> cc1: all warnings being treated as errors
> >> make[5]: *** [drivers/net/wireless/ath/wil6210/debugfs.o] Error 1
> >> make[4]: *** [drivers/net/wireless/ath/wil6210] Error 2
> >> make[3]: *** [drivers/net/wireless/ath] Error 2
> >> make[2]: *** [drivers/net/wireless] Error 2
> >> make[1]: *** [drivers/net] Error 2
> >> make: *** [drivers] Error 2
> >>
> >> These errors are fixed by changing the type of the buffer from "unsigned
char *" to "char *".
> >>
> >> Reported-by: Thomas Fjellstrom <thomas-T/OQ2aoscs6U4IzBdx3r/Q@public.gmane.org>
> >> Tested-by: Thomas Fjellstrom <thomas-T/OQ2aoscs6U4IzBdx3r/Q@public.gmane.org>
> >> Signed-off-by: Larry Finger <Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
> >> Cc: Stable <stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org> [3.10]
> >> Cc: Thomas Fjellstrom <thomas-T/OQ2aoscs6U4IzBdx3r/Q@public.gmane.org>
> >> ---
> >> drivers/net/wireless/ath/wil6210/debugfs.c | 4 ++--
> >> 1 file changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/drivers/net/wireless/ath/wil6210/debugfs.c
b/drivers/net/wireless/ath/wil6210/debugfs.c
> >> index e8308ec..ab63676 100644
> >> --- a/drivers/net/wireless/ath/wil6210/debugfs.c
> >> +++ b/drivers/net/wireless/ath/wil6210/debugfs.c
> >> @@ -145,7 +145,7 @@ static void wil_print_ring(struct seq_file *s, const
char *prefix,
> >> le16_to_cpu(hdr.type), hdr.flags);
> >> if (len <= MAX_MBOXITEM_SIZE) {
> >> int n = 0;
> >> - unsigned char printbuf[16 * 3 + 2];
> >> + char printbuf[16 * 3 + 2];
> >> unsigned char databuf[MAX_MBOXITEM_SIZE];
> >> void __iomem *src = wmi_buffer(wil, d.addr) +
> >> sizeof(struct wil6210_mbox_hdr);
> >> @@ -416,7 +416,7 @@ static int wil_txdesc_debugfs_show(struct seq_file *s,
void *data)
> >> seq_printf(s, " SKB = %p\n", skb);
> >>
> >> if (skb) {
> >> - unsigned char printbuf[16 * 3 + 2];
> >> + char printbuf[16 * 3 + 2];
> >> int i = 0;
> >> int len = le16_to_cpu(d->dma.length);
> >> void *p = skb->data;
> >>
> > Hmm, I have no warning for this with neither 3.10 nor 3.11 kernel version;
but
> > patch is correct, and here is my
> > Signed-off-by: Vladimir Kondratiev <qca_vkondrat-A+ZNKFmMK5xy9aJCnZT0Uw@public.gmane.org>
>
> Thanks. I did not see any warning or error either; however, it did happen
for
> Thomas. I'm not sure what combination of compiler version and/or switches
lead
> to the problem, but his system apparently uses them.
If it helps, I'm running a fresh install of Debian Sid with gcc 4.8.1. I've
noticed that each newer successive version of gcc gets more strict with what
code it accepts without warning, or error. A lot of my only somewhat old code
tends to have a lot more warnings. Especially that signedness warning.
It also looked like that that driver or section of the kernel was compiling
with -Werror. I haven't verrified that but I remember seeing "treating all
warnings as errors" at one point.
> Larry
>
>
--
Thomas Fjellstrom
thomas-T/OQ2aoscs6U4IzBdx3r/Q@public.gmane.org
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-07-21 15:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-21 2:46 [PATCH] ath: wil6210: Fix build error Larry Finger
2013-07-21 7:06 ` Vladimir Kondratiev
2013-07-21 15:14 ` Larry Finger
[not found] ` <51EBFABB.8080701-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
2013-07-21 15:35 ` Thomas Fjellstrom [this message]
2013-07-21 15:52 ` Vladimir Kondratiev
2013-07-21 16:55 ` Kalle Valo
2013-07-22 1:45 ` Ben Hutchings
2013-07-22 9:56 ` Vladimir Kondratiev
2013-07-22 16:17 ` Luis R. Rodriguez
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=1559869.yu0fjJXVeX@balsa \
--to=thomas-t/oq2aoscs6u4izbdx3r/q@public.gmane.org \
--cc=Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org \
--cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=qca_vkondrat-A+ZNKFmMK5xy9aJCnZT0Uw@public.gmane.org \
--cc=stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=wil6210-A+ZNKFmMK5xy9aJCnZT0Uw@public.gmane.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).