Messages in this thread | | | Date | Thu, 19 Apr 2018 10:51:17 +0300 | From | Dan Carpenter <> | Subject | Re: [PATCH] staging: speakup: separate 80+ chars lines. |
| |
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
| |