Patchwork [PATCHv2] ide/atapi: fix set but unused

login
register
mail settings
Submitter Alon Levy
Date April 28, 2011, 1:34 p.m.
Message ID <1303997679-8885-1-git-send-email-alevy@redhat.com>
Download mbox | patch
Permalink /patch/93218/
State New
Headers show

Comments

Alon Levy - April 28, 2011, 1:34 p.m.
Signed-off-by: Alon Levy <alevy@redhat.com>
---
 hw/ide/atapi.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
Stefan Weil - April 28, 2011, 2:46 p.m.
Am 28.04.2011 15:34, schrieb Alon Levy:
> Signed-off-by: Alon Levy<alevy@redhat.com>
> ---
>   hw/ide/atapi.c |    4 +---
>   1 files changed, 1 insertions(+), 3 deletions(-)
>
> diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c
> index 690a0ab..0073c8d 100644
> --- a/hw/ide/atapi.c
> +++ b/hw/ide/atapi.c
> @@ -1080,17 +1080,15 @@ static const struct {
>
>   void ide_atapi_cmd(IDEState *s)
>   {
> -    const uint8_t *packet;
>       uint8_t *buf;
>
> -    packet = s->io_buffer;
>       buf = s->io_buffer;
>   #ifdef DEBUG_IDE_ATAPI
>       {
>           int i;
>           printf("ATAPI limit=0x%x packet:", s->lcyl | (s->hcyl<<  8));
>           for(i = 0; i<  ATAPI_PACKET_SIZE; i++) {
> -            printf(" %02x", packet[i]);
> +            printf(" %02x", buf[i]);
>           }
>           printf("\n");
>       }
>    

Acked-by: Stefan Weil <weil@mail.berlios.de>
Kevin Wolf - April 29, 2011, 10:58 a.m.
Am 28.04.2011 15:34, schrieb Alon Levy:
> Signed-off-by: Alon Levy <alevy@redhat.com>
> ---
>  hw/ide/atapi.c |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)

Thanks, applied to the block branch.

Kevin

Patch

diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c
index 690a0ab..0073c8d 100644
--- a/hw/ide/atapi.c
+++ b/hw/ide/atapi.c
@@ -1080,17 +1080,15 @@  static const struct {
 
 void ide_atapi_cmd(IDEState *s)
 {
-    const uint8_t *packet;
     uint8_t *buf;
 
-    packet = s->io_buffer;
     buf = s->io_buffer;
 #ifdef DEBUG_IDE_ATAPI
     {
         int i;
         printf("ATAPI limit=0x%x packet:", s->lcyl | (s->hcyl << 8));
         for(i = 0; i < ATAPI_PACKET_SIZE; i++) {
-            printf(" %02x", packet[i]);
+            printf(" %02x", buf[i]);
         }
         printf("\n");
     }