[PATCH 0/7] block: Use definitions instead of magic values

Philippe Mathieu-Daudé posted 7 patches 3 years, 8 months ago
Test docker-quick@centos7 passed
Test docker-mingw@fedora passed
Test checkpatch passed
Test FreeBSD passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200814082841.27000-1-f4bug@amsat.org
Maintainers: Laurent Vivier <laurent@vivier.eu>, Michael Tokarev <mjt@tls.msk.ru>
block/null.c        |  4 +++-
hw/ide/ahci.c       |  5 +++--
hw/ide/atapi.c      |  8 ++++----
hw/ide/core.c       | 25 +++++++++++++------------
hw/ide/pci.c        |  2 +-
hw/scsi/scsi-disk.c | 44 +++++++++++++++++++++++---------------------
6 files changed, 47 insertions(+), 41 deletions(-)
[PATCH 0/7] block: Use definitions instead of magic values
Posted by Philippe Mathieu-Daudé 3 years, 8 months ago
Trivial block patches:
- Fix a typo
- Replace '1 << 30' by '1 * GiB' in null-co
- Replace 512 by BDRV_SECTOR_SIZE when appropriate.

Philippe Mathieu-Daudé (7):
  block/null: Make more explicit the driver default size is 1GiB
  hw/ide/core: Trivial typo fix
  hw/ide/core: Replace magic '512' value by BDRV_SECTOR_SIZE
  hw/ide/ahci: Replace magic '512' value by BDRV_SECTOR_SIZE
  hw/ide/atapi: Replace magic '512' value by BDRV_SECTOR_SIZE
  hw/ide/pci: Replace magic '512' value by BDRV_SECTOR_SIZE
  hw/scsi/scsi-disk: Replace magic '512' value by BDRV_SECTOR_SIZE

 block/null.c        |  4 +++-
 hw/ide/ahci.c       |  5 +++--
 hw/ide/atapi.c      |  8 ++++----
 hw/ide/core.c       | 25 +++++++++++++------------
 hw/ide/pci.c        |  2 +-
 hw/scsi/scsi-disk.c | 44 +++++++++++++++++++++++---------------------
 6 files changed, 47 insertions(+), 41 deletions(-)

-- 
2.21.3


Re: [PATCH 0/7] block: Use definitions instead of magic values
Posted by Laurent Vivier 3 years, 8 months ago
Le 14/08/2020 à 10:28, Philippe Mathieu-Daudé a écrit :
> Trivial block patches:
> - Fix a typo
> - Replace '1 << 30' by '1 * GiB' in null-co
> - Replace 512 by BDRV_SECTOR_SIZE when appropriate.
> 
> Philippe Mathieu-Daudé (7):
>   block/null: Make more explicit the driver default size is 1GiB
>   hw/ide/core: Trivial typo fix
>   hw/ide/core: Replace magic '512' value by BDRV_SECTOR_SIZE
>   hw/ide/ahci: Replace magic '512' value by BDRV_SECTOR_SIZE
>   hw/ide/atapi: Replace magic '512' value by BDRV_SECTOR_SIZE
>   hw/ide/pci: Replace magic '512' value by BDRV_SECTOR_SIZE
>   hw/scsi/scsi-disk: Replace magic '512' value by BDRV_SECTOR_SIZE
> 
>  block/null.c        |  4 +++-
>  hw/ide/ahci.c       |  5 +++--
>  hw/ide/atapi.c      |  8 ++++----
>  hw/ide/core.c       | 25 +++++++++++++------------
>  hw/ide/pci.c        |  2 +-
>  hw/scsi/scsi-disk.c | 44 +++++++++++++++++++++++---------------------
>  6 files changed, 47 insertions(+), 41 deletions(-)
> 

Applied to my trivial-patches branch.

Except the following ones that have comment from Kevin:

[PATCH 1/7] block/null: Make more explicit the driver default size is 1GiB
[PATCH 3/7] hw/ide/core: Replace magic '512' value by BDRV_SECTOR_SIZE

Thanks,
Laurent

Re: [PATCH 0/7] block: Use definitions instead of magic values
Posted by Philippe Mathieu-Daudé 3 years, 8 months ago
On 9/1/20 11:27 AM, Laurent Vivier wrote:
> Le 14/08/2020 à 10:28, Philippe Mathieu-Daudé a écrit :
>> Trivial block patches:
>> - Fix a typo
>> - Replace '1 << 30' by '1 * GiB' in null-co
>> - Replace 512 by BDRV_SECTOR_SIZE when appropriate.
>>
>> Philippe Mathieu-Daudé (7):
>>   block/null: Make more explicit the driver default size is 1GiB
>>   hw/ide/core: Trivial typo fix
>>   hw/ide/core: Replace magic '512' value by BDRV_SECTOR_SIZE
>>   hw/ide/ahci: Replace magic '512' value by BDRV_SECTOR_SIZE
>>   hw/ide/atapi: Replace magic '512' value by BDRV_SECTOR_SIZE
>>   hw/ide/pci: Replace magic '512' value by BDRV_SECTOR_SIZE
>>   hw/scsi/scsi-disk: Replace magic '512' value by BDRV_SECTOR_SIZE
>>
>>  block/null.c        |  4 +++-
>>  hw/ide/ahci.c       |  5 +++--
>>  hw/ide/atapi.c      |  8 ++++----
>>  hw/ide/core.c       | 25 +++++++++++++------------
>>  hw/ide/pci.c        |  2 +-
>>  hw/scsi/scsi-disk.c | 44 +++++++++++++++++++++++---------------------
>>  6 files changed, 47 insertions(+), 41 deletions(-)
>>
> 
> Applied to my trivial-patches branch.
> 
> Except the following ones that have comment from Kevin:
> 
> [PATCH 1/7] block/null: Make more explicit the driver default size is 1GiB
> [PATCH 3/7] hw/ide/core: Replace magic '512' value by BDRV_SECTOR_SIZE

Thanks!

Phil.

Re: [PATCH 0/7] block: Use definitions instead of magic values
Posted by Stefano Garzarella 3 years, 8 months ago
On Fri, Aug 14, 2020 at 10:28:34AM +0200, Philippe Mathieu-Daudé wrote:
> Trivial block patches:
> - Fix a typo
> - Replace '1 << 30' by '1 * GiB' in null-co
> - Replace 512 by BDRV_SECTOR_SIZE when appropriate.
> 
> Philippe Mathieu-Daudé (7):
>   block/null: Make more explicit the driver default size is 1GiB
>   hw/ide/core: Trivial typo fix
>   hw/ide/core: Replace magic '512' value by BDRV_SECTOR_SIZE
>   hw/ide/ahci: Replace magic '512' value by BDRV_SECTOR_SIZE
>   hw/ide/atapi: Replace magic '512' value by BDRV_SECTOR_SIZE
>   hw/ide/pci: Replace magic '512' value by BDRV_SECTOR_SIZE
>   hw/scsi/scsi-disk: Replace magic '512' value by BDRV_SECTOR_SIZE
> 
>  block/null.c        |  4 +++-
>  hw/ide/ahci.c       |  5 +++--
>  hw/ide/atapi.c      |  8 ++++----
>  hw/ide/core.c       | 25 +++++++++++++------------
>  hw/ide/pci.c        |  2 +-
>  hw/scsi/scsi-disk.c | 44 +++++++++++++++++++++++---------------------
>  6 files changed, 47 insertions(+), 41 deletions(-)

Series:
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>


Thanks for the cleaning that makes the code more readable!
Stefano