Re: [PATCH 6/7] staging: wfx: drop calls to BUG_ON()

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

 



On Tue, Oct 08, 2019 at 09:43:01AM +0000, Jerome Pouiller wrote:
> @@ -56,9 +56,9 @@ static uint8_t fill_tkip_pair(struct hif_tkip_pairwise_key *msg,
>  {
>  	uint8_t *keybuf = key->key;
>  
> -	WARN_ON(key->keylen != sizeof(msg->tkip_key_data)
> -			       + sizeof(msg->tx_mic_key)
> -			       + sizeof(msg->rx_mic_key));
> +	WARN(key->keylen != sizeof(msg->tkip_key_data)
> +			    + sizeof(msg->tx_mic_key)
> +			    + sizeof(msg->rx_mic_key), "inconsistent data");

This is not a comment on the patch since the code was like that
originally, but the " +" should go of the first line:

	WARN(key->keylen != sizeof(msg->tkip_key_data) +
			    sizeof(msg->tx_mic_key) +
			    sizeof(msg->rx_mic_key),
	     "inconsistent data");

That doesn't look too good still...  The error message is sort of
rubbish also.  Anyway the operator goes on the first line.

regards,
dan carpenter
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux