From: Felipe Balbi <balbi@kernel.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Jarrett Schultz <jaschultzms@gmail.com>,
Rob Herring <robh+dt@kernel.org>, Andy Gross <agross@kernel.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Hans de Goede <hdegoede@redhat.com>,
Mark Gross <mgross@linux.intel.com>,
Maximilian Luz <luzmaximilian@gmail.com>,
"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
"platform-driver-x86@vger.kernel.org"
<platform-driver-x86@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Jarrett Schultz <jaschultz@microsoft.com>
Subject: Re: [PATCH 2/3] platform: surface: Add surface xbl
Date: Fri, 29 Oct 2021 07:45:28 +0300 [thread overview]
Message-ID: <87fsskqvvc.fsf@kernel.org> (raw)
In-Reply-To: <CAHp75Vfq7ZkXytuAFhGOMGuH7_AsXcYf9O=p30e4OUx+a4jMgw@mail.gmail.com>
Hi,
Andy Shevchenko <andy.shevchenko@gmail.com> writes:
> diff --git a/drivers/platform/surface/surface-xbl.c b/drivers/platform/surface/surface-xbl.c
> new file mode 100644
> index 000000000000..910287f0c987
> --- /dev/null
> +++ b/drivers/platform/surface/surface-xbl.c
> @@ -0,0 +1,223 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * surface-xbl.c - Surface E(x)tensible (B)oot(l)oader
> + *
>
> First of all, do not include filename in the file.
>
> Capital L will be better to read and understand the
> abbreviation. Actually usually we do something like this:
>
> Extensible Boot Loader (EBL)
nah, this is silly Andy. It's just capitalized as eXtensible Boot
Loader, very much akin to eXtensible Host Controller Interface.
> +static const struct attribute_group inputs_attr_group = {
> + .attrs = inputs_attrs,
> +};
> +
> +static u8 surface_xbl_readb(void __iomem *base, u32 offset)
> +{
> + return readb(base + offset);
> +}
> +
> +static u16 surface_xbl_readw(void __iomem *base, u32 offset)
> +{
> + return readw(base + offset);
> +}
>
> Either use corresponding io accessors in-line, or make first parameter
> to be sirface_xbl pointer. Otherwise these helpers useless.
I agree with passing surface_xbl point as first parameter, but calling
the accessors pointless is a bit much. At a minimum, they make it easier
to ftrace the entire driver by simply ftracing surface_xbl_*
--
balbi
next prev parent reply other threads:[~2021-10-29 4:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-28 21:17 [PATCH 0/3] platform: surface: Introduce Surface XBL Driver Jarrett Schultz
2021-10-28 21:17 ` [PATCH 1/3] dt-bindings: platform: microsoft: Document surface xbl Jarrett Schultz
2021-10-28 21:56 ` Rob Herring
2021-10-28 22:52 ` Bjorn Andersson
2021-10-28 21:17 ` [PATCH 2/3] platform: surface: Add " Jarrett Schultz
2021-10-28 22:43 ` Randy Dunlap
2021-10-28 23:12 ` Maximilian Luz
[not found] ` <CAHp75Vfq7ZkXytuAFhGOMGuH7_AsXcYf9O=p30e4OUx+a4jMgw@mail.gmail.com>
2021-10-29 4:45 ` Felipe Balbi [this message]
2021-10-29 8:57 ` Andy Shevchenko
2021-10-29 12:32 ` Felipe Balbi
2021-10-29 12:56 ` Andy Shevchenko
2021-10-29 13:12 ` Felipe Balbi
2021-10-29 15:02 ` Andy Shevchenko
2021-10-28 21:17 ` [PATCH 3/3] arm64: dts: qcom: surface-duo: " Jarrett Schultz
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=87fsskqvvc.fsf@kernel.org \
--to=balbi@kernel.org \
--cc=agross@kernel.org \
--cc=andy.shevchenko@gmail.com \
--cc=bjorn.andersson@linaro.org \
--cc=hdegoede@redhat.com \
--cc=jaschultz@microsoft.com \
--cc=jaschultzms@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luzmaximilian@gmail.com \
--cc=mgross@linux.intel.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=robh+dt@kernel.org \
/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