From: Randy Dunlap <rdunlap@infradead.org>
To: "Jacopo Mondi" <jacopo@jmondi.org>,
"Krzysztof Hałasa" <khalasa@piap.pl>,
"joe@perches.com" <joe@perches.com>
Cc: Sakari Ailus <sakari.ailus@iki.fi>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Subject: Re: [PATCH v5] Driver for ON Semi AR0521 camera sensor
Date: Sat, 9 Oct 2021 13:18:50 -0700 [thread overview]
Message-ID: <a8bd12e5-cdb5-ee85-d0a9-03ede990f5d2@infradead.org> (raw)
In-Reply-To: <20211009090749.hujuwamgkjw2tfcx@uno.localdomain>
On 10/9/21 2:07 AM, Jacopo Mondi wrote:
> Hi Krzysztof,
>
> I've been testing this driver in the last few days, thanks for your
> effort in upstreaming it!
>
> I'll separately comment on what I had to change to have it working for
> my use case, but let me continue the discussion from where it was left
> pending here to add my 2 cents.
>
> On Thu, Oct 07, 2021 at 11:11:09AM +0200, Krzysztof Hałasa wrote:
>> Hi Sakari,
>>
>> Thanks for your input.
>>
>>> Where's the corresponding DT binding patch? Ideally it would be part of the
>>> same set.
>>
>> Well I've sent it a moment before this one. Will make them a set next
>> time.
>>
>>>> +#define AR0521_WIDTH_BLANKING_MIN 572u
>>>> +#define AR0521_HEIGHT_BLANKING_MIN 28u // must be even
>>>
>>> Please use /* */ for comments. The SPDX tag is an exception.
>>
>> As far as I know, this is no longer the case, the C99 comments are now
>> permitted and maybe even encouraged. Or was I dreaming?
>>
>> checkpatch doesn't protest either.
>
> To my understanding the C99 standard added support for the //
> commenting style and tollerate them, but they're still from C++ and I
> see very few places where they're used in the kernel, and per as far I
> know they're still not allowed by the coding style
> https://www.kernel.org/doc/html/latest/process/coding-style.html#commenting
http://lkml.iu.edu/hypermail/linux/kernel/1607.1/00627.html
Maybe we should update coding-style then.
>
> Looking at how you used comments in the driver I think you could get
> rid of most // comments easily, the register tables might be an
> exception but I would really try to remove them from there as well.
>
>
>>
>>> Please wrap your lines at 80 or earlier, unless a sound reason exists to do
>>> otherwise.
>>
>> This limitation appears to be lifted as well, after all those years.
>> Is there a specific reason to still use it here? Yes, lines longer than
>> 80 chars make the code much more readable (for my eyes, at least).
>> Yes, I know there is some "soft" limit, and I trim lines when it makes
>> them better in my opinion.
>>
>
> In my personal opinion lifting that restriction caused more pain than
> anything, as different subsystem are now imposing different
> requirements. Here everything has been so far pretty strict about
> going over 80-cols, but I think there are situation where it makes
> sense in example
>
[snip]
>
> My suggestion is: aim to 80 cols whenever possible, if it forces you
> to do things like the above shown function declaration you can go a
> little over that
Yes, 80 max is still preferred. Up to 100 may be tolerable in some
cases.
> As reported here
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bdc48fa11e46f867ea4d75fa59ee87a7f48be144
> if you go over 100 you should ask yourself what are you doing :)
--
~Randy
next prev parent reply other threads:[~2021-10-09 20:19 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-05 12:05 Krzysztof Hałasa
2021-10-06 17:10 ` Sakari Ailus
2021-10-07 9:11 ` Krzysztof Hałasa
2021-10-09 9:07 ` Jacopo Mondi
2021-10-09 20:18 ` Randy Dunlap [this message]
2021-10-09 20:34 ` Sakari Ailus
2021-10-11 6:24 ` Krzysztof Hałasa
2021-10-11 6:20 ` Krzysztof Hałasa
2021-10-11 6:31 ` Laurent Pinchart
2021-10-12 7:52 ` Krzysztof Hałasa
2021-10-09 10:24 ` Jacopo Mondi
2021-10-11 12:19 ` Krzysztof Hałasa
2021-10-11 14:34 ` Jacopo Mondi
2021-10-11 22:22 ` Daniel Scally
2021-10-12 7:16 ` Jacopo Mondi
2021-10-12 12:24 ` Krzysztof Hałasa
2021-10-12 20:30 ` Sakari Ailus
2021-10-13 5:39 ` Krzysztof Hałasa
2021-10-20 18:43 ` Sakari Ailus
2021-10-22 6:42 ` Krzysztof Hałasa
2021-10-13 8:26 ` Jacopo Mondi
2021-10-13 12:55 ` Krzysztof Hałasa
2021-10-13 15:14 ` Jacopo Mondi
2021-10-14 5:43 ` Krzysztof Hałasa
2021-10-14 7:59 ` Jacopo Mondi
2021-10-14 10:43 ` Krzysztof Hałasa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a8bd12e5-cdb5-ee85-d0a9-03ede990f5d2@infradead.org \
--to=rdunlap@infradead.org \
--cc=jacopo@jmondi.org \
--cc=joe@perches.com \
--cc=khalasa@piap.pl \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®