lkml.org 
[lkml]   [2020]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH V7 4/5] platform/x86: Intel PMT Telemetry capability driver
On Thu, Oct 1, 2020 at 4:43 AM David E. Box <david.e.box@linux.intel.com> wrote:
>
> From: Alexander Duyck <alexander.h.duyck@linux.intel.com>
>
> PMT Telemetry is a capability of the Intel Platform Monitoring Technology.
> The Telemetry capability provides access to device telemetry metrics that
> provide hardware performance data to users from read-only register spaces.
>
> With this driver present the intel_pmt directory can be populated with
> telem<x> devices. These devices will contain the standard intel_pmt sysfs
> data and a "telem" binary sysfs attribute which can be used to access the
> telemetry data.

...

> +static DEFINE_XARRAY_ALLOC(telem_array);
> +static struct intel_pmt_namespace pmt_telem_ns = {
> + .name = "telem",
> + .xa = &telem_array

Leave comma at the end.

> +};
> +
> +/*
> + * driver initialization
> + */

This is a useless comment.

> + size = offsetof(struct pmt_telem_priv, entry[pdev->num_resources]);
> + priv = devm_kzalloc(&pdev->dev, size, GFP_KERNEL);
> + if (!priv)
> + return -ENOMEM;

Please, use struct_size() from overflow.h instead of custom approach.

...

> +static struct platform_driver pmt_telem_driver = {
> + .driver = {
> + .name = TELEM_DEV_NAME,

I'm not sure I have interpreted this:
- Use 'raw' string instead of defines for device names
correctly. Can you elaborate?

> + },
> + .remove = pmt_telem_remove,
> + .probe = pmt_telem_probe,
> +};

...

> +MODULE_ALIAS("platform:" TELEM_DEV_NAME);

Ditto.

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2020-10-01 18:02    [W:0.097 / U:1.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site