From: "Cédric Augonnet" <cedric.augonnet@gmail.com>
To: "Gabriel C" <nix.or.die@googlemail.com>
Cc: "Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: voyager_{thread,cat}.c compile warnings
Date: Sun, 22 Jul 2007 11:33:21 -0400 [thread overview]
Message-ID: <f56c1ba00707220833m267491afg277a028e6c103e31@mail.gmail.com> (raw)
In-Reply-To: <46A282B2.8070501@googlemail.com>
[-- Attachment #1: Type: text/plain, Size: 1191 bytes --]
Hi,
2007/7/21, Gabriel C <nix.or.die@googlemail.com>:
> Hi,
>
> I noticed this warnings on current git:
>
>
> ...
>
> arch/i386/mach-voyager/voyager_thread.c: In function 'thread':
> arch/i386/mach-voyager/voyager_thread.c:113: warning: no return statement in function returning non-void
>
> ...
>
> I think return 0; is missing on line 112 here.
>
I guess there is no use in always returning 0, simply not returning anything and
putting a void type might be cleaner, especially as this function
seems to never
return.
>
> arch/i386/mach-voyager/voyager_cat.c: In function 'voyager_cat_init':
> arch/i386/mach-voyager/voyager_cat.c:685: warning: comparison is always false due to limited range of data type
> arch/i386/mach-voyager/voyager_cat.c:755: warning: comparison is always false due to limited range of data type
>
Hum perhaps it does not like the comparision of a __u16 and an unsigned int ?
I enclose some dummy patch that should perhaps solve these issues,
could not test it as i don't have the hardware... just my 2 cents.
Don't know if casting is an
acceptable workaround though.
>
>
> Regards,
>
> Gabriel C
>
Cheers,
Cédric
[-- Attachment #2: voyager.patch --]
[-- Type: text/x-diff, Size: 1439 bytes --]
Submitted by: Cedric Augonnet <cedric.augonnet@ens-lyon.org>
---
diff -urN a/arch/i386/mach-voyager/voyager_cat.c b/arch/i386/mach-voyager/voyager_cat.c
--- /home/gonnet/tmp/linux-2.6.22/arch/i386/mach-voyager/voyager_cat.c 2007-07-20 11:50:17.000000000 -0400
+++ linux-2.6.22/arch/i386/mach-voyager/voyager_cat.c 2007-07-22 11:24:34.000000000 -0400
@@ -682,7 +682,7 @@
outb(VOYAGER_CAT_END, CAT_CMD);
continue;
}
- if(eprom_size > sizeof(eprom_buf)) {
+ if((unsigned)eprom_size > sizeof(eprom_buf)) {
printk("**WARNING**: Voyager insufficient size to read EPROM data, module 0x%x. Need %d\n", i, eprom_size);
outb(VOYAGER_CAT_END, CAT_CMD);
continue;
@@ -752,7 +752,7 @@
outb(VOYAGER_CAT_END, CAT_CMD);
continue;
}
- if(eprom_size > sizeof(eprom_buf)) {
+ if((unsigned)eprom_size > sizeof(eprom_buf)) {
printk("**WARNING**: Voyager insufficient size to read EPROM data, module 0x%x. Need %d\n", i, eprom_size);
outb(VOYAGER_CAT_END, CAT_CMD);
continue;
diff -urN a/arch/i386/mach-voyager/voyager_thread.c b/arch/i386/mach-voyager/voyager_thread.c
--- /home/gonnet/tmp/linux-2.6.22/arch/i386/mach-voyager/voyager_thread.c 2007-07-20 11:50:17.000000000 -0400
+++ linux-2.6.22/arch/i386/mach-voyager/voyager_thread.c 2007-07-22 11:27:13.000000000 -0400
@@ -92,7 +92,7 @@
}
}
-static int
+static void
thread(void *unused)
{
printk(KERN_NOTICE "Voyager starting monitor thread\n");
next prev parent reply other threads:[~2007-07-22 15:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-21 22:03 Gabriel C
2007-07-22 15:33 ` Cédric Augonnet [this message]
2007-07-22 22:49 ` Cédric Augonnet
2007-07-22 23:39 ` James Bottomley
2007-07-23 0:39 ` Cédric Augonnet
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=f56c1ba00707220833m267491afg277a028e6c103e31@mail.gmail.com \
--to=cedric.augonnet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nix.or.die@googlemail.com \
/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
all inboxes | Powered by JetHome®