sparc32: fix sparse warnings in leon_pci_grpci2.c

Fix following warnings:
leon_pci_grpci2.c:218:1: warning: symbol 'grpci2_dev_lock' was not declared. Should it be static?
leon_pci_grpci2.c:219:20: warning: symbol 'grpci2priv' was not declared. Should it be static?
leon_pci_grpci2.c:221:5: warning: symbol 'grpci2_map_irq' was not declared. Should it be static?
leon_pci_grpci2.c:564:6: warning: symbol 'grpci2_hw_init' was not declared. Should it be
static?

+ a lot of these:
leon_pci_grpci2.c:252:9: warning: incorrect type in argument 1 (different address spaces)

Declare the symbols static as they are only used in this file.
Added missing __iomem annotations.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Daniel Hellstrom <daniel@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Sam Ravnborg 2014-04-21 21:39:34 +02:00 коммит произвёл David S. Miller
Родитель d65f0cd375
Коммит 3731e19910
1 изменённых файлов: 9 добавлений и 9 удалений

Просмотреть файл

@ -191,7 +191,7 @@ struct grpci2_cap_first {
struct grpci2_priv { struct grpci2_priv {
struct leon_pci_info info; /* must be on top of this structure */ struct leon_pci_info info; /* must be on top of this structure */
struct grpci2_regs *regs; struct grpci2_regs __iomem *regs;
char irq; char irq;
char irq_mode; /* IRQ Mode from CAPSTS REG */ char irq_mode; /* IRQ Mode from CAPSTS REG */
char bt_enabled; char bt_enabled;
@ -215,10 +215,10 @@ struct grpci2_priv {
struct grpci2_barcfg tgtbars[6]; struct grpci2_barcfg tgtbars[6];
}; };
DEFINE_SPINLOCK(grpci2_dev_lock); static DEFINE_SPINLOCK(grpci2_dev_lock);
struct grpci2_priv *grpci2priv; static struct grpci2_priv *grpci2priv;
int grpci2_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) static int grpci2_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{ {
struct grpci2_priv *priv = dev->bus->sysdata; struct grpci2_priv *priv = dev->bus->sysdata;
int irq_group; int irq_group;
@ -561,10 +561,10 @@ out:
return virq; return virq;
} }
void grpci2_hw_init(struct grpci2_priv *priv) static void grpci2_hw_init(struct grpci2_priv *priv)
{ {
u32 ahbadr, pciadr, bar_sz, capptr, io_map, data; u32 ahbadr, pciadr, bar_sz, capptr, io_map, data;
struct grpci2_regs *regs = priv->regs; struct grpci2_regs __iomem *regs = priv->regs;
int i; int i;
struct grpci2_barcfg *barcfg = priv->tgtbars; struct grpci2_barcfg *barcfg = priv->tgtbars;
@ -655,7 +655,7 @@ static irqreturn_t grpci2_jump_interrupt(int irq, void *arg)
static irqreturn_t grpci2_err_interrupt(int irq, void *arg) static irqreturn_t grpci2_err_interrupt(int irq, void *arg)
{ {
struct grpci2_priv *priv = arg; struct grpci2_priv *priv = arg;
struct grpci2_regs *regs = priv->regs; struct grpci2_regs __iomem *regs = priv->regs;
unsigned int status; unsigned int status;
status = REGLOAD(regs->sts_cap); status = REGLOAD(regs->sts_cap);
@ -682,7 +682,7 @@ static irqreturn_t grpci2_err_interrupt(int irq, void *arg)
static int grpci2_of_probe(struct platform_device *ofdev) static int grpci2_of_probe(struct platform_device *ofdev)
{ {
struct grpci2_regs *regs; struct grpci2_regs __iomem *regs;
struct grpci2_priv *priv; struct grpci2_priv *priv;
int err, i, len; int err, i, len;
const int *tmp; const int *tmp;
@ -878,7 +878,7 @@ err4:
release_resource(&priv->info.mem_space); release_resource(&priv->info.mem_space);
err3: err3:
err = -ENOMEM; err = -ENOMEM;
iounmap((void *)priv->pci_io_va); iounmap((void __iomem *)priv->pci_io_va);
err2: err2:
kfree(priv); kfree(priv);
err1: err1: