[PATCH][0/2] ide-tape: small cleanups

From: Jesper Juhl
Date: Sun Nov 28 2004 - 11:20:22 EST



Small cleanups for ide-tape.

Patch 1:
-----
The patch removes a bunch of unnessesary parantheses from return
statements. There are tons of return statements that look like this:
return (-EIO); return (fn()); etc.
The patch removes these unneeded parentheses.
The patch also removes a lot of spaces from function declarations. There
is some inconsistency in the file, some functions are declared as
void fn() { }
and some as
void fn () { }
So, the patch changes them to all use a common style. I picked the
void fn() { }
form, since (a) it seems to be the most common form used in the kernel as
a whole, (b) it is the form used in Documentation/CodingStyle, and (c) it
is the form that reduces the filesize a bit :)


Patch 2 (cut on top of Patch 1):
-----
This patch ensures that copy_to|from_user() return values get checked and
dealt with by returning -EFAULT if they fail. Aside from the fact that we
really want to handle these failures, this patch also silences these
warnings:
drivers/ide/ide-tape.c: In function `idetape_copy_stage_from_user':
drivers/ide/ide-tape.c:2613: warning: ignoring return value of `copy_from_user', declared with attribute warn_unused_result
drivers/ide/ide-tape.c: In function `idetape_copy_stage_to_user':
drivers/ide/ide-tape.c:2640: warning: ignoring return value of `copy_to_user', declared with attribute warn_unused_result


Please review these patches. I don't have the hardware to actually test
them myself. All I have been able to do is compile test them and try to
convince myself that they are OK by reading the code.


--
Jesper Juhl <juhl-lkml@xxxxxx>


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/