linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Philippe Ombredanne <pombredanne@nexb.com>
To: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Andy Gross <andy.gross@linaro.org>,
	Ohad Ben-Cohen <ohad@wizery.com>,
	Arun Kumar Neelakantam <aneela@codeaurora.org>,
	Chris Lew <clew@codeaurora.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org,
	linux-remoteproc@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jonathan Corbet <corbet@lwn.net>
Subject: Re: [PATCH v4 2/5] soc: qcom: Introduce QMI helpers
Date: Fri, 1 Dec 2017 08:48:34 +0100	[thread overview]
Message-ID: <CAOFm3uH9D-SF2gpR6c_Eyz1q=4vYwD6SLf_RnBA9p9C=c-9c9g@mail.gmail.com> (raw)
In-Reply-To: <20171201053510.GZ28761@minitux>

On Fri, Dec 1, 2017 at 6:35 AM, Bjorn Andersson
<bjorn.andersson@linaro.org> wrote:
> On Thu 30 Nov 00:18 PST 2017, Philippe Ombredanne wrote:
>
>> Bjorn,
>>
>> On Thu, Nov 30, 2017 at 2:16 AM, Bjorn Andersson
>> <bjorn.andersson@linaro.org> wrote:
>> []
>> > diff --git a/drivers/soc/qcom/qmi_interface.c b/drivers/soc/qcom/qmi_interface.c
>> > new file mode 100644
>> > index 000000000000..4027b52b0834
>> > --- /dev/null
>> > +++ b/drivers/soc/qcom/qmi_interface.c
>> > @@ -0,0 +1,857 @@
>> > +/*
>> > + * Copyright (C) 2017 Linaro Ltd.
>> > + *
>> > + * This software is licensed under the terms of the GNU General Public
>> > + * License version 2, as published by the Free Software Foundation, and
>> > + * may be copied, distributed, and modified under those terms.
>> > + *
>> > + * This program is distributed in the hope that it will be useful,
>> > + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>> > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>> > + * GNU General Public License for more details.
>> > + */
>>
>> Could it make sense, especially for new files, to use the new SPDX ids
>> and avoid adding boilerplate that will need to be cleaned up later?
>> e.g. something like this instead, using the new conventions started by
>> greg-kh and by documented tglx?
>>
>> NB: the // comment  style is not a mistake and is what Linus wants
>> there. See the threads on this topic.
>>
>> > @@ -0,0 +1,857 @@
>> > +// SPDX-License-Identifier: GPL-2.0
>> > +/*
>> > + * Copyright (C) 2017 Linaro Ltd.
>> > + */
>>
>> Isn't this shorter and better? :P
>>
>
> That sounds very reasonable, I will update the patches.

Note that when you only have a copyright left in a header comment
after removing the boilerplate, you might want to consider this even
shorter and cleaner form instead. But that's just me telling this:

>> > +// SPDX-License-Identifier: GPL-2.0
>> > +// Copyright (C) 2017 Linaro Ltd.

>> BTW, if you need help to fix this on the rest of Linaro contributed
>> code, I maintain a tool that can help there.
>>
>
> I haven't seen any guidelines on how this should be introduced
> throughout the kernel,

Thomas has sent a first doc patch [1] set. AFAIK he is working on an
updated version whenever his real time body clock yields a few ticks
so he can wrap this out.  But his real time clock only rarely yield
ticks outside of hard real time coding work ;)

Jonathan also wrote a nice background article on the topic at LWN [2].

I heard this was also briefly discussed among maintainers at the
plumbers meetup in Los Angeles: for me I only briefly discussed this
with Linus and Greg just before the meetup, but I could not stay
longer.

> should I make a similar push for the subsystems I
> maintain?

That would be great! And beside the fact it always feels good to
delete lines of code for once, this is one of the rare areas where you
can kill some lines and be pretty sure it will still compile and run
afterwards .... well.... in most cases: Greg and Thomas found funny
cases of .h headers included in assembly where using the // comment
style was actually making things break weirdly and the compilation
would go down in flames with a beautiful tail spin : in these cases,
the convention is to use /**/ comments instead)

Again, if you need help with this, I can modestly chip in with my
scancode-toolkit tool and good intentions.

[1] https://marc.info/?l=linux-kernel&m=151051532322831&w=2
[2] https://lwn.net/SubscriberLink/739183/262749cbe307ddc7/
-- 
Cordially
Philippe Ombredanne, a happy licensing comments cleaner

  reply	other threads:[~2017-12-01  7:49 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-30  1:16 [PATCH v4 0/5] In-kernel QMI helpers and sysmon Bjorn Andersson
2017-11-30  1:16 ` [PATCH v4 1/5] soc: qcom: Introduce QMI encoder/decoder Bjorn Andersson
2017-11-30 17:17   ` Chris Lew
2017-12-01  9:10   ` Jitendra Sharma
2017-12-05 17:33     ` Bjorn Andersson
2017-11-30  1:16 ` [PATCH v4 2/5] soc: qcom: Introduce QMI helpers Bjorn Andersson
2017-11-30  8:18   ` Philippe Ombredanne
2017-12-01  5:35     ` Bjorn Andersson
2017-12-01  7:48       ` Philippe Ombredanne [this message]
2017-11-30 17:33   ` Chris Lew
2017-11-30  1:16 ` [PATCH v4 3/5] remoteproc: Pass type of shutdown to subdev remove Bjorn Andersson
2017-11-30 17:35   ` Chris Lew
2017-12-01 14:50   ` Arnaud Pouliquen
2017-12-05  6:46     ` Bjorn Andersson
2017-12-05 10:54       ` Arnaud Pouliquen
2017-12-05 17:17         ` Bjorn Andersson
2017-12-06  8:55           ` Arnaud Pouliquen
2017-12-06 21:53             ` Bjorn Andersson
2017-12-07 12:14               ` Arnaud Pouliquen
2017-11-30  1:16 ` [PATCH v4 4/5] remoteproc: qcom: Introduce sysmon Bjorn Andersson
2017-12-01  1:52   ` Chris Lew
2017-12-01  5:31     ` Bjorn Andersson
2017-11-30  1:16 ` [PATCH v4 5/5] samples: Introduce Qualcomm QMI sample client Bjorn Andersson
2017-11-30 17:36   ` Chris Lew

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='CAOFm3uH9D-SF2gpR6c_Eyz1q=4vYwD6SLf_RnBA9p9C=c-9c9g@mail.gmail.com' \
    --to=pombredanne@nexb.com \
    --cc=andy.gross@linaro.org \
    --cc=aneela@codeaurora.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=clew@codeaurora.org \
    --cc=corbet@lwn.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=linux-soc@vger.kernel.org \
    --cc=ohad@wizery.com \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).