Re: question about drivers/usb/wusbcore/crypto.c

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

 



Julia Lawall wrote:
> The code below seems suspicious.  Which definition of zero_padding is
> the right one?
> 
> This is not intended as a proper patch.  I can send a proper patch when I
> know what to do.

This patch looks correct.

David

> diff -u -p a/drivers/usb/wusbcore/crypto.c b/drivers/usb/wusbcore/crypto.c
> --- a/drivers/usb/wusbcore/crypto.c
> +++ b/drivers/usb/wusbcore/crypto.c
> @@ -221,8 +221,6 @@ static int wusb_ccm_mac(struct crypto_bl
>  	WARN_ON(sizeof(ax) != sizeof(struct aes_ccm_block));
>  
>  	result = -ENOMEM;
> -	zero_padding = sizeof(struct aes_ccm_block)
> -		- blen % sizeof(struct aes_ccm_block);
>  	zero_padding = blen % sizeof(struct aes_ccm_block);
>  	if (zero_padding)
>  		zero_padding = sizeof(struct aes_ccm_block) - zero_padding;
-- 
David Vrabel, Senior Software Engineer, Drivers
CSR, Churchill House, Cambridge Business Park,  Tel: +44 (0)1223 692562
Cowley Road, Cambridge, CB4 0WZ                 http://www.csr.com/


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux