Skip to content

Commit

Permalink
parisc: sba_iommu: Fix build warning if procfs if disabled
Browse files Browse the repository at this point in the history
[ Upstream commit 6428bc7 ]

Clean up the code, e.g. make proc_mckinley_root static, drop the now
empty mckinley header file and remove some unneeded ifdefs around procfs
functions.

Signed-off-by: Helge Deller <deller@gmx.de>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202308300800.Jod4sHzM-lkp@intel.com/
Fixes: 77e0ddf ("parisc: ccio-dma: Create private runway procfs root entry")
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
hdeller authored and gregkh committed Sep 19, 2023
1 parent 2bf2d2a commit ff4f59a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
8 changes: 0 additions & 8 deletions arch/parisc/include/asm/mckinley.h

This file was deleted.

10 changes: 2 additions & 8 deletions drivers/parisc/sba_iommu.c
Expand Up @@ -46,8 +46,6 @@
#include <linux/module.h>

#include <asm/ropes.h>
#include <asm/mckinley.h> /* for proc_mckinley_root */
#include <asm/runway.h> /* for proc_runway_root */
#include <asm/page.h> /* for PAGE0 */
#include <asm/pdc.h> /* for PDC_MODEL_* */
#include <asm/pdcpat.h> /* for is_pdc_pat() */
Expand Down Expand Up @@ -122,7 +120,7 @@ MODULE_PARM_DESC(sba_reserve_agpgart, "Reserve half of IO pdir as AGPGART");
#endif

static struct proc_dir_entry *proc_runway_root __ro_after_init;
struct proc_dir_entry *proc_mckinley_root __ro_after_init;
static struct proc_dir_entry *proc_mckinley_root __ro_after_init;

/************************************
** SBA register read and write support
Expand Down Expand Up @@ -1899,9 +1897,7 @@ static int __init sba_driver_callback(struct parisc_device *dev)
int i;
char *version;
void __iomem *sba_addr = ioremap(dev->hpa.start, SBA_FUNC_SIZE);
#ifdef CONFIG_PROC_FS
struct proc_dir_entry *root;
#endif
struct proc_dir_entry *root __maybe_unused;

sba_dump_ranges(sba_addr);

Expand Down Expand Up @@ -1967,7 +1963,6 @@ static int __init sba_driver_callback(struct parisc_device *dev)

hppa_dma_ops = &sba_ops;

#ifdef CONFIG_PROC_FS
switch (dev->id.hversion) {
case PLUTO_MCKINLEY_PORT:
if (!proc_mckinley_root)
Expand All @@ -1985,7 +1980,6 @@ static int __init sba_driver_callback(struct parisc_device *dev)

proc_create_single("sba_iommu", 0, root, sba_proc_info);
proc_create_single("sba_iommu-bitmap", 0, root, sba_proc_bitmap_info);
#endif
return 0;
}

Expand Down

0 comments on commit ff4f59a

Please sign in to comment.