ahci: Remove unused struct member
PATCH 1/1 ahci: Remove unused struct member
Member variable is_read is written, but never read (contrary to its name). Remove it.
Kevin Wolf <[email protected]>
--- hw/ide/ahci.c | 2 -- hw/ide/ahci.h | 1 - 2 files changed, 0 insertions(+), 3 deletions(-)
hw/ide/ahci.c +0 -2
@@ -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);
hw/ide/ahci.h +0 -1
@@ -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;
Signature · 1 line
1.7.2.5
Am 08.09.2011 21:44, schrieb Stefan Weil:
Quoted 2 lines
Member variable
is_readis written, but never read (contrary to its name).
Nice commit message :-)
Quoted 32 lines
Kevin Wolf <[email protected]>
Signed-off-by Stefan Weil <[email protected]>--- hw/ide/ahci.c | 2 -- hw/ide/ahci.h | 1 - 2 files changed, 0 insertions(+), 3 deletions(-)hw/ide/ahci.c +0
-2@@ -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);hw/ide/ahci.h +0
-0
hw/ide/ahci.h typedef struct NCQTransferState { · line 264
Quoted 7 lines
hw/ide/ahci.h +0
-1@@ -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
Quoted 33 lines · Kevin Wolf
Am 08.09.2011 21:44, schrieb Stefan Weil:
Quoted 2 lines
Member variable
is_readis written, but never read (contrary to its name).Nice commit message :-)
Quoted 27 lines
Kevin Wolf <[email protected]>
Signed-off-by Stefan Weil <[email protected]>---
hw/ide/ahci.c | 2 -- hw/ide/ahci.h | 1 - 2 files changed, 0 insertions(+), 3 deletions(-)hw/ide/ahci.c +0
-2@@ -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);
Quoted 15 lines
hw/ide/ahci.h typedef struct NCQTransferState { · line 264
Quoted 12 lines
hw/ide/ahci.h +0
-1@@ -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?
This is a leftover from before the code went upstream. It can easily go away :)
Alex
Am 09.09.2011 11:43, schrieb Alexander Graf:
Quoted 52 lines · Kevin Wolf
Quoted 34 lines
Am 08.09.2011 21:44, schrieb Stefan Weil:
Quoted 2 lines
Member variable
is_readis written, but never read (contrary to its name).Nice commit message :-)
Quoted 27 lines
Kevin Wolf <[email protected]>
Signed-off-by Stefan Weil <[email protected]>---
hw/ide/ahci.c | 2 -- hw/ide/ahci.h | 1 - 2 files changed, 0 insertions(+), 3 deletions(-)hw/ide/ahci.c +0
-2@@ -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);Quoted 15 lines
hw/ide/ahci.h typedef struct NCQTransferState { · line 264
Quoted 12 lines
hw/ide/ahci.h +0
-1@@ -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?
Quoted 1 line
This is a leftover from before the code went upstream. It can easily go away :)
Great, thanks. Applied to the block branch.
Kevin