Re: [PATCH] staging: speakup: separate 80+ chars lines.

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

 



On Thu, Apr 19, 2018 at 03:47:10AM -0300, Andrew Jye Shih Chuang wrote:
> Increase readability of code following the Kernel coding style by breaking long lines and thus eliminating the checkpatch.pl warning.
> 

The commit message also needs to be wrapped.  I do it at 72 characters
like an email.  Roughly around the 70 character mark is fine.

> @@ -1233,7 +1234,8 @@ int spk_set_key_info(const u_char *key_info, u_char *k_buffer)
>  	key_data_len = (states + 1) * (num_keys + 1);
>  	if (key_data_len + SHIFT_TBL_SIZE + 4 >= sizeof(spk_key_buf)) {
>  		pr_debug("too many key_infos (%d over %u)\n",
> -			 key_data_len + SHIFT_TBL_SIZE + 4, (unsigned int)(sizeof(spk_key_buf)));
> +			 key_data_len + SHIFT_TBL_SIZE + 4,
> +			 (unsigned int)(sizeof(spk_key_buf)));

This cast isn't needed.  Just change the %u to %lu in the printk:

		pr_debug("too many key_infos (%d over %lu)\n",
			 key_data_len + SHIFT_TBL_SIZE + 4,
			 sizeof(spk_key_buf));

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