RE: [PATCH v2 01/11] async_tx: rename zero_sum to val

Sosnowski, Maciej
2009-05-29T13:42:36Z

Dan Williams wrote:
> 'zero_sum' does not properly describe the operation of generating parity
> and checking that it validates against an existing buffer.  Change the
> name of the operation to 'val' (for 'validate').  This is in
> anticipation of the p+q case where it is a requirement to identify the
> target parity buffers separately from the source buffers, because the
> target parity buffers will not have corresponding pq coefficients.
>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> ---
>  arch/arm/mach-iop13xx/setup.c |    8 ++++----
>  arch/arm/plat-iop/adma.c      |    2 +-
>  crypto/async_tx/async_xor.c   |   16 ++++++++--------
>  drivers/dma/dmaengine.c       |    4 ++--
>  drivers/dma/iop-adma.c        |   38 +++++++++++++++++++-------------------
>  drivers/md/raid5.c            |    2 +-
>  include/linux/async_tx.h      |    2 +-
>  include/linux/dmaengine.h     |    8 ++++----
>  8 files changed, 40 insertions(+), 40 deletions(-)

Acked-by: Maciej Sosnowski <maciej.sosnowski@intel.com>

with following comments:

> @@ -1072,10 +1072,10 @@ iop_adma_xor_zero_sum_self_test(struct
> iop_adma_device *device)
>                dma_srcs[i] = dma_map_page(dma_chan->device->dev,
>                                           zero_sum_srcs[i], 0, PAGE_SIZE,
>                                           DMA_TO_DEVICE);
> -       tx = iop_adma_prep_dma_zero_sum(dma_chan, dma_srcs,
> -                                       IOP_ADMA_NUM_SRC_TEST + 1, PAGE_SIZE,
> -                                       &zero_sum_result,
> -                                       DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
> +       tx = iop_adma_prep_dma_xor_val(dma_chan, dma_srcs,
> +                                      IOP_ADMA_NUM_SRC_TEST + 1, PAGE_SIZE,
> +                                      &zero_sum_result,
> +                                      DMA_PREP_INTERRUPT | DMA_CTRL_ACK);

What about zero_sum_srcs and zero_sum_result? Shouldn't they be renamed too?

> --- a/drivers/md/raid5.c
> +++ b/drivers/md/raid5.c
> @@ -854,7 +854,7 @@ static void ops_run_check(struct stripe_head *sh)
>                        xor_srcs[count++] = dev->page;
>        }
>
> -       tx = async_xor_zero_sum(xor_dest, xor_srcs, 0, count, STRIPE_SIZE,
> +       tx = async_xor_val(xor_dest, xor_srcs, 0, count, STRIPE_SIZE,
>                &sh->ops.zero_sum_result, 0, NULL, NULL, NULL);

And the same here...

Regards,
Maciej