diff mbox series

[01/15] cxl/core: Remove duplicate declaration of devm_cxl_iomap_block()

Message ID 20220831081603.3415-2-rrichter@amd.com
State Superseded
Headers show
Series cxl: Add support for Restricted CXL hosts (RCD mode) | expand

Commit Message

Robert Richter Aug. 31, 2022, 8:15 a.m. UTC
The function devm_cxl_iomap_block() is only used in the core
code. There are two declarations in header files of it, in
drivers/cxl/core/core.h and drivers/cxl/cxl.h. Remove its unused
declaration in drivers/cxl/cxl.h.

Signed-off-by: Robert Richter <rrichter@amd.com>
---
 drivers/cxl/cxl.h | 2 --
 1 file changed, 2 deletions(-)

Comments

Jonathan Cameron Aug. 31, 2022, 8:54 a.m. UTC | #1
On Wed, 31 Aug 2022 10:15:49 +0200
Robert Richter <rrichter@amd.com> wrote:

> The function devm_cxl_iomap_block() is only used in the core
> code. There are two declarations in header files of it, in
> drivers/cxl/core/core.h and drivers/cxl/cxl.h. Remove its unused
> declaration in drivers/cxl/cxl.h.
> 
> Signed-off-by: Robert Richter <rrichter@amd.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

The wonders of code evolution leaving signs behind ;)

> ---
>  drivers/cxl/cxl.h | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h
> index f680450f0b16..ac8998b627b5 100644
> --- a/drivers/cxl/cxl.h
> +++ b/drivers/cxl/cxl.h
> @@ -218,8 +218,6 @@ int cxl_map_device_regs(struct pci_dev *pdev,
>  enum cxl_regloc_type;
>  int cxl_find_regblock(struct pci_dev *pdev, enum cxl_regloc_type type,
>  		      struct cxl_register_map *map);
> -void __iomem *devm_cxl_iomap_block(struct device *dev, resource_size_t addr,
> -				   resource_size_t length);
>  
>  #define CXL_RESOURCE_NONE ((resource_size_t) -1)
>  #define CXL_TARGET_STRLEN 20
Robert Richter Sept. 1, 2022, 5:21 a.m. UTC | #2
Thanks Jonathan for reviewing this series.

On 31.08.22 09:54:58, Jonathan Cameron wrote:
> On Wed, 31 Aug 2022 10:15:49 +0200
> Robert Richter <rrichter@amd.com> wrote:
> 
> > The function devm_cxl_iomap_block() is only used in the core
> > code. There are two declarations in header files of it, in
> > drivers/cxl/core/core.h and drivers/cxl/cxl.h. Remove its unused
> > declaration in drivers/cxl/cxl.h.
> > 
> > Signed-off-by: Robert Richter <rrichter@amd.com>
> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

There is this 0day test bot warning and I will need to either extend
this patch or add another one to fix regs.c.

-Robert

> 
> The wonders of code evolution leaving signs behind ;)
> 
> > ---
> >  drivers/cxl/cxl.h | 2 --
> >  1 file changed, 2 deletions(-)
Davidlohr Bueso Sept. 7, 2022, 4:11 p.m. UTC | #3
On Wed, 31 Aug 2022, Robert Richter wrote:

>The function devm_cxl_iomap_block() is only used in the core
>code. There are two declarations in header files of it, in
>drivers/cxl/core/core.h and drivers/cxl/cxl.h. Remove its unused
>declaration in drivers/cxl/cxl.h.
>
>Signed-off-by: Robert Richter <rrichter@amd.com>
>Reported-by: kernel test robot <lkp@intel.com>
>Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>

Does this want a

Fixes: d17d0540a0d (cxl/core/hdm: Add CXL standard decoder enumeration to the core)

tag?

>---
> drivers/cxl/cxl.h | 2 --
> 1 file changed, 2 deletions(-)
>
>diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h
>index f680450f0b16..ac8998b627b5 100644
>--- a/drivers/cxl/cxl.h
>+++ b/drivers/cxl/cxl.h
>@@ -218,8 +218,6 @@ int cxl_map_device_regs(struct pci_dev *pdev,
> enum cxl_regloc_type;
> int cxl_find_regblock(struct pci_dev *pdev, enum cxl_regloc_type type,
>		      struct cxl_register_map *map);
>-void __iomem *devm_cxl_iomap_block(struct device *dev, resource_size_t addr,
>-				   resource_size_t length);
>
> #define CXL_RESOURCE_NONE ((resource_size_t) -1)
> #define CXL_TARGET_STRLEN 20
>
>--
>2.30.2
>
Dan Williams Sept. 8, 2022, 5:44 a.m. UTC | #4
Robert Richter wrote:
> The function devm_cxl_iomap_block() is only used in the core
> code. There are two declarations in header files of it, in
> drivers/cxl/core/core.h and drivers/cxl/cxl.h. Remove its unused
> declaration in drivers/cxl/cxl.h.
> 
> Signed-off-by: Robert Richter <rrichter@amd.com>

Looks good,

Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Robert Richter Sept. 8, 2022, 2:51 p.m. UTC | #5
On 07.09.22 22:44:01, Dan Williams wrote:
> Robert Richter wrote:
> > The function devm_cxl_iomap_block() is only used in the core
> > code. There are two declarations in header files of it, in
> > drivers/cxl/core/core.h and drivers/cxl/cxl.h. Remove its unused
> > declaration in drivers/cxl/cxl.h.
> > 
> > Signed-off-by: Robert Richter <rrichter@amd.com>
> 
> Looks good,
> 
> Reviewed-by: Dan Williams <dan.j.williams@intel.com>

Note there was a 0day build error. So I will add the inclusion of
"core.h" to core/regs.c to this patch. I hope that is ok.

Thanks,

-Robert
Dan Williams Sept. 8, 2022, 7:47 p.m. UTC | #6
Robert Richter wrote:
> On 07.09.22 22:44:01, Dan Williams wrote:
> > Robert Richter wrote:
> > > The function devm_cxl_iomap_block() is only used in the core
> > > code. There are two declarations in header files of it, in
> > > drivers/cxl/core/core.h and drivers/cxl/cxl.h. Remove its unused
> > > declaration in drivers/cxl/cxl.h.
> > > 
> > > Signed-off-by: Robert Richter <rrichter@amd.com>
> > 
> > Looks good,
> > 
> > Reviewed-by: Dan Williams <dan.j.williams@intel.com>
> 
> Note there was a 0day build error. So I will add the inclusion of
> "core.h" to core/regs.c to this patch. I hope that is ok.

Yes, for my Reviewed-by: small fixups that don't touch the core theme of
the patch are ok.
Robert Richter Sept. 9, 2022, 10:38 a.m. UTC | #7
On 07.09.22 09:11:58, Davidlohr Bueso wrote:
> On Wed, 31 Aug 2022, Robert Richter wrote:
> 
> > The function devm_cxl_iomap_block() is only used in the core
> > code. There are two declarations in header files of it, in
> > drivers/cxl/core/core.h and drivers/cxl/cxl.h. Remove its unused
> > declaration in drivers/cxl/cxl.h.
> > 
> > Signed-off-by: Robert Richter <rrichter@amd.com>
> > Reported-by: kernel test robot <lkp@intel.com>
> > Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>
> 
> Does this want a
> 
> Fixes: d17d0540a0d (cxl/core/hdm: Add CXL standard decoder enumeration to the core)
> 
> tag?

Looks like a code cleanup to me, nothing worth to backport to stable
which the fixes tag would trigger.

Thanks for review.

-Robert
diff mbox series

Patch

diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h
index f680450f0b16..ac8998b627b5 100644
--- a/drivers/cxl/cxl.h
+++ b/drivers/cxl/cxl.h
@@ -218,8 +218,6 @@  int cxl_map_device_regs(struct pci_dev *pdev,
 enum cxl_regloc_type;
 int cxl_find_regblock(struct pci_dev *pdev, enum cxl_regloc_type type,
 		      struct cxl_register_map *map);
-void __iomem *devm_cxl_iomap_block(struct device *dev, resource_size_t addr,
-				   resource_size_t length);
 
 #define CXL_RESOURCE_NONE ((resource_size_t) -1)
 #define CXL_TARGET_STRLEN 20