lkml.org 
[lkml]   [2020]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 30/31] i2c: tegra: Clean up and improve comments
On Sun, Sep 06, 2020 at 01:53:56AM +0300, Dmitry Osipenko wrote:
> 06.09.2020 01:47, Michał Mirosław пишет:
> > On Sat, Sep 05, 2020 at 11:41:50PM +0300, Dmitry Osipenko wrote:
> >> Make all comments to be consistent in regards to capitalization and
> >> punctuation, correct spelling and grammar errors.
> > [...]
> >> - /* Rounds down to not include partial word at the end of buf */
> >> + /* rounds down to not include partial word at the end of buffer */
> >> words_to_transfer = buf_remaining / BYTES_PER_FIFO_WORD;
> >>
> >> - /* It's very common to have < 4 bytes, so optimize that case. */
> >> + /* it's very common to have < 4 bytes, so optimize that case */
> >> if (words_to_transfer) {
> >> if (words_to_transfer > tx_fifo_avail)
> >> words_to_transfer = tx_fifo_avail;
> >>
> >> /*
> >> - * Update state before writing to FIFO. If this casues us
> >> + * Update state before writing to FIFO. If this causes us
> >> * to finish writing all bytes (AKA buf_remaining goes to 0) we
> >> * have a potential for an interrupt (PACKET_XFER_COMPLETE is
> >> * not maskable). We need to make sure that the isr sees
> >> @@ -800,8 +799,8 @@ static int tegra_i2c_fill_tx_fifo(struct tegra_i2c_dev *i2c_dev)
> >> }
> >
> > Those first letters don't look consistently capitalized. :-)
>
> In my experience, the more common kernel style is a lowercase for
> single-line comments and the opposite for the multi-line comments.
> Hence, should be good. If you're meaning something else, then please
> clarify.

I don't have a strong opinion about this, but my preference is: If it's
a full sentence, make it look so.

Best Regards,
Michał Mirosław

\
 
 \ /
  Last update: 2020-09-06 00:59    [W:1.306 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site