LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 1/4] ide: fix sparse warning about shadowing 'flags' symbol
@ 2008-02-17 19:52 Bartlomiej Zolnierkiewicz
2008-02-18 15:48 ` Sergei Shtylyov
2008-02-19 12:13 ` Sergei Shtylyov
0 siblings, 2 replies; 3+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-02-17 19:52 UTC (permalink / raw)
To: linux-ide; +Cc: linux-kernel
drivers/ide/ide.c:801:18: warning: symbol 'flags' shadows an earlier one
drivers/ide/ide.c:732:16: originally declared here
Also fix some whitespace damage while at it.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ide/ide.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
Index: b/drivers/ide/ide.c
===================================================================
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -797,10 +797,9 @@ int generic_ide_ioctl(ide_drive_t *drive
drive->nice1 = (arg >> IDE_NICE_1) & 1;
return 0;
case HDIO_DRIVE_RESET:
- {
- unsigned long flags;
- if (!capable(CAP_SYS_ADMIN)) return -EACCES;
-
+ if (!capable(CAP_SYS_ADMIN))
+ return -EACCES;
+
/*
* Abort the current command on the
* group if there is one, taking
@@ -819,17 +818,15 @@ int generic_ide_ioctl(ide_drive_t *drive
ide_abort(drive, "drive reset");
BUG_ON(HWGROUP(drive)->handler);
-
+
/* Ensure nothing gets queued after we
drop the lock. Reset will clear the busy */
-
+
HWGROUP(drive)->busy = 1;
spin_unlock_irqrestore(&ide_lock, flags);
(void) ide_do_reset(drive);
return 0;
- }
-
case HDIO_GET_BUSSTATE:
if (!capable(CAP_SYS_ADMIN))
return -EACCES;
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-02-19 12:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-17 19:52 [PATCH 1/4] ide: fix sparse warning about shadowing 'flags' symbol Bartlomiej Zolnierkiewicz
2008-02-18 15:48 ` Sergei Shtylyov
2008-02-19 12:13 ` Sergei Shtylyov
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).