Rectify typing error while including the guard for the header
file xdi_msg.h so that proper guard is wrapped around the file
to prevent it from being included more than once.
Signed-off-by: Rashika Kheria <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
---
drivers/isdn/hardware/eicon/xdi_msg.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/isdn/hardware/eicon/xdi_msg.h b/drivers/isdn/hardware/eicon/xdi_msg.h
index 58368f7..2498c34 100644
--- a/drivers/isdn/hardware/eicon/xdi_msg.h
+++ b/drivers/isdn/hardware/eicon/xdi_msg.h
@@ -1,6 +1,6 @@
/* $Id: xdi_msg.h,v 1.1.2.2 2001/02/16 08:40:36 armin Exp $ */
-#ifndef __DIVA_XDI_UM_CFG_MESSSGE_H__
+#ifndef __DIVA_XDI_UM_CFG_MESSAGE_H__
#define __DIVA_XDI_UM_CFG_MESSAGE_H__
/*
--
1.7.9.5
Move prototype declaration of functions to header file
hardware/eicon/um_idi.h because they are used by more than one file.
This eliminates the following warnings in hardware/eicon/divasi.c:
drivers/isdn/hardware/eicon/divasi.c:446:6: warning: no previous prototype for ‘diva_os_wakeup_read’ [-Wmissing-prototypes]
drivers/isdn/hardware/eicon/divasi.c:453:6: warning: no previous prototype for ‘diva_os_wakeup_close’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
---
drivers/isdn/hardware/eicon/um_idi.c | 5 -----
drivers/isdn/hardware/eicon/um_idi.h | 2 ++
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/isdn/hardware/eicon/um_idi.c b/drivers/isdn/hardware/eicon/um_idi.c
index e151971..676663a 100644
--- a/drivers/isdn/hardware/eicon/um_idi.c
+++ b/drivers/isdn/hardware/eicon/um_idi.c
@@ -14,11 +14,6 @@
#define DIVAS_MAX_XDI_ADAPTERS 64
/* --------------------------------------------------------------------------
- IMPORTS
- -------------------------------------------------------------------------- */
-extern void diva_os_wakeup_read(void *os_context);
-extern void diva_os_wakeup_close(void *os_context);
-/* --------------------------------------------------------------------------
LOCALS
-------------------------------------------------------------------------- */
static LIST_HEAD(adapter_q);
diff --git a/drivers/isdn/hardware/eicon/um_idi.h b/drivers/isdn/hardware/eicon/um_idi.h
index ffb88f7..00ca1e7 100644
--- a/drivers/isdn/hardware/eicon/um_idi.h
+++ b/drivers/isdn/hardware/eicon/um_idi.h
@@ -34,6 +34,8 @@ int diva_um_idi_write(void *entity,
int diva_user_mode_idi_ind_ready(void *entity, void *os_handle);
void *diva_um_id_get_os_context(void *entity);
int diva_os_get_context_size(void);
+void diva_os_wakeup_read(void *os_context);
+void diva_os_wakeup_close(void *os_context);
int divas_um_idi_entity_assigned(void *entity);
int divas_um_idi_entity_start_remove(void *entity);
--
1.7.9.5
Move prototype declaration of functions to header file
hardware/eicon/um_idi.h because they are used by more than one file.
This eliminates the following warnings in hardware/eicon/divasi.c:
drivers/isdn/hardware/eicon/divasi.c:446:6: warning: no previous prototype for ‘diva_os_wakeup_read’ [-Wmissing-prototypes]
drivers/isdn/hardware/eicon/divasi.c:453:6: warning: no previous prototype for ‘diva_os_wakeup_close’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
---
drivers/isdn/hardware/eicon/idifunc.c | 2 --
drivers/isdn/hardware/eicon/um_idi.h | 2 ++
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/isdn/hardware/eicon/idifunc.c b/drivers/isdn/hardware/eicon/idifunc.c
index fef6586..bacab74 100644
--- a/drivers/isdn/hardware/eicon/idifunc.c
+++ b/drivers/isdn/hardware/eicon/idifunc.c
@@ -22,8 +22,6 @@
extern char *DRIVERRELEASE_IDI;
extern void DIVA_DIDD_Read(void *, int);
-extern int diva_user_mode_idi_create_adapter(const DESCRIPTOR *, int);
-extern void diva_user_mode_idi_remove_adapter(int);
static dword notify_handle;
static DESCRIPTOR DAdapter;
diff --git a/drivers/isdn/hardware/eicon/um_idi.h b/drivers/isdn/hardware/eicon/um_idi.h
index 00ca1e7..e973809 100644
--- a/drivers/isdn/hardware/eicon/um_idi.h
+++ b/drivers/isdn/hardware/eicon/um_idi.h
@@ -41,5 +41,7 @@ int divas_um_idi_entity_start_remove(void *entity);
void diva_um_idi_start_wdog(void *entity);
void diva_um_idi_stop_wdog(void *entity);
+void diva_user_mode_idi_remove_adapter(int);
+int diva_user_mode_idi_create_adapter(const DESCRIPTOR *, int);
#endif
--
1.7.9.5
Move prototype declarations of function to header file
hardware/eicon/um_idi.h because they are used by more than one file.
This eliminates the following warnings in hardware/eicon/um_idi.c:
drivers/isdn/hardware/eicon/um_idi.c:83:6: warning: no previous prototype for ‘diva_user_mode_idi_remove_adapter’ [-Wmissing-prototypes]
drivers/isdn/hardware/eicon/um_idi.c:121:5: warning: no previous prototype for ‘diva_user_mode_idi_create_adapter’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
---
drivers/isdn/hardware/eicon/capifunc.c | 1 -
drivers/isdn/hardware/eicon/platform.h | 4 ++++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/isdn/hardware/eicon/capifunc.c b/drivers/isdn/hardware/eicon/capifunc.c
index 7a0bdbd..8991b0c 100644
--- a/drivers/isdn/hardware/eicon/capifunc.c
+++ b/drivers/isdn/hardware/eicon/capifunc.c
@@ -55,7 +55,6 @@ static void diva_release_appl(struct capi_ctr *, __u16);
static char *diva_procinfo(struct capi_ctr *);
static u16 diva_send_message(struct capi_ctr *,
diva_os_message_buffer_s *);
-extern void diva_os_set_controller_struct(struct capi_ctr *);
extern void DIVA_DIDD_Read(DESCRIPTOR *, int);
diff --git a/drivers/isdn/hardware/eicon/platform.h b/drivers/isdn/hardware/eicon/platform.h
index b2edb75..cdfbb19 100644
--- a/drivers/isdn/hardware/eicon/platform.h
+++ b/drivers/isdn/hardware/eicon/platform.h
@@ -28,6 +28,7 @@
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/list.h>
+#include <linux/isdn/capilli.h>
#include <asm/types.h>
#include <asm/io.h>
@@ -179,6 +180,9 @@ static __inline__ void diva_os_free(unsigned long flags, void *ptr)
typedef struct sk_buff diva_os_message_buffer_s;
diva_os_message_buffer_s *diva_os_alloc_message_buffer(unsigned long size, void **data_buf);
void diva_os_free_message_buffer(diva_os_message_buffer_s *dmb);
+
+void diva_os_set_controller_struct(struct capi_ctr *);
+
#define DIVA_MESSAGE_BUFFER_LEN(x) x->len
#define DIVA_MESSAGE_BUFFER_DATA(x) x->data
--
1.7.9.5
Move prototype declaration of functions to header file
hardware/eicon/capifunc.h because they are used by more than one file.
This eliminates the following warnings in hardware/eicon/capifunc.c:
drivers/isdn/hardware/eicon/capifunc.c:113:6: warning: no previous prototype for ‘MapController’ [-Wmissing-prototypes]
drivers/isdn/hardware/eicon/capifunc.c:188:7: warning: no previous prototype for ‘TransmitBufferSet’ [-Wmissing-prototypes]
drivers/isdn/hardware/eicon/capifunc.c:195:7: warning: no previous prototype for ‘TransmitBufferGet’ [-Wmissing-prototypes]
drivers/isdn/hardware/eicon/capifunc.c:203:6: warning: no previous prototype for ‘TransmitBufferFree’ [-Wmissing-prototypes]
drivers/isdn/hardware/eicon/capifunc.c:209:7: warning: no previous prototype for ‘ReceiveBufferGet’ [-Wmissing-prototypes]
drivers/isdn/hardware/eicon/capifunc.c:217:6: warning: no previous prototype for ‘api_remove_complete’ [-Wmissing-prototypes]
drivers/isdn/hardware/eicon/capifunc.c:225:6: warning: no previous prototype for ‘sendf’ [-Wmissing-prototypes]
drivers/isdn/hardware/eicon/capifunc.c:1115:5: warning: no previous prototype for ‘fax_head_line_time’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
---
drivers/isdn/hardware/eicon/capifunc.h | 8 ++++++++
drivers/isdn/hardware/eicon/message.c | 12 +-----------
2 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/drivers/isdn/hardware/eicon/capifunc.h b/drivers/isdn/hardware/eicon/capifunc.h
index e96c45b..fb7091e 100644
--- a/drivers/isdn/hardware/eicon/capifunc.h
+++ b/drivers/isdn/hardware/eicon/capifunc.h
@@ -36,5 +36,13 @@ typedef struct _diva_card {
*/
int init_capifunc(void);
void finit_capifunc(void);
+byte MapController(byte);
+void *TransmitBufferSet(APPL *appl, dword ref);
+void *TransmitBufferGet(APPL *appl, void *p);
+void TransmitBufferFree(APPL *appl, void *p);
+void *ReceiveBufferGet(APPL *appl, int Num);
+void api_remove_complete(void);
+void sendf(APPL *, word, dword, word, byte *, ...);
+int fax_head_line_time(char *buffer);
#endif /* __CAPIFUNC_H__ */
diff --git a/drivers/isdn/hardware/eicon/message.c b/drivers/isdn/hardware/eicon/message.c
index a82e542..062cb7b 100644
--- a/drivers/isdn/hardware/eicon/message.c
+++ b/drivers/isdn/hardware/eicon/message.c
@@ -32,6 +32,7 @@
#include "pc.h"
#include "capi20.h"
#include "divacapi.h"
+#include "capifunc.h"
#include "mdm_msg.h"
#include "divasync.h"
@@ -84,7 +85,6 @@ static void api_save_msg(API_PARSE *in, byte *format, API_SAVE *out);
static void api_load_msg(API_SAVE *in, API_PARSE *out);
word api_remove_start(void);
-void api_remove_complete(void);
static void plci_remove(PLCI *);
static void diva_get_extended_adapter_features(DIVA_CAPI_ADAPTER *a);
@@ -224,20 +224,10 @@ static void diva_free_dma_descriptor(PLCI *plci, int nr);
/* external function prototypes */
/*------------------------------------------------------------------*/
-extern byte MapController(byte);
extern byte UnMapController(byte);
#define MapId(Id)(((Id) & 0xffffff00L) | MapController((byte)(Id)))
#define UnMapId(Id)(((Id) & 0xffffff00L) | UnMapController((byte)(Id)))
-void sendf(APPL *, word, dword, word, byte *, ...);
-void *TransmitBufferSet(APPL *appl, dword ref);
-void *TransmitBufferGet(APPL *appl, void *p);
-void TransmitBufferFree(APPL *appl, void *p);
-void *ReceiveBufferGet(APPL *appl, int Num);
-
-int fax_head_line_time(char *buffer);
-
-
/*------------------------------------------------------------------*/
/* Global data definitions */
/*------------------------------------------------------------------*/
--
1.7.9.5
Move prototype declarations of function to header file
hardware/eicon/capifunc.h because they are used by more than one file.
Also, remove prototype declaration of the same function from
hardware/eicon/capifunc.c.
Signed-off-by: Rashika Kheria <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
---
drivers/isdn/hardware/eicon/capifunc.c | 1 -
drivers/isdn/hardware/eicon/capifunc.h | 1 +
drivers/isdn/hardware/eicon/message.c | 1 -
3 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/isdn/hardware/eicon/capifunc.c b/drivers/isdn/hardware/eicon/capifunc.c
index 8991b0c..639d70f 100644
--- a/drivers/isdn/hardware/eicon/capifunc.c
+++ b/drivers/isdn/hardware/eicon/capifunc.c
@@ -28,7 +28,6 @@ byte max_appl = MAX_APPL;
byte max_adapter = 0;
static CAPI_MSG *mapped_msg = (CAPI_MSG *) NULL;
-byte UnMapController(byte);
char DRIVERRELEASE_CAPI[32];
extern void AutomaticLaw(DIVA_CAPI_ADAPTER *);
diff --git a/drivers/isdn/hardware/eicon/capifunc.h b/drivers/isdn/hardware/eicon/capifunc.h
index fb7091e..56dbde1 100644
--- a/drivers/isdn/hardware/eicon/capifunc.h
+++ b/drivers/isdn/hardware/eicon/capifunc.h
@@ -37,6 +37,7 @@ typedef struct _diva_card {
int init_capifunc(void);
void finit_capifunc(void);
byte MapController(byte);
+byte UnMapController(byte);
void *TransmitBufferSet(APPL *appl, dword ref);
void *TransmitBufferGet(APPL *appl, void *p);
void TransmitBufferFree(APPL *appl, void *p);
diff --git a/drivers/isdn/hardware/eicon/message.c b/drivers/isdn/hardware/eicon/message.c
index 062cb7b..cd9fca1 100644
--- a/drivers/isdn/hardware/eicon/message.c
+++ b/drivers/isdn/hardware/eicon/message.c
@@ -224,7 +224,6 @@ static void diva_free_dma_descriptor(PLCI *plci, int nr);
/* external function prototypes */
/*------------------------------------------------------------------*/
-extern byte UnMapController(byte);
#define MapId(Id)(((Id) & 0xffffff00L) | MapController((byte)(Id)))
#define UnMapId(Id)(((Id) & 0xffffff00L) | UnMapController((byte)(Id)))
--
1.7.9.5
Move prototype declarations of functions to header file
hardware/eicon/platform.h because they are used by more than one file.
This eliminates the following warnings in hardware/eicon/divasfunc.c:
drivers/isdn/hardware/eicon/divasfunc.c:49:6: warning: no previous prototype for ‘diva_get_vserial_number’ [-Wmissing-prototypes]
drivers/isdn/hardware/eicon/divasfunc.c:212:12: warning: no previous prototype for ‘divasfunc_init’ [-Wmissing-prototypes]
drivers/isdn/hardware/eicon/divasfunc.c:233:6: warning: no previous prototype for ‘divasfunc_exit’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
---
drivers/isdn/hardware/eicon/divasmain.c | 3 ---
drivers/isdn/hardware/eicon/divasproc.c | 1 -
drivers/isdn/hardware/eicon/platform.h | 4 ++++
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/isdn/hardware/eicon/divasmain.c b/drivers/isdn/hardware/eicon/divasmain.c
index a2e0ed6..83a788f 100644
--- a/drivers/isdn/hardware/eicon/divasmain.c
+++ b/drivers/isdn/hardware/eicon/divasmain.c
@@ -58,9 +58,6 @@ char *DRIVERRELEASE_DIVAS = "2.0";
extern irqreturn_t diva_os_irq_wrapper(int irq, void *context);
extern int create_divas_proc(void);
extern void remove_divas_proc(void);
-extern void diva_get_vserial_number(PISDN_ADAPTER IoAdapter, char *buf);
-extern int divasfunc_init(int dbgmask);
-extern void divasfunc_exit(void);
typedef struct _diva_os_thread_dpc {
struct tasklet_struct divas_task;
diff --git a/drivers/isdn/hardware/eicon/divasproc.c b/drivers/isdn/hardware/eicon/divasproc.c
index edb7f39..9161393 100644
--- a/drivers/isdn/hardware/eicon/divasproc.c
+++ b/drivers/isdn/hardware/eicon/divasproc.c
@@ -34,7 +34,6 @@
extern PISDN_ADAPTER IoAdapters[MAX_ADAPTER];
-extern void diva_get_vserial_number(PISDN_ADAPTER IoAdapter, char *buf);
/*********************************************************
** Functions for /proc interface / File operations
diff --git a/drivers/isdn/hardware/eicon/platform.h b/drivers/isdn/hardware/eicon/platform.h
index e861857..ef329e0 100644
--- a/drivers/isdn/hardware/eicon/platform.h
+++ b/drivers/isdn/hardware/eicon/platform.h
@@ -158,6 +158,10 @@ void divas_get_version(char *);
void diva_xdi_didd_register_adapter(int card);
void diva_xdi_didd_remove_adapter(int card);
+void diva_get_vserial_number(PISDN_ADAPTER IoAdapter, char *buf);
+int divasfunc_init(int dbgmask);
+void divasfunc_exit(void);
+
/*
** memory allocation
*/
--
1.7.9.5
Include appropriate header file helpers.h in hardware/eicon/diva.c
because it defines function declared in the header file.
This eliminates the following warning in hardware/eicon/diva.c:
drivers/isdn/hardware/eicon/diva.c:655:6: warning: no previous prototype for ‘xdiFreeFile’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
---
drivers/isdn/hardware/eicon/diva.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/isdn/hardware/eicon/diva.c b/drivers/isdn/hardware/eicon/diva.c
index d91dd58..6f28797 100644
--- a/drivers/isdn/hardware/eicon/diva.c
+++ b/drivers/isdn/hardware/eicon/diva.c
@@ -17,6 +17,7 @@
#include "xdi_adapter.h"
#include "diva_pci.h"
#include "diva.h"
+#include "helpers.h"
#ifdef CONFIG_ISDN_DIVAS_PRIPCI
#include "os_pri.h"
--
1.7.9.5
Move prototype declarations of functions to header file
hardware/eicon/diva.h because they are used by more than one file. Also,
include appropriate header files while adding the prototypes.
This eliminates the following warnings in hardware/eicon/diva.c:
drivers/isdn/hardware/eicon/diva.c:516:13: warning: no previous prototype for ‘diva_os_irq_wrapper’ [-Wmissing-prototypes]
drivers/isdn/hardware/eicon/diva.c:570:6: warning: no previous prototype for ‘diva_xdi_display_adapter_features’ [-Wmissing-prototypes]
drivers/isdn/hardware/eicon/diva.c:606:6: warning: no previous prototype for ‘diva_add_slave_adapter’ [-Wmissing-prototypes]
drivers/isdn/hardware/eicon/diva.c:615:5: warning: no previous prototype for ‘diva_card_read_xlog’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
---
drivers/isdn/hardware/eicon/diva.h | 6 ++++++
drivers/isdn/hardware/eicon/divasmain.c | 3 +--
drivers/isdn/hardware/eicon/os_4bri.c | 5 +----
drivers/isdn/hardware/eicon/os_bri.c | 3 +--
drivers/isdn/hardware/eicon/os_pri.c | 3 +--
5 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/isdn/hardware/eicon/diva.h b/drivers/isdn/hardware/eicon/diva.h
index e979085..b2c070c 100644
--- a/drivers/isdn/hardware/eicon/diva.h
+++ b/drivers/isdn/hardware/eicon/diva.h
@@ -3,6 +3,8 @@
#ifndef __DIVA_XDI_OS_PART_H__
#define __DIVA_XDI_OS_PART_H__
+#include "xdi_msg.h"
+#include "xdi_adapter.h"
int divasa_xdi_driver_entry(void);
void divasa_xdi_driver_unload(void);
@@ -27,5 +29,9 @@ void *diva_xdi_open_adapter(void *os_handle, const void __user *src,
void diva_xdi_close_adapter(void *adapter, void *os_handle);
+irqreturn_t diva_os_irq_wrapper(int irq, void *context);
+void diva_xdi_display_adapter_features(int card);
+void diva_add_slave_adapter(diva_os_xdi_adapter_t *a);
+int diva_card_read_xlog(diva_os_xdi_adapter_t *a);
#endif
diff --git a/drivers/isdn/hardware/eicon/divasmain.c b/drivers/isdn/hardware/eicon/divasmain.c
index 83a788f..6b15670 100644
--- a/drivers/isdn/hardware/eicon/divasmain.c
+++ b/drivers/isdn/hardware/eicon/divasmain.c
@@ -27,7 +27,6 @@
#include "pc.h"
#include "di_defs.h"
#include "divasync.h"
-#include "diva.h"
#include "di.h"
#include "io.h"
#include "xdi_msg.h"
@@ -35,6 +34,7 @@
#include "xdi_vers.h"
#include "diva_dma.h"
#include "diva_pci.h"
+#include "diva.h"
static char *main_revision = "$Revision: 1.55.4.6 $";
@@ -55,7 +55,6 @@ static char *DRIVERLNAME = "divas";
static char *DEVNAME = "Divas";
char *DRIVERRELEASE_DIVAS = "2.0";
-extern irqreturn_t diva_os_irq_wrapper(int irq, void *context);
extern int create_divas_proc(void);
extern void remove_divas_proc(void);
diff --git a/drivers/isdn/hardware/eicon/os_4bri.c b/drivers/isdn/hardware/eicon/os_4bri.c
index 1891246..54f7033 100644
--- a/drivers/isdn/hardware/eicon/os_4bri.c
+++ b/drivers/isdn/hardware/eicon/os_4bri.c
@@ -17,6 +17,7 @@
#include "mi_pc.h"
#include "dsrv4bri.h"
#include "helpers.h"
+#include "diva.h"
static void *diva_xdiLoadFileFile = NULL;
static dword diva_xdiLoadFileLength = 0;
@@ -26,14 +27,10 @@ static dword diva_xdiLoadFileLength = 0;
*/
extern void prepare_qBri_functions(PISDN_ADAPTER IoAdapter);
extern void prepare_qBri2_functions(PISDN_ADAPTER IoAdapter);
-extern void diva_xdi_display_adapter_features(int card);
-extern void diva_add_slave_adapter(diva_os_xdi_adapter_t *a);
extern int qBri_FPGA_download(PISDN_ADAPTER IoAdapter);
extern void start_qBri_hardware(PISDN_ADAPTER IoAdapter);
-extern int diva_card_read_xlog(diva_os_xdi_adapter_t *a);
-
/*
** LOCALS
*/
diff --git a/drivers/isdn/hardware/eicon/os_bri.c b/drivers/isdn/hardware/eicon/os_bri.c
index 20f2653..c7a45e6 100644
--- a/drivers/isdn/hardware/eicon/os_bri.c
+++ b/drivers/isdn/hardware/eicon/os_bri.c
@@ -17,13 +17,12 @@
#include "mi_pc.h"
#include "pc_maint.h"
#include "dsrv_bri.h"
+#include "diva.h"
/*
** IMPORTS
*/
extern void prepare_maestra_functions(PISDN_ADAPTER IoAdapter);
-extern void diva_xdi_display_adapter_features(int card);
-extern int diva_card_read_xlog(diva_os_xdi_adapter_t *a);
/*
** LOCALS
diff --git a/drivers/isdn/hardware/eicon/os_pri.c b/drivers/isdn/hardware/eicon/os_pri.c
index da4957a..acc1de6 100644
--- a/drivers/isdn/hardware/eicon/os_pri.c
+++ b/drivers/isdn/hardware/eicon/os_pri.c
@@ -19,6 +19,7 @@
#include "dsp_tst.h"
#include "diva_dma.h"
#include "dsrv_pri.h"
+#include "diva.h"
/* --------------------------------------------------------------------------
OS Dependent part of XDI driver for DIVA PRI Adapter
@@ -28,14 +29,12 @@
#define DIVA_PRI_NO_PCI_BIOS_WORKAROUND 1
-extern int diva_card_read_xlog(diva_os_xdi_adapter_t *a);
/*
** IMPORTS
*/
extern void prepare_pri_functions(PISDN_ADAPTER IoAdapter);
extern void prepare_pri2_functions(PISDN_ADAPTER IoAdapter);
-extern void diva_xdi_display_adapter_features(int card);
static int diva_pri_cleanup_adapter(diva_os_xdi_adapter_t *a);
static int diva_pri_cmd_card_proc(struct _diva_os_xdi_adapter *a,
--
1.7.9.5
Move prototype declaration of functions to header file
hardware/eicon/platform.h because they are used by more than one file.
This eliminates the following warnings in hardware/eicon/divasmain.c:
drivers/isdn/hardware/eicon/divasmain.c:190:6: warning: no previous prototype for ‘divas_get_version’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
---
drivers/isdn/hardware/eicon/divasproc.c | 1 -
drivers/isdn/hardware/eicon/platform.h | 1 +
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/isdn/hardware/eicon/divasproc.c b/drivers/isdn/hardware/eicon/divasproc.c
index 56ce98a..edb7f39 100644
--- a/drivers/isdn/hardware/eicon/divasproc.c
+++ b/drivers/isdn/hardware/eicon/divasproc.c
@@ -34,7 +34,6 @@
extern PISDN_ADAPTER IoAdapters[MAX_ADAPTER];
-extern void divas_get_version(char *);
extern void diva_get_vserial_number(PISDN_ADAPTER IoAdapter, char *buf);
/*********************************************************
diff --git a/drivers/isdn/hardware/eicon/platform.h b/drivers/isdn/hardware/eicon/platform.h
index cdfbb19..e861857 100644
--- a/drivers/isdn/hardware/eicon/platform.h
+++ b/drivers/isdn/hardware/eicon/platform.h
@@ -150,6 +150,7 @@ struct _diva_os_timer;
struct _ISDN_ADAPTER;
void diva_log_info(unsigned char *, ...);
+void divas_get_version(char *);
/*
** XDI DIDD Interface
--
1.7.9.5
Move prototype declarations of functions to header file
hardware/eicon/platform.h because they are used by more than one file.
This eliminates the following warnings in hardware/eicon/divamnt.c:
drivers/isdn/hardware/eicon/divamnt.c:75:5: warning: no previous prototype for ‘diva_os_copy_to_user’ [-Wmissing-prototypes]
drivers/isdn/hardware/eicon/divamnt.c:80:5: warning: no previous prototype for ‘diva_os_copy_from_user’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
---
drivers/isdn/hardware/eicon/mntfunc.c | 5 -----
drivers/isdn/hardware/eicon/platform.h | 9 +++++++++
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/drivers/isdn/hardware/eicon/mntfunc.c b/drivers/isdn/hardware/eicon/mntfunc.c
index 1cd9aff..e304a1d 100644
--- a/drivers/isdn/hardware/eicon/mntfunc.c
+++ b/drivers/isdn/hardware/eicon/mntfunc.c
@@ -29,11 +29,6 @@ static DESCRIPTOR MAdapter;
static DESCRIPTOR MaintDescriptor =
{ IDI_DIMAINT, 0, 0, (IDI_CALL) diva_maint_prtComp };
-extern int diva_os_copy_to_user(void *os_handle, void __user *dst,
- const void *src, int length);
-extern int diva_os_copy_from_user(void *os_handle, void *dst,
- const void __user *src, int length);
-
static void no_printf(unsigned char *x, ...)
{
/* dummy debug function */
diff --git a/drivers/isdn/hardware/eicon/platform.h b/drivers/isdn/hardware/eicon/platform.h
index ef329e0..f170e21 100644
--- a/drivers/isdn/hardware/eicon/platform.h
+++ b/drivers/isdn/hardware/eicon/platform.h
@@ -277,6 +277,15 @@ void diva_os_remove_soft_isr(diva_os_soft_isr_t *psoft_isr);
void diva_os_get_time(dword *sec, dword *usec);
/*
+ * kernel/user space copy functions
+ */
+int diva_os_copy_to_user(void *os_handle, void __user *dst,
+ const void *src, int length);
+int diva_os_copy_from_user(void *os_handle, void *dst,
+ const void __user *src, int length);
+
+
+/*
** atomic operation, fake because we use threads
*/
typedef int diva_os_atomic_t;
--
1.7.9.5
Mark functions as static in hardware/mISDN/hfcmulti.c because they are
not used outside this file. Remove unused function from
hardware/mISDN/hfcmulti.c.
This eliminates the following warnings in hardware/mISDN/hfcmulti.c:
drivers/isdn/hardware/mISDN/hfcmulti.c:568:1: warning: no previous prototype for ‘enablepcibridge’ [-Wmissing-prototypes]
drivers/isdn/hardware/mISDN/hfcmulti.c:574:1: warning: no previous prototype for ‘disablepcibridge’ [-Wmissing-prototypes]
drivers/isdn/hardware/mISDN/hfcmulti.c:580:1: warning: no previous prototype for ‘readpcibridge’ [-Wmissing-prototypes]
drivers/isdn/hardware/mISDN/hfcmulti.c:608:1: warning: no previous prototype for ‘writepcibridge’ [-Wmissing-prototypes]
drivers/isdn/hardware/mISDN/hfcmulti.c:638:1: warning: no previous prototype for ‘cpld_set_reg’ [-Wmissing-prototypes]
drivers/isdn/hardware/mISDN/hfcmulti.c:645:1: warning: no previous prototype for ‘cpld_write_reg’ [-Wmissing-prototypes]
drivers/isdn/hardware/mISDN/hfcmulti.c:657:1: warning: no previous prototype for ‘cpld_read_reg’ [-Wmissing-prototypes]
drivers/isdn/hardware/mISDN/hfcmulti.c:674:1: warning: no previous prototype for ‘vpm_write_address’ [-Wmissing-prototypes]
drivers/isdn/hardware/mISDN/hfcmulti.c:681:1: warning: no previous prototype for ‘vpm_read_address’ [-Wmissing-prototypes]
drivers/isdn/hardware/mISDN/hfcmulti.c:695:1: warning: no previous prototype for ‘vpm_in’ [-Wmissing-prototypes]
drivers/isdn/hardware/mISDN/hfcmulti.c:716:1: warning: no previous prototype for ‘vpm_out’ [-Wmissing-prototypes]
drivers/isdn/hardware/mISDN/hfcmulti.c:1028:1: warning: no previous prototype for ‘plxsd_checksync’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
---
drivers/isdn/hardware/mISDN/hfcmulti.c | 36 ++++++++++----------------------
1 file changed, 11 insertions(+), 25 deletions(-)
diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c
index 28543d7..0c4021d 100644
--- a/drivers/isdn/hardware/mISDN/hfcmulti.c
+++ b/drivers/isdn/hardware/mISDN/hfcmulti.c
@@ -564,19 +564,19 @@ disable_hwirq(struct hfc_multi *hc)
#define MAX_TDM_CHAN 32
-inline void
+static inline void
enablepcibridge(struct hfc_multi *c)
{
HFC_outb(c, R_BRG_PCM_CFG, (0x0 << 6) | 0x3); /* was _io before */
}
-inline void
+static inline void
disablepcibridge(struct hfc_multi *c)
{
HFC_outb(c, R_BRG_PCM_CFG, (0x0 << 6) | 0x2); /* was _io before */
}
-inline unsigned char
+static inline unsigned char
readpcibridge(struct hfc_multi *hc, unsigned char address)
{
unsigned short cipv;
@@ -604,7 +604,7 @@ readpcibridge(struct hfc_multi *hc, unsigned char address)
return data;
}
-inline void
+static inline void
writepcibridge(struct hfc_multi *hc, unsigned char address, unsigned char data)
{
unsigned short cipv;
@@ -634,14 +634,14 @@ writepcibridge(struct hfc_multi *hc, unsigned char address, unsigned char data)
outl(datav, hc->pci_iobase);
}
-inline void
+static inline void
cpld_set_reg(struct hfc_multi *hc, unsigned char reg)
{
/* Do data pin read low byte */
HFC_outb(hc, R_GPIO_OUT1, reg);
}
-inline void
+static inline void
cpld_write_reg(struct hfc_multi *hc, unsigned char reg, unsigned char val)
{
cpld_set_reg(hc, reg);
@@ -653,7 +653,7 @@ cpld_write_reg(struct hfc_multi *hc, unsigned char reg, unsigned char val)
return;
}
-inline unsigned char
+static inline unsigned char
cpld_read_reg(struct hfc_multi *hc, unsigned char reg)
{
unsigned char bytein;
@@ -670,28 +670,14 @@ cpld_read_reg(struct hfc_multi *hc, unsigned char reg)
return bytein;
}
-inline void
+static inline void
vpm_write_address(struct hfc_multi *hc, unsigned short addr)
{
cpld_write_reg(hc, 0, 0xff & addr);
cpld_write_reg(hc, 1, 0x01 & (addr >> 8));
}
-inline unsigned short
-vpm_read_address(struct hfc_multi *c)
-{
- unsigned short addr;
- unsigned short highbit;
-
- addr = cpld_read_reg(c, 0);
- highbit = cpld_read_reg(c, 1);
-
- addr = addr | (highbit << 8);
-
- return addr & 0x1ff;
-}
-
-inline unsigned char
+static inline unsigned char
vpm_in(struct hfc_multi *c, int which, unsigned short addr)
{
unsigned char res;
@@ -712,7 +698,7 @@ vpm_in(struct hfc_multi *c, int which, unsigned short addr)
return res;
}
-inline void
+static inline void
vpm_out(struct hfc_multi *c, int which, unsigned short addr,
unsigned char data)
{
@@ -1024,7 +1010,7 @@ hfcmulti_resync(struct hfc_multi *locked, struct hfc_multi *newmaster, int rm)
}
/* This must be called AND hc must be locked irqsave!!! */
-inline void
+static inline void
plxsd_checksync(struct hfc_multi *hc, int rm)
{
if (hc->syncronized) {
--
1.7.9.5
Mark functions as static in hardware/mISDN/avmfritz.c because they are
not used outside this file.
This eliminates the following warnings in hardware/mISDN/avmfritz.c:
drivers/isdn/hardware/mISDN/avmfritz.c:288:1: warning: no previous prototype for ‘write_ctrl’ [-Wmissing-prototypes]
drivers/isdn/hardware/mISDN/avmfritz.c:745:1: warning: no previous prototype for ‘clear_pending_hdlc_ints’ [-Wmissing-prototypes]
drivers/isdn/hardware/mISDN/avmfritz.c:966:1: warning: no previous prototype for ‘setup_fritz’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
---
drivers/isdn/hardware/mISDN/avmfritz.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/isdn/hardware/mISDN/avmfritz.c b/drivers/isdn/hardware/mISDN/avmfritz.c
index 292991c..e3fa1cd 100644
--- a/drivers/isdn/hardware/mISDN/avmfritz.c
+++ b/drivers/isdn/hardware/mISDN/avmfritz.c
@@ -284,7 +284,7 @@ __write_ctrl_pciv2(struct fritzcard *fc, struct hdlc_hw *hdlc, u32 channel) {
AVM_HDLC_STATUS_1));
}
-void
+static void
write_ctrl(struct bchannel *bch, int which) {
struct fritzcard *fc = bch->hw;
struct hdlc_hw *hdlc;
@@ -741,7 +741,7 @@ inithdlc(struct fritzcard *fc)
modehdlc(&fc->bch[1], -1);
}
-void
+static void
clear_pending_hdlc_ints(struct fritzcard *fc)
{
u32 val;
@@ -962,7 +962,7 @@ avm_dctrl(struct mISDNchannel *ch, u32 cmd, void *arg)
return err;
}
-int
+static int
setup_fritz(struct fritzcard *fc)
{
u32 val, ver;
--
1.7.9.5
Mark functions as static in hardware/mISDN/w6692.c because they ar enot
used outside this file.
This eliminates the following warnings in hardware/mISDN/w6692.c:
drivers/isdn/hardware/mISDN/w6692.c:851:6: warning: no previous prototype for ‘initW6692’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
---
drivers/isdn/hardware/mISDN/w6692.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/isdn/hardware/mISDN/w6692.c b/drivers/isdn/hardware/mISDN/w6692.c
index de69f68..2e24a05 100644
--- a/drivers/isdn/hardware/mISDN/w6692.c
+++ b/drivers/isdn/hardware/mISDN/w6692.c
@@ -848,7 +848,7 @@ dbusy_timer_handler(struct dchannel *dch)
}
}
-void initW6692(struct w6692_hw *card)
+static void initW6692(struct w6692_hw *card)
{
u8 val;
--
1.7.9.5
Mark functions as static in hardware/mISDN/mISDNipac.c because they are
not used outside this file.
This elimiantes the following warnings in hardware/mISDN/mISDNipac.c:
drivers/isdn/hardware/mISDN/mISDNipac.c:116:1: warning: no previous prototype for ‘isac_empty_fifo’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
---
drivers/isdn/hardware/mISDN/mISDNipac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/isdn/hardware/mISDN/mISDNipac.c b/drivers/isdn/hardware/mISDN/mISDNipac.c
index ccd7d85..e139abc 100644
--- a/drivers/isdn/hardware/mISDN/mISDNipac.c
+++ b/drivers/isdn/hardware/mISDN/mISDNipac.c
@@ -112,7 +112,7 @@ isac_ph_state_bh(struct dchannel *dch)
pr_debug("%s: TE newstate %x\n", isac->name, dch->state);
}
-void
+static void
isac_empty_fifo(struct isac_hw *isac, int count)
{
u8 *ptr;
--
1.7.9.5
Move prototype declarations of functions to header file hisax/hscx.h
because they are used by more than one file.
This eliminates the following warnings in hisax/hscx.c:
drivers/isdn/hisax/hscx.c:96:1: warning: no previous prototype for ‘hscx_l2l1’ [-Wmissing-prototypes]
drivers/isdn/hisax/hscx.c:175:1: warning: no previous prototype for ‘open_hscxstate’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
---
drivers/isdn/hisax/elsa_ser.c | 2 --
drivers/isdn/hisax/hscx.h | 2 ++
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/isdn/hisax/elsa_ser.c b/drivers/isdn/hisax/elsa_ser.c
index 3f84dd8..0d5ccd2 100644
--- a/drivers/isdn/hisax/elsa_ser.c
+++ b/drivers/isdn/hisax/elsa_ser.c
@@ -419,9 +419,7 @@ static void rs_interrupt_elsa(struct IsdnCardState *cs)
#endif
}
-extern int open_hscxstate(struct IsdnCardState *cs, struct BCState *bcs);
extern void modehscx(struct BCState *bcs, int mode, int bc);
-extern void hscx_l2l1(struct PStack *st, int pr, void *arg);
static void
close_elsastate(struct BCState *bcs)
diff --git a/drivers/isdn/hisax/hscx.h b/drivers/isdn/hisax/hscx.h
index 1148b4b..e99db24 100644
--- a/drivers/isdn/hisax/hscx.h
+++ b/drivers/isdn/hisax/hscx.h
@@ -39,3 +39,5 @@ extern void modehscx(struct BCState *bcs, int mode, int bc);
extern void clear_pending_hscx_ints(struct IsdnCardState *cs);
extern void inithscx(struct IsdnCardState *cs);
extern void inithscxisac(struct IsdnCardState *cs, int part);
+extern void hscx_l2l1(struct PStack *st, int pr, void *arg);
+extern int open_hscxstate(struct IsdnCardState *cs, struct BCState *bcs);
--
1.7.9.5
Move prototype declarations of functions to header file
hardware/eicon/platform.h because they are used by more than one file.
This eliminates the following warnings in hardware/eicon/idifunc.c:
drivers/isdn/hardware/eicon/idifunc.c:243:12: warning: no previous prototype for ‘idifunc_init’ [-Wmissing-prototypes]
drivers/isdn/hardware/eicon/idifunc.c:263:13: warning: no previous prototype for ‘idifunc_finit’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
---
drivers/isdn/hardware/eicon/divasi.c | 3 ---
drivers/isdn/hardware/eicon/platform.h | 3 +++
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/isdn/hardware/eicon/divasi.c b/drivers/isdn/hardware/eicon/divasi.c
index 4103a8c..c2a6f1a 100644
--- a/drivers/isdn/hardware/eicon/divasi.c
+++ b/drivers/isdn/hardware/eicon/divasi.c
@@ -48,9 +48,6 @@ static char *DRIVERLNAME = "diva_idi";
static char *DEVNAME = "DivasIDI";
char *DRIVERRELEASE_IDI = "2.0";
-extern int idifunc_init(void);
-extern void idifunc_finit(void);
-
/*
* helper functions
*/
diff --git a/drivers/isdn/hardware/eicon/platform.h b/drivers/isdn/hardware/eicon/platform.h
index f170e21..33d6be1 100644
--- a/drivers/isdn/hardware/eicon/platform.h
+++ b/drivers/isdn/hardware/eicon/platform.h
@@ -179,6 +179,9 @@ static __inline__ void diva_os_free(unsigned long flags, void *ptr)
vfree(ptr);
}
+int idifunc_init(void);
+void idifunc_finit(void);
+
/*
** use skbuffs for message buffer
*/
--
1.7.9.5
Mark functions as static in mISDN/layer2.c because they are not used
outside this file.
This eliminates following warnings in mISDN/layer2.c:
drivers/isdn/mISDN/layer2.c:120:1: warning: no previous prototype for ‘l2headersize’ [-Wmissing-prototypes]
drivers/isdn/mISDN/layer2.c:127:1: warning: no previous prototype for ‘l2addrsize’ [-Wmissing-prototypes]
drivers/isdn/mISDN/layer2.c:379:1: warning: no previous prototype for ‘cansend’ [-Wmissing-prototypes]
drivers/isdn/mISDN/layer2.c:391:1: warning: no previous prototype for ‘clear_exception’ [-Wmissing-prototypes]
drivers/isdn/mISDN/layer2.c:439:1: warning: no previous prototype for ‘IsUI’ [-Wmissing-prototypes]
drivers/isdn/mISDN/layer2.c:445:1: warning: no previous prototype for ‘IsUA’ [-Wmissing-prototypes]
drivers/isdn/mISDN/layer2.c:451:1: warning: no previous prototype for ‘IsDM’ [-Wmissing-prototypes]
drivers/isdn/mISDN/layer2.c:457:1: warning: no previous prototype for ‘IsDISC’ [-Wmissing-prototypes]
drivers/isdn/mISDN/layer2.c:463:1: warning: no previous prototype for ‘IsRR’ [-Wmissing-prototypes]
drivers/isdn/mISDN/layer2.c:472:1: warning: no previous prototype for ‘IsSFrame’ [-Wmissing-prototypes]
drivers/isdn/mISDN/layer2.c:482:1: warning: no previous prototype for ‘IsSABME’ [-Wmissing-prototypes]
drivers/isdn/mISDN/layer2.c:490:1: warning: no previous prototype for ‘IsREJ’ [-Wmissing-prototypes]
drivers/isdn/mISDN/layer2.c:497:1: warning: no previous prototype for ‘IsFRMR’ [-Wmissing-prototypes]
drivers/isdn/mISDN/layer2.c:503:1: warning: no previous prototype for ‘IsRNR’ [-Wmissing-prototypes]
drivers/isdn/mISDN/layer2.c:649:1: warning: no previous prototype for ‘get_PollFlag’ [-Wmissing-prototypes]
drivers/isdn/mISDN/layer2.c:655:1: warning: no previous prototype for ‘get_PollFlagFree’ [-Wmissing-prototypes]
drivers/isdn/mISDN/layer2.c:665:1: warning: no previous prototype for ‘start_t200’ [-Wmissing-prototypes]
drivers/isdn/mISDN/layer2.c:672:1: warning: no previous prototype for 'restart_t200’ [-Wmissing-prototypes]
drivers/isdn/mISDN/layer2.c:679:1: warning: no previous prototype for ‘stop_t200’ [-Wmissing-prototypes]
drivers/isdn/mISDN/layer2.c:686:1: warning: no previous prototype for ‘st5_dl_release_l2l3’ [-Wmissing-prototypes]
drivers/isdn/mISDN/layer2.c:698:1: warning: no previous prototype for ‘lapb_dl_release_l2l3’ [-Wmissing-prototypes]
drivers/isdn/mISDN/layer2.c:1133:1: warning: no previous prototype for ‘enquiry_response’ [-Wmissing-prototypes]
drivers/isdn/mISDN/layer2.c:1143:1: warning: no previous prototype for ‘transmit_enquiry’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
---
drivers/isdn/mISDN/layer2.c | 53 ++++++++++++++++++-------------------------
1 file changed, 22 insertions(+), 31 deletions(-)
diff --git a/drivers/isdn/mISDN/layer2.c b/drivers/isdn/mISDN/layer2.c
index 949cabb..b59e5ed 100644
--- a/drivers/isdn/mISDN/layer2.c
+++ b/drivers/isdn/mISDN/layer2.c
@@ -116,14 +116,14 @@ l2m_debug(struct FsmInst *fi, char *fmt, ...)
va_end(va);
}
-inline u_int
+static inline u_int
l2headersize(struct layer2 *l2, int ui)
{
return ((test_bit(FLG_MOD128, &l2->flag) && (!ui)) ? 2 : 1) +
(test_bit(FLG_LAPD, &l2->flag) ? 2 : 1);
}
-inline u_int
+static inline u_int
l2addrsize(struct layer2 *l2)
{
return test_bit(FLG_LAPD, &l2->flag) ? 2 : 1;
@@ -375,7 +375,7 @@ ReleaseWin(struct layer2 *l2)
"isdnl2 freed %d skbuffs in release\n", cnt);
}
-inline unsigned int
+static inline unsigned int
cansend(struct layer2 *l2)
{
unsigned int p1;
@@ -387,7 +387,7 @@ cansend(struct layer2 *l2)
return (p1 < l2->window) && !test_bit(FLG_PEER_BUSY, &l2->flag);
}
-inline void
+static inline void
clear_exception(struct layer2 *l2)
{
test_and_clear_bit(FLG_ACK_PEND, &l2->flag);
@@ -435,40 +435,31 @@ enqueue_ui(struct layer2 *l2, struct sk_buff *skb)
dev_kfree_skb(skb);
}
-inline int
+static inline int
IsUI(u_char *data)
{
return (data[0] & 0xef) == UI;
}
-inline int
+static inline int
IsUA(u_char *data)
{
return (data[0] & 0xef) == UA;
}
-inline int
+static inline int
IsDM(u_char *data)
{
return (data[0] & 0xef) == DM;
}
-inline int
+static inline int
IsDISC(u_char *data)
{
return (data[0] & 0xef) == DISC;
}
-inline int
-IsRR(u_char *data, struct layer2 *l2)
-{
- if (test_bit(FLG_MOD128, &l2->flag))
- return data[0] == RR;
- else
- return (data[0] & 0xf) == 1;
-}
-
-inline int
+static inline int
IsSFrame(u_char *data, struct layer2 *l2)
{
register u_char d = *data;
@@ -478,7 +469,7 @@ IsSFrame(u_char *data, struct layer2 *l2)
return ((d & 0xf3) == 1) && ((d & 0x0c) != 0x0c);
}
-inline int
+static inline int
IsSABME(u_char *data, struct layer2 *l2)
{
u_char d = data[0] & ~0x10;
@@ -486,20 +477,20 @@ IsSABME(u_char *data, struct layer2 *l2)
return test_bit(FLG_MOD128, &l2->flag) ? d == SABME : d == SABM;
}
-inline int
+static inline int
IsREJ(u_char *data, struct layer2 *l2)
{
return test_bit(FLG_MOD128, &l2->flag) ?
data[0] == REJ : (data[0] & 0xf) == REJ;
}
-inline int
+static inline int
IsFRMR(u_char *data)
{
return (data[0] & 0xef) == FRMR;
}
-inline int
+static inline int
IsRNR(u_char *data, struct layer2 *l2)
{
return test_bit(FLG_MOD128, &l2->flag) ?
@@ -645,13 +636,13 @@ send_uframe(struct layer2 *l2, struct sk_buff *skb, u_char cmd, u_char cr)
}
-inline u_char
+static inline u_char
get_PollFlag(struct layer2 *l2, struct sk_buff *skb)
{
return skb->data[l2addrsize(l2)] & 0x10;
}
-inline u_char
+static inline u_char
get_PollFlagFree(struct layer2 *l2, struct sk_buff *skb)
{
u_char PF;
@@ -661,28 +652,28 @@ get_PollFlagFree(struct layer2 *l2, struct sk_buff *skb)
return PF;
}
-inline void
+static inline void
start_t200(struct layer2 *l2, int i)
{
mISDN_FsmAddTimer(&l2->t200, l2->T200, EV_L2_T200, NULL, i);
test_and_set_bit(FLG_T200_RUN, &l2->flag);
}
-inline void
+static inline void
restart_t200(struct layer2 *l2, int i)
{
mISDN_FsmRestartTimer(&l2->t200, l2->T200, EV_L2_T200, NULL, i);
test_and_set_bit(FLG_T200_RUN, &l2->flag);
}
-inline void
+static inline void
stop_t200(struct layer2 *l2, int i)
{
if (test_and_clear_bit(FLG_T200_RUN, &l2->flag))
mISDN_FsmDelTimer(&l2->t200, i);
}
-inline void
+static inline void
st5_dl_release_l2l3(struct layer2 *l2)
{
int pr;
@@ -694,7 +685,7 @@ st5_dl_release_l2l3(struct layer2 *l2)
l2up_create(l2, pr, 0, NULL);
}
-inline void
+static inline void
lapb_dl_release_l2l3(struct layer2 *l2, int f)
{
if (test_bit(FLG_LAPB, &l2->flag))
@@ -1129,7 +1120,7 @@ enquiry_cr(struct layer2 *l2, u_char typ, u_char cr, u_char pf)
enqueue_super(l2, skb);
}
-inline void
+static inline void
enquiry_response(struct layer2 *l2)
{
if (test_bit(FLG_OWN_BUSY, &l2->flag))
@@ -1139,7 +1130,7 @@ enquiry_response(struct layer2 *l2)
test_and_clear_bit(FLG_ACK_PEND, &l2->flag);
}
-inline void
+static inline void
transmit_enquiry(struct layer2 *l2)
{
if (test_bit(FLG_OWN_BUSY, &l2->flag))
--
1.7.9.5
Move prototype declarations of function to header file
hardware/eicon/platform.h because they are used by more than one file.
This eliminates the following warnings in hardware/eicon/diddfunc.c:
drivers/isdn/hardware/eicon/diddfunc.c:95:12: warning: no previous prototype for ‘diddfunc_init’ [-Wmissing-prototypes]
drivers/isdn/hardware/eicon/diddfunc.c:110:13: warning: no previous prototype for ‘diddfunc_finit’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
---
drivers/isdn/hardware/eicon/diva_didd.c | 3 ---
drivers/isdn/hardware/eicon/platform.h | 3 +++
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/isdn/hardware/eicon/diva_didd.c b/drivers/isdn/hardware/eicon/diva_didd.c
index fab6ccf..56d32a7 100644
--- a/drivers/isdn/hardware/eicon/diva_didd.c
+++ b/drivers/isdn/hardware/eicon/diva_didd.c
@@ -39,9 +39,6 @@ MODULE_LICENSE("GPL");
#define DBG_MINIMUM (DL_LOG + DL_FTL + DL_ERR)
#define DBG_DEFAULT (DBG_MINIMUM + DL_XLOG + DL_REG)
-extern int diddfunc_init(void);
-extern void diddfunc_finit(void);
-
extern void DIVA_DIDD_Read(void *, int);
static struct proc_dir_entry *proc_didd;
diff --git a/drivers/isdn/hardware/eicon/platform.h b/drivers/isdn/hardware/eicon/platform.h
index 33d6be1..d648ab7 100644
--- a/drivers/isdn/hardware/eicon/platform.h
+++ b/drivers/isdn/hardware/eicon/platform.h
@@ -182,6 +182,9 @@ static __inline__ void diva_os_free(unsigned long flags, void *ptr)
int idifunc_init(void);
void idifunc_finit(void);
+int diddfunc_init(void);
+void diddfunc_finit(void);
+
/*
** use skbuffs for message buffer
*/
--
1.7.9.5
Move prototype declaration of function to header file because they are
used by more than one file.
This eliminates the following warnings in hardware/eicon/s_bri.c:
drivers/isdn/hardware/eicon/s_bri.c:163:6: warning: no previous prototype for ‘prepare_maestra_functions’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
---
drivers/isdn/hardware/eicon/os_bri.c | 5 -----
drivers/isdn/hardware/eicon/platform.h | 2 ++
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/isdn/hardware/eicon/os_bri.c b/drivers/isdn/hardware/eicon/os_bri.c
index c7a45e6..b61e335 100644
--- a/drivers/isdn/hardware/eicon/os_bri.c
+++ b/drivers/isdn/hardware/eicon/os_bri.c
@@ -20,11 +20,6 @@
#include "diva.h"
/*
-** IMPORTS
-*/
-extern void prepare_maestra_functions(PISDN_ADAPTER IoAdapter);
-
-/*
** LOCALS
*/
static int bri_bar_length[3] = {
diff --git a/drivers/isdn/hardware/eicon/platform.h b/drivers/isdn/hardware/eicon/platform.h
index d648ab7..a507cea 100644
--- a/drivers/isdn/hardware/eicon/platform.h
+++ b/drivers/isdn/hardware/eicon/platform.h
@@ -185,6 +185,8 @@ void idifunc_finit(void);
int diddfunc_init(void);
void diddfunc_finit(void);
+void prepare_maestra_functions(PISDN_ADAPTER IoAdapter);
+
/*
** use skbuffs for message buffer
*/
--
1.7.9.5
Move prototype declaration of functions to header file
hardware/eicon/platform.h because they are used by more than one file.
This eliminates the following warnings in hardware/eicon/s_4bri.c:
drivers/isdn/hardware/eicon/s_4bri.c:128:6: warning: no previous prototype for ‘start_qBri_hardware’ [-Wmissing-prototypes]
drivers/isdn/hardware/eicon/s_4bri.c:275:5: warning: no previous prototype for ‘qBri_FPGA_download’ [-Wmissing-prototypes]
drivers/isdn/hardware/eicon/s_4bri.c:487:6: warning: no previous prototype for ‘prepare_qBri_functions’ [-Wmissing-prototypes]
drivers/isdn/hardware/eicon/s_4bri.c:496:6: warning: no previous prototype for ‘prepare_qBri2_functions’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
---
drivers/isdn/hardware/eicon/os_4bri.c | 9 ---------
drivers/isdn/hardware/eicon/platform.h | 5 +++++
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/drivers/isdn/hardware/eicon/os_4bri.c b/drivers/isdn/hardware/eicon/os_4bri.c
index 54f7033..287ceee 100644
--- a/drivers/isdn/hardware/eicon/os_4bri.c
+++ b/drivers/isdn/hardware/eicon/os_4bri.c
@@ -23,15 +23,6 @@ static void *diva_xdiLoadFileFile = NULL;
static dword diva_xdiLoadFileLength = 0;
/*
-** IMPORTS
-*/
-extern void prepare_qBri_functions(PISDN_ADAPTER IoAdapter);
-extern void prepare_qBri2_functions(PISDN_ADAPTER IoAdapter);
-
-extern int qBri_FPGA_download(PISDN_ADAPTER IoAdapter);
-extern void start_qBri_hardware(PISDN_ADAPTER IoAdapter);
-
-/*
** LOCALS
*/
static unsigned long _4bri_bar_length[4] = {
diff --git a/drivers/isdn/hardware/eicon/platform.h b/drivers/isdn/hardware/eicon/platform.h
index a507cea..af3d0a6 100644
--- a/drivers/isdn/hardware/eicon/platform.h
+++ b/drivers/isdn/hardware/eicon/platform.h
@@ -187,6 +187,11 @@ void diddfunc_finit(void);
void prepare_maestra_functions(PISDN_ADAPTER IoAdapter);
+void start_qBri_hardware(PISDN_ADAPTER IoAdapter);
+void prepare_qBri_functions(PISDN_ADAPTER IoAdapter);
+void prepare_qBri2_functions(PISDN_ADAPTER IoAdapter);
+int qBri_FPGA_download(PISDN_ADAPTER IoAdapter);
+
/*
** use skbuffs for message buffer
*/
--
1.7.9.5
Move prototype declarations of functions to header file because they are
used by more than file.
This eliminates the following warnings in hardware/eicon/s_pri.c:
drivers/isdn/hardware/eicon/s_pri.c:192:6: warning: no previous prototype for ‘prepare_pri_functions’ [-Wmissing-prototypes]
drivers/isdn/hardware/eicon/s_pri.c:200:6: warning: no previous prototype for ‘prepare_pri2_functions’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
---
drivers/isdn/hardware/eicon/os_pri.c | 6 ------
drivers/isdn/hardware/eicon/platform.h | 3 +++
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/isdn/hardware/eicon/os_pri.c b/drivers/isdn/hardware/eicon/os_pri.c
index acc1de6..129007c 100644
--- a/drivers/isdn/hardware/eicon/os_pri.c
+++ b/drivers/isdn/hardware/eicon/os_pri.c
@@ -30,12 +30,6 @@
#define DIVA_PRI_NO_PCI_BIOS_WORKAROUND 1
-/*
-** IMPORTS
-*/
-extern void prepare_pri_functions(PISDN_ADAPTER IoAdapter);
-extern void prepare_pri2_functions(PISDN_ADAPTER IoAdapter);
-
static int diva_pri_cleanup_adapter(diva_os_xdi_adapter_t *a);
static int diva_pri_cmd_card_proc(struct _diva_os_xdi_adapter *a,
diva_xdi_um_cfg_cmd_t *cmd, int length);
diff --git a/drivers/isdn/hardware/eicon/platform.h b/drivers/isdn/hardware/eicon/platform.h
index af3d0a6..f26f6cb 100644
--- a/drivers/isdn/hardware/eicon/platform.h
+++ b/drivers/isdn/hardware/eicon/platform.h
@@ -192,6 +192,9 @@ void prepare_qBri_functions(PISDN_ADAPTER IoAdapter);
void prepare_qBri2_functions(PISDN_ADAPTER IoAdapter);
int qBri_FPGA_download(PISDN_ADAPTER IoAdapter);
+void prepare_pri_functions(PISDN_ADAPTER IoAdapter);
+void prepare_pri2_functions(PISDN_ADAPTER IoAdapter);
+
/*
** use skbuffs for message buffer
*/
--
1.7.9.5
Move prototype declaration of functions to header file
hardware/eicon/platform.h because they are used by more than one file.
This eliminates the following warnings in hardware/eicon/mntfunc.c:
drivers/isdn/hardware/eicon/mntfunc.c:136:5: warning: no previous prototype for ‘maint_read_write’ [-Wmissing-prototypes]
drivers/isdn/hardware/eicon/mntfunc.c:303:12: warning: no previous prototype for ‘mntfunc_init’ [-Wmissing-prototypes]
drivers/isdn/hardware/eicon/mntfunc.c:351:13: warning: no previous prototype for ‘mntfunc_finit’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
---
drivers/isdn/hardware/eicon/divamnt.c | 4 ----
drivers/isdn/hardware/eicon/platform.h | 4 ++++
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/isdn/hardware/eicon/divamnt.c b/drivers/isdn/hardware/eicon/divamnt.c
index 48db08d..02a1d0d 100644
--- a/drivers/isdn/hardware/eicon/divamnt.c
+++ b/drivers/isdn/hardware/eicon/divamnt.c
@@ -47,10 +47,6 @@ static wait_queue_head_t msgwaitq;
static unsigned long opened;
static struct timeval start_time;
-extern int mntfunc_init(int *, void **, unsigned long);
-extern void mntfunc_finit(void);
-extern int maint_read_write(void __user *buf, int count);
-
/*
* helper functions
*/
diff --git a/drivers/isdn/hardware/eicon/platform.h b/drivers/isdn/hardware/eicon/platform.h
index f26f6cb..6bec7db 100644
--- a/drivers/isdn/hardware/eicon/platform.h
+++ b/drivers/isdn/hardware/eicon/platform.h
@@ -195,6 +195,10 @@ int qBri_FPGA_download(PISDN_ADAPTER IoAdapter);
void prepare_pri_functions(PISDN_ADAPTER IoAdapter);
void prepare_pri2_functions(PISDN_ADAPTER IoAdapter);
+int mntfunc_init(int *, void **, unsigned long);
+void mntfunc_finit(void);
+int maint_read_write(void __user *buf, int count);
+
/*
** use skbuffs for message buffer
*/
--
1.7.9.5
Move prototype declaration of functions to header file hisax/hisax.h
because they are used by more than one file.
This eliminates the following warnings:
drivers/isdn/hisax/teles3.c:273:5: warning: no previous prototype for ‘setup_teles3’ [-Wmissing-prototypes]
drivers/isdn/hisax/telespci.c:288:5: warning: no previous prototype for ‘setup_telespci’ [-Wmissing-prototypes]
drivers/isdn/hisax/s0box.c:213:5: warning: no previous prototype for ‘setup_s0box’ [-Wmissing-prototypes]
drivers/isdn/hisax/avm_a1p.c:216:5: warning: no previous prototype for ‘setup_avm_a1_pcmcia’ [-Wmissing-prototypes]
drivers/isdn/hisax/avm_pci.c:870:5: warning: no previous prototype for ‘setup_avm_pcipnp’ [-Wmissing-prototypes]
drivers/isdn/hisax/elsa.c:1209:5: warning: no previous prototype for ‘setup_elsa’ [-Wmissing-prototypes]
drivers/isdn/hisax/diva.c:1241:5: warning: no previous prototype for ‘setup_diva’ [-Wmissing-prototypes]
drivers/isdn/hisax/sedlbauer.c:674:5: warning: no previous prototype for ‘setup_sedlbauer’ [-Wmissing-prototypes]
drivers/isdn/hisax/nj_s.c:258:5: warning: no previous prototype for ‘setup_netjet_s’ [-Wmissing-prototypes]
drivers/isdn/hisax/nj_u.c:221:5: warning: no previous prototype for ‘setup_netjet_u’ [-Wmissing-prototypes]
drivers/isdn/hisax/hfc_pci.c:1638:1: warning: no previous prototype for ‘setup_hfcpci’ [-Wmissing-prototypes]
drivers/isdn/hisax/hfc_sx.c:1395:5: warning: no previous prototype for ‘setup_hfcsx’ [-Wmissing-prototypes]
drivers/isdn/hisax/niccy.c:229:5: warning: no previous prototype for ‘setup_niccy’ [-Wmissing-prototypes]
drivers/isdn/hisax/bkm_a4t.c:325:5: warning: no previous prototype for ‘setup_bkm_a4t’ [-Wmissing-prototypes]
drivers/isdn/hisax/bkm_a8.c:276:5: warning: no previous prototype for ‘setup_sct_quadro’ [-Wmissing-prototypes]
drivers/isdn/hisax/gazel.c:623:5: warning: no previous prototype for ‘setup_gazel’ [-Wmissing-prototypes]
drivers/isdn/hisax/w6692.c:996:5: warning: no previous prototype for ‘setup_w6692’ [-Wmissing-prototypes]
drivers/isdn/hisax/enternow_pci.c:387:5: warning: no previous prototype for ‘setup_enternow_pci’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
---
drivers/isdn/hisax/config.c | 72 -------------------------------------------
drivers/isdn/hisax/hisax.h | 71 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 71 insertions(+), 72 deletions(-)
diff --git a/drivers/isdn/hisax/config.c b/drivers/isdn/hisax/config.c
index b33f53b..196cbb8 100644
--- a/drivers/isdn/hisax/config.c
+++ b/drivers/isdn/hisax/config.c
@@ -460,42 +460,14 @@ __setup("hisax=", HiSax_setup);
extern int setup_teles0(struct IsdnCard *card);
#endif
-#if CARD_TELES3
-extern int setup_teles3(struct IsdnCard *card);
-#endif
-
-#if CARD_S0BOX
-extern int setup_s0box(struct IsdnCard *card);
-#endif
-
-#if CARD_TELESPCI
-extern int setup_telespci(struct IsdnCard *card);
-#endif
-
#if CARD_AVM_A1
extern int setup_avm_a1(struct IsdnCard *card);
#endif
-#if CARD_AVM_A1_PCMCIA
-extern int setup_avm_a1_pcmcia(struct IsdnCard *card);
-#endif
-
-#if CARD_FRITZPCI
-extern int setup_avm_pcipnp(struct IsdnCard *card);
-#endif
-
-#if CARD_ELSA
-extern int setup_elsa(struct IsdnCard *card);
-#endif
-
#if CARD_IX1MICROR2
extern int setup_ix1micro(struct IsdnCard *card);
#endif
-#if CARD_DIEHLDIVA
-extern int setup_diva(struct IsdnCard *card);
-#endif
-
#if CARD_ASUSCOM
extern int setup_asuscom(struct IsdnCard *card);
#endif
@@ -504,10 +476,6 @@ extern int setup_asuscom(struct IsdnCard *card);
extern int setup_TeleInt(struct IsdnCard *card);
#endif
-#if CARD_SEDLBAUER
-extern int setup_sedlbauer(struct IsdnCard *card);
-#endif
-
#if CARD_SPORTSTER
extern int setup_sportster(struct IsdnCard *card);
#endif
@@ -516,26 +484,10 @@ extern int setup_sportster(struct IsdnCard *card);
extern int setup_mic(struct IsdnCard *card);
#endif
-#if CARD_NETJET_S
-extern int setup_netjet_s(struct IsdnCard *card);
-#endif
-
#if CARD_HFCS
extern int setup_hfcs(struct IsdnCard *card);
#endif
-#if CARD_HFC_PCI
-extern int setup_hfcpci(struct IsdnCard *card);
-#endif
-
-#if CARD_HFC_SX
-extern int setup_hfcsx(struct IsdnCard *card);
-#endif
-
-#if CARD_NICCY
-extern int setup_niccy(struct IsdnCard *card);
-#endif
-
#if CARD_ISURF
extern int setup_isurf(struct IsdnCard *card);
#endif
@@ -544,30 +496,6 @@ extern int setup_isurf(struct IsdnCard *card);
extern int setup_saphir(struct IsdnCard *card);
#endif
-#if CARD_BKM_A4T
-extern int setup_bkm_a4t(struct IsdnCard *card);
-#endif
-
-#if CARD_SCT_QUADRO
-extern int setup_sct_quadro(struct IsdnCard *card);
-#endif
-
-#if CARD_GAZEL
-extern int setup_gazel(struct IsdnCard *card);
-#endif
-
-#if CARD_W6692
-extern int setup_w6692(struct IsdnCard *card);
-#endif
-
-#if CARD_NETJET_U
-extern int setup_netjet_u(struct IsdnCard *card);
-#endif
-
-#if CARD_FN_ENTERNOW_PCI
-extern int setup_enternow_pci(struct IsdnCard *card);
-#endif
-
/*
* Find card with given driverId
*/
diff --git a/drivers/isdn/hisax/hisax.h b/drivers/isdn/hisax/hisax.h
index 6ead6314..90d68d1 100644
--- a/drivers/isdn/hisax/hisax.h
+++ b/drivers/isdn/hisax/hisax.h
@@ -1327,6 +1327,77 @@ void release_tei(struct IsdnCardState *cs);
char *HiSax_getrev(const char *revision);
int TeiNew(void);
void TeiFree(void);
+#if CARD_TELES3
+int setup_teles3(struct IsdnCard *card);
+#endif
+
+#if CARD_TELESPCI
+extern int setup_telespci(struct IsdnCard *card);
+#endif
+
+#if CARD_S0BOX
+extern int setup_s0box(struct IsdnCard *card);
+#endif
+
+#if CARD_AVM_A1_PCMCIA
+extern int setup_avm_a1_pcmcia(struct IsdnCard *card);
+#endif
+
+#if CARD_FRITZPCI
+extern int setup_avm_pcipnp(struct IsdnCard *card);
+#endif
+
+#if CARD_ELSA
+extern int setup_elsa(struct IsdnCard *card);
+#endif
+
+#if CARD_DIEHLDIVA
+extern int setup_diva(struct IsdnCard *card);
+#endif
+
+#if CARD_SEDLBAUER
+extern int setup_sedlbauer(struct IsdnCard *card);
+#endif
+
+#if CARD_NETJET_S
+extern int setup_netjet_s(struct IsdnCard *card);
+#endif
+
+#if CARD_HFC_PCI
+extern int setup_hfcpci(struct IsdnCard *card);
+#endif
+
+#if CARD_HFC_SX
+extern int setup_hfcsx(struct IsdnCard *card);
+#endif
+
+#if CARD_NICCY
+extern int setup_niccy(struct IsdnCard *card);
+#endif
+
+#if CARD_BKM_A4T
+extern int setup_bkm_a4t(struct IsdnCard *card);
+#endif
+
+#if CARD_SCT_QUADRO
+extern int setup_sct_quadro(struct IsdnCard *card);
+#endif
+
+#if CARD_GAZEL
+extern int setup_gazel(struct IsdnCard *card);
+#endif
+
+#if CARD_W6692
+extern int setup_w6692(struct IsdnCard *card);
+#endif
+
+#if CARD_NETJET_U
+extern int setup_netjet_u(struct IsdnCard *card);
+#endif
+
+#if CARD_FN_ENTERNOW_PCI
+extern int setup_enternow_pci(struct IsdnCard *card);
+#endif
#ifdef CONFIG_PCI
--
1.7.9.5
Move prototype declaration of functions to header file
hardware/eicon/dadapter.h because they are used by more than one file.
This eliminates the following warning in hardware/eicon/dadapter.c:
drivers/isdn/hardware/eicon/dadapter.c:361:22: warning: no previous prototype for ‘DIVA_DIDD_Read’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
---
drivers/isdn/hardware/eicon/capifunc.c | 3 +--
drivers/isdn/hardware/eicon/dadapter.h | 1 +
drivers/isdn/hardware/eicon/diddfunc.c | 1 -
drivers/isdn/hardware/eicon/diva_didd.c | 2 --
drivers/isdn/hardware/eicon/divasfunc.c | 3 +--
drivers/isdn/hardware/eicon/idifunc.c | 3 +--
drivers/isdn/hardware/eicon/mntfunc.c | 3 +--
7 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/drivers/isdn/hardware/eicon/capifunc.c b/drivers/isdn/hardware/eicon/capifunc.c
index 639d70f..3bcb602 100644
--- a/drivers/isdn/hardware/eicon/capifunc.c
+++ b/drivers/isdn/hardware/eicon/capifunc.c
@@ -18,6 +18,7 @@
#include "divacapi.h"
#include "divasync.h"
#include "capifunc.h"
+#include "dadapter.h"
#define DBG_MINIMUM (DL_LOG + DL_FTL + DL_ERR)
#define DBG_DEFAULT (DBG_MINIMUM + DL_XLOG + DL_REG)
@@ -55,8 +56,6 @@ static char *diva_procinfo(struct capi_ctr *);
static u16 diva_send_message(struct capi_ctr *,
diva_os_message_buffer_s *);
-extern void DIVA_DIDD_Read(DESCRIPTOR *, int);
-
/*
* debug
*/
diff --git a/drivers/isdn/hardware/eicon/dadapter.h b/drivers/isdn/hardware/eicon/dadapter.h
index 5540f46..f6cdebf 100644
--- a/drivers/isdn/hardware/eicon/dadapter.h
+++ b/drivers/isdn/hardware/eicon/dadapter.h
@@ -28,6 +28,7 @@
void diva_didd_load_time_init(void);
void diva_didd_load_time_finit(void);
+void IDI_CALL_LINK_T DIVA_DIDD_Read(void IDI_CALL_ENTITY_T *buffer, int length);
#define NEW_MAX_DESCRIPTORS 64
diff --git a/drivers/isdn/hardware/eicon/diddfunc.c b/drivers/isdn/hardware/eicon/diddfunc.c
index b0b23ed..a8a229f 100644
--- a/drivers/isdn/hardware/eicon/diddfunc.c
+++ b/drivers/isdn/hardware/eicon/diddfunc.c
@@ -20,7 +20,6 @@
#define DBG_DEFAULT (DBG_MINIMUM + DL_XLOG + DL_REG)
-extern void DIVA_DIDD_Read(void *, int);
extern char *DRIVERRELEASE_DIDD;
static dword notify_handle;
static DESCRIPTOR _DAdapter;
diff --git a/drivers/isdn/hardware/eicon/diva_didd.c b/drivers/isdn/hardware/eicon/diva_didd.c
index 56d32a7..b8e525f 100644
--- a/drivers/isdn/hardware/eicon/diva_didd.c
+++ b/drivers/isdn/hardware/eicon/diva_didd.c
@@ -39,8 +39,6 @@ MODULE_LICENSE("GPL");
#define DBG_MINIMUM (DL_LOG + DL_FTL + DL_ERR)
#define DBG_DEFAULT (DBG_MINIMUM + DL_XLOG + DL_REG)
-extern void DIVA_DIDD_Read(void *, int);
-
static struct proc_dir_entry *proc_didd;
struct proc_dir_entry *proc_net_eicon = NULL;
diff --git a/drivers/isdn/hardware/eicon/divasfunc.c b/drivers/isdn/hardware/eicon/divasfunc.c
index 4be5f88..a5d44d0 100644
--- a/drivers/isdn/hardware/eicon/divasfunc.c
+++ b/drivers/isdn/hardware/eicon/divasfunc.c
@@ -17,14 +17,13 @@
#include "divasync.h"
#include "diva.h"
#include "xdi_vers.h"
+#include "dadapter.h"
#define DBG_MINIMUM (DL_LOG + DL_FTL + DL_ERR)
#define DBG_DEFAULT (DBG_MINIMUM + DL_XLOG + DL_REG)
static int debugmask;
-extern void DIVA_DIDD_Read(void *, int);
-
extern PISDN_ADAPTER IoAdapters[MAX_ADAPTER];
extern char *DRIVERRELEASE_DIVAS;
diff --git a/drivers/isdn/hardware/eicon/idifunc.c b/drivers/isdn/hardware/eicon/idifunc.c
index bacab74..dc79095 100644
--- a/drivers/isdn/hardware/eicon/idifunc.c
+++ b/drivers/isdn/hardware/eicon/idifunc.c
@@ -15,14 +15,13 @@
#include "divasync.h"
#include "um_xdi.h"
#include "um_idi.h"
+#include "dadapter.h"
#define DBG_MINIMUM (DL_LOG + DL_FTL + DL_ERR)
#define DBG_DEFAULT (DBG_MINIMUM + DL_XLOG + DL_REG)
extern char *DRIVERRELEASE_IDI;
-extern void DIVA_DIDD_Read(void *, int);
-
static dword notify_handle;
static DESCRIPTOR DAdapter;
static DESCRIPTOR MAdapter;
diff --git a/drivers/isdn/hardware/eicon/mntfunc.c b/drivers/isdn/hardware/eicon/mntfunc.c
index e304a1d..be47431 100644
--- a/drivers/isdn/hardware/eicon/mntfunc.c
+++ b/drivers/isdn/hardware/eicon/mntfunc.c
@@ -15,14 +15,13 @@
#include "di_defs.h"
#include "divasync.h"
#include "debug_if.h"
+#include "dadapter.h"
extern char *DRIVERRELEASE_MNT;
#define DBG_MINIMUM (DL_LOG + DL_FTL + DL_ERR)
#define DBG_DEFAULT (DBG_MINIMUM + DL_XLOG + DL_REG)
-extern void DIVA_DIDD_Read(void *, int);
-
static dword notify_handle;
static DESCRIPTOR DAdapter;
static DESCRIPTOR MAdapter;
--
1.7.9.5
Move prototype declaration of functions to header file
hardware/eicon/platform.h because they are used by more than one file.
This elliminates the following warnings in hardware/eicon/divasproc.c:
drivers/isdn/hardware/eicon/divasproc.c:125:5: warning: no previous prototype for ‘create_divas_proc’ [-Wmissing-prototypes]
drivers/isdn/hardware/eicon/divasproc.c:135:6: warning: no previous prototype for ‘remove_divas_proc’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
---
drivers/isdn/hardware/eicon/divasmain.c | 3 ---
drivers/isdn/hardware/eicon/platform.h | 2 ++
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/isdn/hardware/eicon/divasmain.c b/drivers/isdn/hardware/eicon/divasmain.c
index 6b15670..3b1e5bc 100644
--- a/drivers/isdn/hardware/eicon/divasmain.c
+++ b/drivers/isdn/hardware/eicon/divasmain.c
@@ -55,9 +55,6 @@ static char *DRIVERLNAME = "divas";
static char *DEVNAME = "Divas";
char *DRIVERRELEASE_DIVAS = "2.0";
-extern int create_divas_proc(void);
-extern void remove_divas_proc(void);
-
typedef struct _diva_os_thread_dpc {
struct tasklet_struct divas_task;
diva_os_soft_isr_t *psoft_isr;
diff --git a/drivers/isdn/hardware/eicon/platform.h b/drivers/isdn/hardware/eicon/platform.h
index 6bec7db..800b8bd 100644
--- a/drivers/isdn/hardware/eicon/platform.h
+++ b/drivers/isdn/hardware/eicon/platform.h
@@ -161,6 +161,8 @@ void diva_xdi_didd_remove_adapter(int card);
void diva_get_vserial_number(PISDN_ADAPTER IoAdapter, char *buf);
int divasfunc_init(int dbgmask);
void divasfunc_exit(void);
+int create_divas_proc(void);
+void remove_divas_proc(void);
/*
** memory allocation
--
1.7.9.5
From: Rashika Kheria
> Move prototype declarations of function to header file
> hardware/eicon/platform.h because they are used by more than one file.
>
> This eliminates the following warnings in hardware/eicon/diddfunc.c:
> drivers/isdn/hardware/eicon/diddfunc.c:95:12: warning: no previous prototype for diddfunc_init [-
> Wmissing-prototypes]
> drivers/isdn/hardware/eicon/diddfunc.c:110:13: warning: no previous prototype for diddfunc_finit [-
> Wmissing-prototypes]
...
> diff --git a/drivers/isdn/hardware/eicon/diva_didd.c b/drivers/isdn/hardware/eicon/diva_didd.c
> index fab6ccf..56d32a7 100644
> --- a/drivers/isdn/hardware/eicon/diva_didd.c
> +++ b/drivers/isdn/hardware/eicon/diva_didd.c
> @@ -39,9 +39,6 @@ MODULE_LICENSE("GPL");
> #define DBG_MINIMUM (DL_LOG + DL_FTL + DL_ERR)
> #define DBG_DEFAULT (DBG_MINIMUM + DL_XLOG + DL_REG)
>
> -extern int diddfunc_init(void);
> -extern void diddfunc_finit(void);
> -
> extern void DIVA_DIDD_Read(void *, int);
You should move that one as well.
There really shouldn't be 'extern' definitions for any function in
any C files since you want the compiler to check they are correct
when the function itself is compiled.
David
????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m????????????I?
On Fri, Feb 07, 2014 at 01:33:46PM +0000, David Laight wrote:
> From: Rashika Kheria
> > Move prototype declarations of function to header file
> > hardware/eicon/platform.h because they are used by more than one file.
> >
> > This eliminates the following warnings in hardware/eicon/diddfunc.c:
> > drivers/isdn/hardware/eicon/diddfunc.c:95:12: warning: no previous prototype for diddfunc_init [-
> > Wmissing-prototypes]
> > drivers/isdn/hardware/eicon/diddfunc.c:110:13: warning: no previous prototype for diddfunc_finit [-
> > Wmissing-prototypes]
> ...
> > diff --git a/drivers/isdn/hardware/eicon/diva_didd.c b/drivers/isdn/hardware/eicon/diva_didd.c
> > index fab6ccf..56d32a7 100644
> > --- a/drivers/isdn/hardware/eicon/diva_didd.c
> > +++ b/drivers/isdn/hardware/eicon/diva_didd.c
> > @@ -39,9 +39,6 @@ MODULE_LICENSE("GPL");
> > #define DBG_MINIMUM (DL_LOG + DL_FTL + DL_ERR)
> > #define DBG_DEFAULT (DBG_MINIMUM + DL_XLOG + DL_REG)
> >
> > -extern int diddfunc_init(void);
> > -extern void diddfunc_finit(void);
> > -
> > extern void DIVA_DIDD_Read(void *, int);
>
> You should move that one as well.
> There really shouldn't be 'extern' definitions for any function in
> any C files since you want the compiler to check they are correct
> when the function itself is compiled.
Absolutely, but as far as I can tell Rashika is doing this
incrementally, organized more by header than by source file, so I'd
expect a few externs in a source file to disappear at a time rather than
all in one patch.
- Josh Triplett
From: Josh Triplett
> On Fri, Feb 07, 2014 at 01:33:46PM +0000, David Laight wrote:
> > From: Rashika Kheria
> > > Move prototype declarations of function to header file
> > > hardware/eicon/platform.h because they are used by more than one file.
> > >
> > > This eliminates the following warnings in hardware/eicon/diddfunc.c:
> > > drivers/isdn/hardware/eicon/diddfunc.c:95:12: warning: no previous prototype for diddfunc_init [-
> > > Wmissing-prototypes]
> > > drivers/isdn/hardware/eicon/diddfunc.c:110:13: warning: no previous prototype for diddfunc_finit
> [-
> > > Wmissing-prototypes]
> > ...
> > > diff --git a/drivers/isdn/hardware/eicon/diva_didd.c b/drivers/isdn/hardware/eicon/diva_didd.c
> > > index fab6ccf..56d32a7 100644
> > > --- a/drivers/isdn/hardware/eicon/diva_didd.c
> > > +++ b/drivers/isdn/hardware/eicon/diva_didd.c
> > > @@ -39,9 +39,6 @@ MODULE_LICENSE("GPL");
> > > #define DBG_MINIMUM (DL_LOG + DL_FTL + DL_ERR)
> > > #define DBG_DEFAULT (DBG_MINIMUM + DL_XLOG + DL_REG)
> > >
> > > -extern int diddfunc_init(void);
> > > -extern void diddfunc_finit(void);
> > > -
> > > extern void DIVA_DIDD_Read(void *, int);
> >
> > You should move that one as well.
> > There really shouldn't be 'extern' definitions for any function in
> > any C files since you want the compiler to check they are correct
> > when the function itself is compiled.
>
> Absolutely, but as far as I can tell Rashika is doing this
> incrementally, organized more by header than by source file, so I'd
> expect a few externs in a source file to disappear at a time rather than
> all in one patch.
Unless any actual bugs are found, I'd have thought a single patch for
each driver would be enough, maybe even one for the whole lot - depending
on how they are maintained.
The 26 patches already posted are a little excessive.
David
On Fri, Feb 07, 2014 at 05:22:58PM +0000, David Laight wrote:
> From: Josh Triplett
> > On Fri, Feb 07, 2014 at 01:33:46PM +0000, David Laight wrote:
> > > From: Rashika Kheria
> > > > Move prototype declarations of function to header file
> > > > hardware/eicon/platform.h because they are used by more than one file.
> > > >
> > > > This eliminates the following warnings in hardware/eicon/diddfunc.c:
> > > > drivers/isdn/hardware/eicon/diddfunc.c:95:12: warning: no previous prototype for diddfunc_init [-
> > > > Wmissing-prototypes]
> > > > drivers/isdn/hardware/eicon/diddfunc.c:110:13: warning: no previous prototype for diddfunc_finit
> > [-
> > > > Wmissing-prototypes]
> > > ...
> > > > diff --git a/drivers/isdn/hardware/eicon/diva_didd.c b/drivers/isdn/hardware/eicon/diva_didd.c
> > > > index fab6ccf..56d32a7 100644
> > > > --- a/drivers/isdn/hardware/eicon/diva_didd.c
> > > > +++ b/drivers/isdn/hardware/eicon/diva_didd.c
> > > > @@ -39,9 +39,6 @@ MODULE_LICENSE("GPL");
> > > > #define DBG_MINIMUM (DL_LOG + DL_FTL + DL_ERR)
> > > > #define DBG_DEFAULT (DBG_MINIMUM + DL_XLOG + DL_REG)
> > > >
> > > > -extern int diddfunc_init(void);
> > > > -extern void diddfunc_finit(void);
> > > > -
> > > > extern void DIVA_DIDD_Read(void *, int);
> > >
> > > You should move that one as well.
> > > There really shouldn't be 'extern' definitions for any function in
> > > any C files since you want the compiler to check they are correct
> > > when the function itself is compiled.
> >
> > Absolutely, but as far as I can tell Rashika is doing this
> > incrementally, organized more by header than by source file, so I'd
> > expect a few externs in a source file to disappear at a time rather than
> > all in one patch.
>
> Unless any actual bugs are found, I'd have thought a single patch for
> each driver would be enough, maybe even one for the whole lot - depending
> on how they are maintained.
> The 26 patches already posted are a little excessive.
These types of patches often seem to generate a non-trivial amount of
feedback (for instance, due to driver-specific organizational issues),
and breaking them up by groups of warnings has tended to avoid excessive
churn and review difficulty on a larger patch. Certainly as a reviewer
unfamiliar with isdn, I found this patch series far easier to review
than a larger patch would have been.
- Josh Triplett
Hello.
On 02/07/2014 03:18 PM, Rashika Kheria wrote:
> Rectify typing error while including the guard for the header
> file xdi_msg.h so that proper guard is wrapped around the file
> to prevent it from being included more than once.
> Signed-off-by: Rashika Kheria <[email protected]>
> Reviewed-by: Josh Triplett <[email protected]>
You need to specify "eicon: " in the patch subjects, else there's an
impression you're modifying the generic ISDN code instead of the concrete
driver. You might as well drop "drivers:".
WBR, Sergei