* [PATCH] Compilation error on 2.5.10 linux-2.5/drivers/ide/pdc4030.c
@ 2002-01-10 21:05 Bongani Hlope
0 siblings, 0 replies; 3+ messages in thread
From: Bongani Hlope @ 2002-01-10 21:05 UTC (permalink / raw)
To: LKM; +Cc: Linus Torvalds
This fixes an error when compiling and removes a unused variable warning
The following warning I'm not sure about though:
pdc4030.c: In function `do_pdc4030_io':
pdc4030.c:571: warning: control reaches end of non-void function
-Bongani
--- /usr/src/linux-2.5/drivers/ide/pdc4030.c Wed Jan 9 21:46:15 2002
+++ /usr/src/linux-2.5-dev/drivers/ide/pdc4030.c Thu Jan 10
22:50:29 2002
@@ -393,7 +393,6 @@
{
ide_hwgroup_t *hwgroup = HWGROUP(drive);
struct request *rq = hwgroup->rq;
- int i;
if (GET_STAT() & BUSY_STAT) {
if (time_before(jiffies, hwgroup->poll_timeout)) {
@@ -498,6 +497,7 @@
{
unsigned long timeout;
byte stat;
+ ide_startstop_t startstop;
/* Check that it's a regular command. If not, bomb out early. */
if (!(rq->flags & REQ_CMD)) {
@@ -543,7 +543,6 @@
break;
case WRITE:
- ide_startstop_t startstop;
OUT_BYTE(PROMISE_WRITE, IDE_COMMAND_REG);
/*
* Strategy on write is:
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Compilation error on 2.5.10 linux-2.5/drivers/ide/pdc4030.c
@ 2002-01-11 9:01 Zwane Mwaikambo
2002-01-11 9:04 ` Andre Hedrick
0 siblings, 1 reply; 3+ messages in thread
From: Zwane Mwaikambo @ 2002-01-11 9:01 UTC (permalink / raw)
To: bonganilinux; +Cc: Linux Kernel
>This fixes an error when compiling and removes a unused variable warning
>The following warning I'm not sure about though:
>
>pdc4030.c: In function `do_pdc4030_io':
>pdc4030.c:571: warning: control reaches end of non-void function
That warning is because the function returns an ide_startstop_t but there
is no ending return statement. Looking at the code it is possible to
reach that particular code path. Mind doing a quick patch?
ide_startstop_t do_pdc4030_io (ide_drive_t *drive, struct request *rq)
{
<snip>
default:
printk(KERN_ERR "pdc4030: command not READ or WRITE!
Huh?\n");
ide_end_request(0, HWGROUP(drive));
break;
}
<=== [1]
}
[1] No return statement here but function is non-void (ie it should return
something)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Compilation error on 2.5.10 linux-2.5/drivers/ide/pdc4030.c
2002-01-11 9:01 Zwane Mwaikambo
@ 2002-01-11 9:04 ` Andre Hedrick
0 siblings, 0 replies; 3+ messages in thread
From: Andre Hedrick @ 2002-01-11 9:04 UTC (permalink / raw)
To: Zwane Mwaikambo; +Cc: bonganilinux, Linux Kernel
I am aware of the problem and have if fixed just need to submit to Jens.
On Fri, 11 Jan 2002, Zwane Mwaikambo wrote:
> >This fixes an error when compiling and removes a unused variable warning
> >The following warning I'm not sure about though:
> >
> >pdc4030.c: In function `do_pdc4030_io':
> >pdc4030.c:571: warning: control reaches end of non-void function
>
> That warning is because the function returns an ide_startstop_t but there
> is no ending return statement. Looking at the code it is possible to
> reach that particular code path. Mind doing a quick patch?
>
> ide_startstop_t do_pdc4030_io (ide_drive_t *drive, struct request *rq)
> {
> <snip>
> default:
> printk(KERN_ERR "pdc4030: command not READ or WRITE!
> Huh?\n");
> ide_end_request(0, HWGROUP(drive));
> break;
> }
> <=== [1]
> }
>
> [1] No return statement here but function is non-void (ie it should return
> something)
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
Andre Hedrick
Linux ATA Development
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-01-11 9:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-10 21:05 [PATCH] Compilation error on 2.5.10 linux-2.5/drivers/ide/pdc4030.c Bongani Hlope
-- strict thread matches above, loose matches on Subject: below --
2002-01-11 9:01 Zwane Mwaikambo
2002-01-11 9:04 ` Andre Hedrick
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox