Skip to content

Commit

Permalink
sparc32: fix sparse warnings in irq_32.c
Browse files Browse the repository at this point in the history
Fix following warnings:
irq_32.c:239:5: warning: symbol 'sparc_floppy_request_irq' was not declared. Should it be static?
irq_32.c:294:24: warning: symbol 'fdc_status' was not declared. Should it be static?
irq_32.c:297:6: warning: symbol 'pdma_vaddr' was not declared. Should it be static?
irq_32.c:300:15: warning: symbol 'pdma_size' was not declared. Should it be static?
irq_32.c:303:14: warning: symbol 'doing_pdma' was not declared. Should it be static?
irq_32.c:306:6: warning: symbol 'pdma_base' was not declared. Should it be static?
irq_32.c:309:15: warning: symbol 'pdma_areasize' was not declared. Should it be static?
irq_32.c:317:6: warning: symbol 'sparc_floppy_irq' was not declared. Should it be static?

The floppy parts were all added to iasm/setup.h - no other header files looked obvious.
floppy_32.h was not an option as this file can only be included once from the
floppy driver.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sam Ravnborg authored and David S. Miller committed Apr 29, 2014
1 parent 5ac7568 commit fbb8638
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
11 changes: 2 additions & 9 deletions arch/sparc/include/asm/floppy_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
#include <linux/of.h>
#include <linux/of_device.h>

#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/idprom.h>
#include <asm/oplib.h>
#include <asm/auxio.h>
#include <asm/setup.h>
#include <asm/page.h>
#include <asm/irq.h>

/* We don't need no stinkin' I/O port allocation crap. */
Expand Down Expand Up @@ -49,7 +50,6 @@ struct sun_flpy_controller {

/* You'll only ever find one controller on a SparcStation anyways. */
static struct sun_flpy_controller *sun_fdc = NULL;
extern volatile unsigned char *fdc_status;

struct sun_floppy_ops {
unsigned char (*fd_inb)(int port);
Expand Down Expand Up @@ -212,13 +212,6 @@ static void sun_82077_fd_outb(unsigned char value, int port)
* underruns. If non-zero, doing_pdma encodes the direction of
* the transfer for debugging. 1=read 2=write
*/
extern char *pdma_vaddr;
extern unsigned long pdma_size;
extern volatile int doing_pdma;

/* This is software state */
extern char *pdma_base;
extern unsigned long pdma_areasize;

/* Common routines to all controller types on the Sparc. */
static inline void virtual_dma_init(void)
Expand Down
16 changes: 15 additions & 1 deletion arch/sparc/include/asm/setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
#ifndef _SPARC_SETUP_H
#define _SPARC_SETUP_H

#include <uapi/asm/setup.h>
#include <linux/interrupt.h>

#include <uapi/asm/setup.h>

extern char reboot_command[];

Expand All @@ -22,6 +23,19 @@ static inline int con_is_present(void)
{
return serial_console ? 0 : 1;
}

/* from irq_32.c */
extern volatile unsigned char *fdc_status;
extern char *pdma_vaddr;
extern unsigned long pdma_size;
extern volatile int doing_pdma;

/* This is software state */
extern char *pdma_base;
extern unsigned long pdma_areasize;

int sparc_floppy_request_irq(unsigned int irq, irq_handler_t irq_handler);

#endif

extern void sun_do_break(void);
Expand Down
3 changes: 3 additions & 0 deletions arch/sparc/kernel/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ void handler_irq(unsigned int pil, struct pt_regs *regs);

unsigned long leon_get_irqmask(unsigned int irq);

/* irq_32.c */
void sparc_floppy_irq(int irq, void *dev_id, struct pt_regs *regs);

/* sun4m_irq.c */
void sun4m_nmi(struct pt_regs *regs);

Expand Down
1 change: 1 addition & 0 deletions arch/sparc/kernel/irq_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include <asm/cacheflush.h>
#include <asm/cpudata.h>
#include <asm/setup.h>
#include <asm/pcic.h>
#include <asm/leon.h>

Expand Down

0 comments on commit fbb8638

Please sign in to comment.