qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] ahci: Remove unused struct member


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH] ahci: Remove unused struct member
Date: Fri, 09 Sep 2011 11:15:49 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0

Am 08.09.2011 21:44, schrieb Stefan Weil:
> Member variable is_read is written, but never read
> (contrary to its name).

Nice commit message :-)

> Kevin Wolf <address@hidden>
> Signed-off-by: Stefan Weil <address@hidden>
> ---
>  hw/ide/ahci.c |    2 --
>  hw/ide/ahci.h |    1 -
>  2 files changed, 0 insertions(+), 3 deletions(-)
> 
> diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
> index f4fa154..a8659cf 100644
> --- a/hw/ide/ahci.c
> +++ b/hw/ide/ahci.c
> @@ -754,7 +754,6 @@ static void process_ncq_command(AHCIState *s, int port, 
> uint8_t *cmd_fis,
>          case READ_FPDMA_QUEUED:
>              DPRINTF(port, "NCQ reading %d sectors from LBA %ld, tag %d\n",
>                      ncq_tfs->sector_count-1, ncq_tfs->lba, ncq_tfs->tag);
> -            ncq_tfs->is_read = 1;
>  
>              DPRINTF(port, "tag %d aio read %ld\n", ncq_tfs->tag, 
> ncq_tfs->lba);
>  
> @@ -768,7 +767,6 @@ static void process_ncq_command(AHCIState *s, int port, 
> uint8_t *cmd_fis,
>          case WRITE_FPDMA_QUEUED:
>              DPRINTF(port, "NCQ writing %d sectors to LBA %ld, tag %d\n",
>                      ncq_tfs->sector_count-1, ncq_tfs->lba, ncq_tfs->tag);
> -            ncq_tfs->is_read = 0;
>  
>              DPRINTF(port, "tag %d aio write %ld\n", ncq_tfs->tag, 
> ncq_tfs->lba);
>  
> diff --git a/hw/ide/ahci.h b/hw/ide/ahci.h
> index 3c29d93..5de986c 100644
> --- a/hw/ide/ahci.h
> +++ b/hw/ide/ahci.h
> @@ -259,7 +259,6 @@ typedef struct NCQTransferState {
>      BlockDriverAIOCB *aiocb;
>      QEMUSGList sglist;
>      BlockAcctCookie acct;
> -    int is_read;
>      uint16_t sector_count;
>      uint64_t lba;
>      uint8_t tag;

Alex, any specific reason you introduced it for? Is it unnecessary or is
it a bug that it has no user?

Kevin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]