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
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to