[PATCH 15/18] ide-floppy: zero out the whole struct ide_atapi_pc on init



This is a precaution just to make sure a new pc is clean when allocd. There
should be functional change introduced by this patch.

Signed-off-by: Borislav Petkov <petkovbb@xxxxxxxxx>
---
drivers/ide/ide-floppy.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index 615d3a3..8ce7513 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -355,9 +355,8 @@ static void idefloppy_init_pc(struct ide_atapi_pc *pc, unsigned char *cmd)
if (cmd)
memset(cmd, 0, 12);

- pc->retries = 0;
- pc->flags = 0;
- pc->req_xfer = 0;
+ memset(pc, 0, sizeof(*pc));
+
pc->buf = pc->pc_buf;
pc->buf_size = IDEFLOPPY_PC_BUFFER_SIZE;
pc->callback = ide_floppy_callback;
--
1.5.5.1

--
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/



Relevant Pages

  • RE: perfectnav
    ... This will stop the system from rebooting long enough for you to download the MS04-011 patch and the cleaner tool. ... Please patch then clean! ...
    (microsoft.public.security.virus)
  • Re: System *Still* hangs when Automatic Updates is On
    ... I'll give the clean sweep approach a try. ... Will your patch address this?) ... Installing the lastest Windows Update executable insures ... the batch script I laid out. ...
    (microsoft.public.windowsupdate)
  • Re: [PATCH] 2.6.0 - Watchdog patches
    ... against a clean bk tree, ... each from their own bk clone. ... Then when it comes time to send out a patch, ... clean history of one change for just that patch. ...
    (Linux-Kernel)
  • Cleaning up patch backout files
    ... place where I need to be able to clean up old patches on a large number ... You'll want to find out all the packages a patch affects - you can get the ... Does anybody know of a way to clean up the patch backout files and the ...
    (SunManagers)
  • Re: ipw2100: intrusive cleanups, working this time ;-)
    ... >There's a lot to clean up in header file, ... Initial look over the patch looks reasonable; ... > enum { ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)