Re: [PATCH -next] crct10dif: remove extra function call in crc_t10dif() and crc_t10dif_update()

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

 



On Wed, 2015-05-06 at 18:18 +0900, Akinobu Mita wrote:
> Calling crypto_shash_import() in crc_t10dif() and crc_t10dif_update()
> is overkill as the existing crct10dif modules (crct10dif-generic and
> crct10dif-pclmul) don't require.
> 
> We also do the same thing with crc32c() in lib/libcrc32.c.
> 
> Signed-off-by: Akinobu Mita <akinobu.mita@xxxxxxxxx>
> Cc: Tim Chen <tim.c.chen@xxxxxxxxxxxxxxx>
> Cc: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>
> Cc: linux-crypto@xxxxxxxxxxxxxxx
> Cc: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>
> Cc: Sagi Grimberg <sagig@xxxxxxxxxxxx>
> Cc: "Martin K. Petersen" <martin.petersen@xxxxxxxxxx>
> Cc: Christoph Hellwig <hch@xxxxxx>
> Cc: "James E.J. Bottomley" <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>
> Cc: target-devel@xxxxxxxxxxxxxxx
> Cc: linux-scsi@xxxxxxxxxxxxxxx
> ---
>  lib/crc-t10dif.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/lib/crc-t10dif.c b/lib/crc-t10dif.c
> index d775737..1ad33e5 100644
> --- a/lib/crc-t10dif.c
> +++ b/lib/crc-t10dif.c
> @@ -32,9 +32,8 @@ __u16 crc_t10dif_update(__u16 crc, const unsigned char *buffer, size_t len)
>  
>  	desc.shash.tfm = crct10dif_tfm;
>  	desc.shash.flags = 0;
> +	*(__u16 *)desc.ctx = crc;
>  
> -	err = crypto_shash_import(&desc.shash, &crc);
> -	BUG_ON(err);
>  	err = crypto_shash_update(&desc.shash, buffer, len);
>  	BUG_ON(err);
>  

Applied + squashed into the original commit in target-pending/for-next:

    lib: introduce crc_t10dif_update()

Please let me know if anything else needs to be applied.

Thanks Akinobu + Tim + Herbert!

--nab

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux