[PATCH] idetape gcc 4.1 warning fix
authorDaniel Walker <dwalker@mvista.com>
Sun, 25 Jun 2006 12:47:37 +0000 (05:47 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 25 Jun 2006 17:01:05 +0000 (10:01 -0700)
commitdcd96379613a3cbe87c30e1c20122ecdcdf3a4b8
treea993e3a14340feb966312078c79e7b9fc1bddbb3
parenta04ee14636fa339c4609766bd6173629d4f9026e
[PATCH] idetape gcc 4.1 warning fix

In both the read and write cases it will return an error if
copy_{from/to}_user faults.  However, I let the driver try to read/write as
much as it can just as it normally would , then finally it returns an error
if there was one.  This was the most straight forward way to handle the
error , since there isn't a clear way to clean up the buffers on error .

I moved retval in idetape_chrdev_write() down into the actual code blocks
since it's really once used there, and it conflicted with my ret variable.

Fixes the following warning,

drivers/ide/ide-tape.c: In function â\80\98idetape_copy_stage_from_userâ\80\99:
drivers/ide/ide-tape.c:2662: warning: ignoring return value of â\80\98copy_from_userâ\80\99, declared with attribute warn_unused_result
drivers/ide/ide-tape.c: In function â\80\98idetape_copy_stage_to_userâ\80\99:
drivers/ide/ide-tape.c:2689: warning: ignoring return value of â\80\98copy_to_userâ\80\99, declared with attribute warn_unused_result

Signed-off-by: Daniel Walker <dwalker@mvista.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/ide/ide-tape.c