lkml.org 
[lkml]   [2021]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 2/3] platform: surface: Add surface xbl
Date

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

\
 
 \ /
  Last update: 2021-10-29 06:49    [W:1.881 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site