block: Change blk_{pread,pwrite}() param order
commita9262f551eba44d4d0f9e396d7124c059a93e204
authorAlberto Faria <afaria@redhat.com>
Tue, 5 Jul 2022 16:15:11 +0000 (5 17:15 +0100)
committerHanna Reitz <hreitz@redhat.com>
Tue, 12 Jul 2022 10:14:56 +0000 (12 12:14 +0200)
treedb282f0d5ffab8fbaa90e42077a8ea1b12635185
parent3b35d4542c8537a9269f6372df531ced6c960084
block: Change blk_{pread,pwrite}() param order

Swap 'buf' and 'bytes' around for consistency with
blk_co_{pread,pwrite}(), and in preparation to implement these functions
using generated_co_wrapper.

Callers were updated using this Coccinelle script:

    @@ expression blk, offset, buf, bytes, flags; @@
    - blk_pread(blk, offset, buf, bytes, flags)
    + blk_pread(blk, offset, bytes, buf, flags)

    @@ expression blk, offset, buf, bytes, flags; @@
    - blk_pwrite(blk, offset, buf, bytes, flags)
    + blk_pwrite(blk, offset, bytes, buf, flags)

It had no effect on hw/block/nand.c, presumably due to the #if, so that
file was updated manually.

Overly-long lines were then fixed by hand.

Signed-off-by: Alberto Faria <afaria@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220705161527.1054072-4-afaria@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
38 files changed:
block.c
block/block-backend.c
block/commit.c
block/crypto.c
block/export/fuse.c
block/parallels.c
block/qcow.c
block/qcow2.c
block/qed.c
block/vdi.c
block/vhdx.c
block/vmdk.c
block/vpc.c
hw/arm/allwinner-h3.c
hw/arm/aspeed.c
hw/block/block.c
hw/block/fdc.c
hw/block/hd-geometry.c
hw/block/m25p80.c
hw/block/nand.c
hw/block/onenand.c
hw/block/pflash_cfi01.c
hw/block/pflash_cfi02.c
hw/ide/atapi.c
hw/misc/mac_via.c
hw/misc/sifive_u_otp.c
hw/nvram/eeprom_at24c.c
hw/nvram/spapr_nvram.c
hw/nvram/xlnx-bbram.c
hw/nvram/xlnx-efuse.c
hw/ppc/pnv_pnor.c
hw/sd/sd.c
include/sysemu/block-backend-io.h
migration/block.c
nbd/server.c
qemu-img.c
qemu-io-cmds.c
tests/unit/test-block-iothread.c