[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250103120744.00006abc@huawei.com>
Date: Fri, 3 Jan 2025 12:07:44 +0000
From: Jonathan Cameron <Jonathan.Cameron@...wei.com>
To: Neeraj Kumar <s.neeraj@...sung.com>
CC: <linux-cxl@...r.kernel.org>, <linux-mm@...ck.org>,
<linux-perf-users@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linuxarm@...wei.com>, <tongtiangen@...wei.com>, Yicong Yang
<yangyicong@...wei.com>, Niyas Sait <niyas.sait@...wei.com>,
<ajayjoshi@...ron.com>, Vandana Salve <vsalve@...ron.com>, Davidlohr Bueso
<dave@...olabs.net>, Dave Jiang <dave.jiang@...el.com>, Alison Schofield
<alison.schofield@...el.com>, Ira Weiny <ira.weiny@...el.com>, Dan Williams
<dan.j.williams@...el.com>, Alexander Shishkin
<alexander.shishkin@...ux.intel.com>, Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>, "Arnaldo Carvalho de Melo" <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>, Gregory Price <gourry@...rry.net>, Huang
Ying <ying.huang@...el.com>, Vishak G <vishak.g@...sung.com>, Krishna Kanth
Reddy <krish.reddy@...sung.com>, "Alok Rathore" <alok.rathore@...sung.com>,
<gost.dev@...sung.com>
Subject: Re: [RFC PATCH 1/4] cxl: Register devices for CXL Hotness
Monitoring Units (CHMU)
> >diff --git a/drivers/cxl/hmu.h b/drivers/cxl/hmu.h
> >new file mode 100644
> >index 000000000000..c4798ed9764b
> >--- /dev/null
> >+++ b/drivers/cxl/hmu.h
> >@@ -0,0 +1,23 @@
> >+/* SPDX-License-Identifier: GPL-2.0-only */
> >+/*
> >+ * Copyright(c) 2024 Huawei
> >+ * CXL Specification rev 3.2 Setion 8.2.8 (CHMU Register Interface)
> >+ */
> >+#ifndef CXL_HMU_H
> >+#define CXL_HMU_H
> >+#include <linux/device.h>
>
> No compilation errors even by removing this header.
> I think this inclusion is not required.
> Also found similar include at drivers/cxl/pmu.h
Kernel generally follows include what you use principles to avoid
future issues due to reorganization of headers etc.
Here struct device definition is needed below so this header should be
included. If there are other cases that do not do this, they should
be fixed (there are ongoing efforts to clean this up btw by adding the
missing includes).
>
> >+
> >+#define CXL_HMU_REGMAP_SIZE 0xe00 /* Table 8-32 CXL 3.0 specification */
>
> Above Macro CXL_HMU_REGMAP_SIZE is not used, So we should remove it.
> Its comment is also not appropriate
Not sure on the comment being in appropriate but sure this define can
go away (and the comment with it).
Thanks for taking a look.
Jonathan
Powered by blists - more mailing lists