diff options
author | Shaun Ruffell <sruffell@digium.com> | 2011-06-02 20:00:36 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2011-06-02 20:00:36 +0000 |
commit | f6ad12112070dcf07952a04f53f35060fcee5ac9 (patch) | |
tree | 3878c6f64274cf0d0cd5eafd5b4b98e050b09d9a /drivers/dahdi/xpp | |
parent | 92bdc098861b2c8e817bb778afe6de171dc14d8b (diff) |
Remove unused variables.
gcc-4.6 now warns about variables that are set but never used. Clean up
unused variables everywhere except the oct612x subdirectory.
The oct612x should go in a separate patch in case that needs to be
pulled out into a separate project again.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9929 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/xpp')
-rw-r--r-- | drivers/dahdi/xpp/card_bri.c | 15 | ||||
-rw-r--r-- | drivers/dahdi/xpp/card_fxo.c | 6 | ||||
-rw-r--r-- | drivers/dahdi/xpp/card_fxs.c | 5 | ||||
-rw-r--r-- | drivers/dahdi/xpp/card_pri.c | 10 | ||||
-rw-r--r-- | drivers/dahdi/xpp/xbus-core.c | 2 | ||||
-rw-r--r-- | drivers/dahdi/xpp/xpp_dahdi.c | 5 | ||||
-rw-r--r-- | drivers/dahdi/xpp/xpp_usb.c | 4 |
7 files changed, 0 insertions, 47 deletions
diff --git a/drivers/dahdi/xpp/card_bri.c b/drivers/dahdi/xpp/card_bri.c index 014ae0a..7e4ae9a 100644 --- a/drivers/dahdi/xpp/card_bri.c +++ b/drivers/dahdi/xpp/card_bri.c @@ -344,14 +344,12 @@ static void layer1_state(xpd_t *xpd, bool up) static void te_activation(xpd_t *xpd, bool on) { struct BRI_priv_data *priv; - xbus_t *xbus; byte curr_state; BUG_ON(!xpd); priv = xpd->priv; BUG_ON(!priv); curr_state = priv->state_register.bits.v_su_sta; - xbus = xpd->xbus; XPD_DBG(SIGNAL, xpd, "%s\n", (on)?"ON":"OFF"); if(on) { if(curr_state == ST_TE_DEACTIVATED) { @@ -389,14 +387,12 @@ static void te_activation(xpd_t *xpd, bool on) static void nt_activation(xpd_t *xpd, bool on) { struct BRI_priv_data *priv; - xbus_t *xbus; byte curr_state; BUG_ON(!xpd); priv = xpd->priv; BUG_ON(!priv); curr_state = priv->state_register.bits.v_su_sta; - xbus = xpd->xbus; XPD_DBG(SIGNAL, xpd, "%s\n", (on)?"ON":"OFF"); if(on) { switch(curr_state) { @@ -541,7 +537,6 @@ static void bri_hdlc_finish(xpd_t *xpd, struct dahdi_chan *dchan) #ifdef CONFIG_DAHDI_BRI_DCHANS static int rx_dchan(xpd_t *xpd, reg_cmd_t *regcmd) { - xbus_t *xbus; struct BRI_priv_data *priv; byte *src; byte *dst; @@ -846,10 +841,7 @@ static int BRI_card_init(xbus_t *xbus, xpd_t *xpd) static int BRI_card_remove(xbus_t *xbus, xpd_t *xpd) { - struct BRI_priv_data *priv; - BUG_ON(!xpd); - priv = xpd->priv; XPD_DBG(GENERAL, xpd, "\n"); bri_proc_remove(xbus, xpd); return 0; @@ -934,11 +926,9 @@ static int BRI_card_dahdi_preregistration(xpd_t *xpd, bool on) static int BRI_card_dahdi_postregistration(xpd_t *xpd, bool on) { xbus_t *xbus; - struct BRI_priv_data *priv; BUG_ON(!xpd); xbus = xpd->xbus; - priv = xpd->priv; BUG_ON(!xbus); XPD_DBG(GENERAL, xpd, "%s\n", (on)?"on":"off"); return(0); @@ -1139,10 +1129,7 @@ static int BRI_card_ioctl(xpd_t *xpd, int pos, unsigned int cmd, unsigned long a static int BRI_card_open(xpd_t *xpd, lineno_t pos) { - struct BRI_priv_data *priv; - BUG_ON(!xpd); - priv = xpd->priv; if(pos == 2) { LINE_DBG(SIGNAL, xpd, pos, "OFFHOOK the whole span\n"); BIT_SET(PHONEDEV(xpd).offhook_state, 0); @@ -1487,14 +1474,12 @@ static int write_state_register(xpd_t *xpd, byte value) /*---------------- BRI: Astribank Reply Handlers --------------------------*/ static void su_new_state(xpd_t *xpd, byte reg_x30) { - xbus_t *xbus; struct BRI_priv_data *priv; su_rd_sta_t new_state; BUG_ON(!xpd); priv = xpd->priv; BUG_ON(!priv); - xbus = xpd->xbus; if(!priv->initialized) { XPD_ERR(xpd, "%s called on uninitialized AB\n", __FUNCTION__); return; diff --git a/drivers/dahdi/xpp/card_fxo.c b/drivers/dahdi/xpp/card_fxo.c index 2da9584..f533ac6 100644 --- a/drivers/dahdi/xpp/card_fxo.c +++ b/drivers/dahdi/xpp/card_fxo.c @@ -486,10 +486,7 @@ static int FXO_card_init(xbus_t *xbus, xpd_t *xpd) static int FXO_card_remove(xbus_t *xbus, xpd_t *xpd) { - struct FXO_priv_data *priv; - BUG_ON(!xpd); - priv = xpd->priv; XPD_DBG(GENERAL, xpd, "\n"); fxo_proc_remove(xbus, xpd); return 0; @@ -604,10 +601,7 @@ static void dahdi_report_battery(xpd_t *xpd, lineno_t chan) static int FXO_card_open(xpd_t *xpd, lineno_t chan) { - struct FXO_priv_data *priv; - BUG_ON(!xpd); - priv = xpd->priv; return 0; } diff --git a/drivers/dahdi/xpp/card_fxs.c b/drivers/dahdi/xpp/card_fxs.c index 50814a1..03e3d49 100644 --- a/drivers/dahdi/xpp/card_fxs.c +++ b/drivers/dahdi/xpp/card_fxs.c @@ -423,12 +423,10 @@ err: static int FXS_card_init(xbus_t *xbus, xpd_t *xpd) { - struct FXS_priv_data *priv; int ret = 0; int i; BUG_ON(!xpd); - priv = xpd->priv; /* * Setup ring timers */ @@ -473,10 +471,7 @@ err: static int FXS_card_remove(xbus_t *xbus, xpd_t *xpd) { - struct FXS_priv_data *priv; - BUG_ON(!xpd); - priv = xpd->priv; XPD_DBG(GENERAL, xpd, "\n"); fxs_proc_remove(xbus, xpd); return 0; diff --git a/drivers/dahdi/xpp/card_pri.c b/drivers/dahdi/xpp/card_pri.c index 8e88b7e..a2f755f 100644 --- a/drivers/dahdi/xpp/card_pri.c +++ b/drivers/dahdi/xpp/card_pri.c @@ -747,11 +747,8 @@ static void set_reg_lim0(const char *msg, xpd_t *xpd) */ static int set_master_mode(const char *msg, xpd_t *xpd) { - struct PRI_priv_data *priv; - BUG_ON(!xpd); XPD_DBG(SIGNAL, xpd, "\n"); - priv = xpd->priv; set_reg_lim0(__FUNCTION__, xpd); set_clocking(xpd); return 0; @@ -1143,12 +1140,10 @@ static int PRI_card_init(xbus_t *xbus, xpd_t *xpd) { struct PRI_priv_data *priv; int ret = 0; - xproto_table_t *proto_table; BUG_ON(!xpd); XPD_DBG(GENERAL, xpd, "\n"); xpd->type = XPD_TYPE_PRI; - proto_table = &PROTO_TABLE(PRI); priv = xpd->priv; if(priv->pri_protocol == PRI_PROTO_0) { /* @@ -1187,10 +1182,7 @@ err: static int PRI_card_remove(xbus_t *xbus, xpd_t *xpd) { - struct PRI_priv_data *priv; - BUG_ON(!xpd); - priv = xpd->priv; XPD_DBG(GENERAL, xpd, "\n"); return 0; } @@ -1278,11 +1270,9 @@ static int PRI_card_dahdi_preregistration(xpd_t *xpd, bool on) static int PRI_card_dahdi_postregistration(xpd_t *xpd, bool on) { xbus_t *xbus; - struct PRI_priv_data *priv; BUG_ON(!xpd); xbus = xpd->xbus; - priv = xpd->priv; BUG_ON(!xbus); XPD_DBG(GENERAL, xpd, "%s\n", (on)?"on":"off"); dahdi_update_syncsrc(xpd); diff --git a/drivers/dahdi/xpp/xbus-core.c b/drivers/dahdi/xpp/xbus-core.c index bd4a003..d558a75 100644 --- a/drivers/dahdi/xpp/xbus-core.c +++ b/drivers/dahdi/xpp/xbus-core.c @@ -1453,7 +1453,6 @@ static int xbus_fill_proc_queue(char *p, struct xframe_queue *q) static int xbus_read_proc(char *page, char **start, off_t off, int count, int *eof, void *data) { xbus_t *xbus; - struct xbus_workqueue *worker; unsigned long flags; int len = 0; int i = (int)((unsigned long)data); @@ -1462,7 +1461,6 @@ static int xbus_read_proc(char *page, char **start, off_t off, int count, int *e if(!xbus) goto out; spin_lock_irqsave(&xbus->lock, flags); - worker = &xbus->worker; len += sprintf(page + len, "%s: CONNECTOR=%s LABEL=[%s] STATUS=%s\n", xbus->busname, diff --git a/drivers/dahdi/xpp/xpp_dahdi.c b/drivers/dahdi/xpp/xpp_dahdi.c index ecbaf49..89adf51 100644 --- a/drivers/dahdi/xpp/xpp_dahdi.c +++ b/drivers/dahdi/xpp/xpp_dahdi.c @@ -275,13 +275,11 @@ static int xpd_read_proc(char *page, char **start, off_t off, int count, int *eo { int len = 0; xpd_t *xpd = data; - xbus_t *xbus; int i; if(!xpd) goto out; - xbus = xpd->xbus; len += sprintf(page + len, "%s (%s, card %s, span %d)\n" "timing_priority: %d\n" "timer_count: %d span->mainttimer=%d\n" @@ -606,10 +604,7 @@ void xbus_request_removal(xbus_t *xbus) */ void xpd_remove(xpd_t *xpd) { - xbus_t *xbus; - BUG_ON(!xpd); - xbus = xpd->xbus; XPD_INFO(xpd, "Remove\n"); dahdi_unregister_xpd(xpd); CALL_XMETHOD(card_remove, xpd); diff --git a/drivers/dahdi/xpp/xpp_usb.c b/drivers/dahdi/xpp/xpp_usb.c index f2eb9ad..119abcb 100644 --- a/drivers/dahdi/xpp/xpp_usb.c +++ b/drivers/dahdi/xpp/xpp_usb.c @@ -816,7 +816,6 @@ static void xusb_disconnect(struct usb_interface *interface) struct usb_host_interface *iface_desc = usb_altnum_to_altsetting(interface, 0); xusb_t *xusb; xbus_t *xbus; - int minor; int i; DBG(DEVICES, "CALLED on interface #%d\n", iface_desc->desc.bInterfaceNumber); @@ -845,7 +844,6 @@ static void xusb_disconnect(struct usb_interface *interface) xbus_disconnect(xbus); // Blocking until fully deactivated! down (&xusb->sem); - minor = xusb->minor; /* give back our minor */ usb_deregister_dev(interface, &xusb_class); @@ -924,7 +922,6 @@ static void xpp_receive_callback(USB_PASS_CB(urb)) xbus_t *xbus = xbus_num(xusb->xbus_num); size_t size; bool do_resubmit = 1; - bool is_inuse = 0; struct timeval now; do_gettimeofday(&now); @@ -933,7 +930,6 @@ static void xpp_receive_callback(USB_PASS_CB(urb)) XUSB_ERR(xusb, "Received URB does not belong to a valid xbus anymore...\n"); return; } - is_inuse = 1; if(!xusb->present) { do_resubmit = 0; goto err; |