[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180419075117.bc3ppzxqhrbl7blg@mwanda>
Date: Thu, 19 Apr 2018 10:51:17 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Andrew Jye Shih Chuang <andrewjschuang@...il.com>
Cc: William Hubbs <w.d.hubbs@...il.com>,
Chris Brannon <chris@...-brannons.com>,
Kirk Reiser <kirk@...sers.ca>,
Samuel Thibault <samuel.thibault@...-lyon.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
speakup@...ux-speakup.org, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org,
lkcamp-request@...ts.libreplanetbr.org
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
Powered by blists - more mailing lists