[svn-commits] sruffell: linux/trunk r9929 - in /linux/trunk/drivers/dahdi: ./ wcb4xxp/ wct4...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Jun 2 15:00:46 CDT 2011
Author: sruffell
Date: Thu Jun 2 15:00:36 2011
New Revision: 9929
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9929
Log:
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 at digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Modified:
linux/trunk/drivers/dahdi/dahdi-base.c
linux/trunk/drivers/dahdi/tor2.c
linux/trunk/drivers/dahdi/wcb4xxp/base.c
linux/trunk/drivers/dahdi/wct4xxp/base.c
linux/trunk/drivers/dahdi/wct4xxp/vpm450m.c
linux/trunk/drivers/dahdi/wctc4xxp/base.c
linux/trunk/drivers/dahdi/wctdm.c
linux/trunk/drivers/dahdi/wctdm24xxp/base.c
linux/trunk/drivers/dahdi/wctdm24xxp/xhfc.c
linux/trunk/drivers/dahdi/wcte12xp/base.c
linux/trunk/drivers/dahdi/xpp/card_bri.c
linux/trunk/drivers/dahdi/xpp/card_fxo.c
linux/trunk/drivers/dahdi/xpp/card_fxs.c
linux/trunk/drivers/dahdi/xpp/card_pri.c
linux/trunk/drivers/dahdi/xpp/xbus-core.c
linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c
linux/trunk/drivers/dahdi/xpp/xpp_usb.c
Modified: linux/trunk/drivers/dahdi/dahdi-base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=9929&r1=9928&r2=9929
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Thu Jun 2 15:00:36 2011
@@ -5196,7 +5196,6 @@
{
struct dahdi_chan *chan;
unsigned long flags;
- int rv;
int i;
int j;
int c;
@@ -5240,7 +5239,6 @@
pseudo->chan.channo, pseudo->chan.confmode);
}
spin_unlock_irqrestore(&chan_lock, flags);
- rv = 0;
if (c)
module_printk(KERN_NOTICE, "\n");
}
@@ -7714,7 +7712,7 @@
static void
__dahdi_ec_chunk(struct dahdi_chan *ss, u8 *rxchunk, const u8 *txchunk)
{
- short rxlin, txlin;
+ short rxlin;
int x;
if (ss->readchunkpreec) {
@@ -7733,7 +7731,6 @@
/* Special stuff for training the echo can */
for (x=0;x<DAHDI_CHUNKSIZE;x++) {
rxlin = DAHDI_XLAW(rxchunk[x], ss);
- txlin = DAHDI_XLAW(txchunk[x], ss);
if (ss->ec_state->status.mode == ECHO_MODE_PRETRAINING) {
if (--ss->ec_state->status.pretrain_timer <= 0) {
ss->ec_state->status.pretrain_timer = 0;
@@ -8449,7 +8446,6 @@
void dahdi_hdlc_putbuf(struct dahdi_chan *ss, unsigned char *rxb, int bytes)
{
unsigned long flags;
- int res;
int left;
spin_lock_irqsave(&ss->lock, flags);
@@ -8477,7 +8473,6 @@
#endif
__dahdi_hdlc_abort(ss, DAHDI_EVENT_OVERRUN);
}
- res = left;
spin_unlock_irqrestore(&ss->lock, flags);
}
Modified: linux/trunk/drivers/dahdi/tor2.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/tor2.c?view=diff&rev=9929&r1=9928&r2=9929
==============================================================================
--- linux/trunk/drivers/dahdi/tor2.c (original)
+++ linux/trunk/drivers/dahdi/tor2.c Thu Jun 2 15:00:36 2011
@@ -621,7 +621,7 @@
if (tor) {
free_tor(tor);
}
- return -ENODEV;
+ return ret;
}
static struct pci_driver tor2_driver;
Modified: linux/trunk/drivers/dahdi/wcb4xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wcb4xxp/base.c?view=diff&rev=9929&r1=9928&r2=9929
==============================================================================
--- linux/trunk/drivers/dahdi/wcb4xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wcb4xxp/base.c Thu Jun 2 15:00:36 2011
@@ -2603,13 +2603,12 @@
static void b4xxp_bottom_half(unsigned long data)
{
struct b4xxp *b4 = (struct b4xxp *)data;
- int i, j, k, gotrxfifo, fifo, fifo_low, fifo_high;
+ int i, j, k, fifo, fifo_low, fifo_high;
unsigned char b, b2;
if (b4->shutdown)
return;
- gotrxfifo = 0;
/* HFC-4S d-chan fifos 8-11 *** HFC-8S d-chan fifos 16-23 */
if (b4->numspans == 8) {
fifo_low = 16;
Modified: linux/trunk/drivers/dahdi/wct4xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wct4xxp/base.c?view=diff&rev=9929&r1=9928&r2=9929
==============================================================================
--- linux/trunk/drivers/dahdi/wct4xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wct4xxp/base.c Thu Jun 2 15:00:36 2011
@@ -4140,7 +4140,6 @@
static void t4_vpm450_init(struct t4 *wc)
{
- unsigned int check1, check2;
int laws[4] = { 0, };
int x;
unsigned int vpm_capacity;
@@ -4165,8 +4164,8 @@
t4_gpio_setdir(wc, (1 << 24), (1 << 24));
__t4_raw_oct_out(wc, 0x000a, 0x5678);
__t4_raw_oct_out(wc, 0x0004, 0x1234);
- check1 = __t4_raw_oct_in(wc, 0x0004);
- check2 = __t4_raw_oct_in(wc, 0x000a);
+ __t4_raw_oct_in(wc, 0x0004);
+ __t4_raw_oct_in(wc, 0x000a);
if (debug)
dev_notice(&wc->dev->dev, "OCT Result: %04x/%04x\n",
__t4_raw_oct_in(wc, 0x0004),
Modified: linux/trunk/drivers/dahdi/wct4xxp/vpm450m.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wct4xxp/vpm450m.c?view=diff&rev=9929&r1=9928&r2=9929
==============================================================================
--- linux/trunk/drivers/dahdi/wct4xxp/vpm450m.c (original)
+++ linux/trunk/drivers/dahdi/wct4xxp/vpm450m.c Thu Jun 2 15:00:36 2011
@@ -319,12 +319,11 @@
{
tOCT6100_TONE_EVENT tonefound;
tOCT6100_EVENT_GET_TONE tonesearch;
- UINT32 ulResult;
Oct6100EventGetToneDef(&tonesearch);
tonesearch.pToneEvent = &tonefound;
tonesearch.ulMaxToneEvent = 1;
- ulResult = Oct6100EventGetTone(vpm450m->pApiInstance, &tonesearch);
+ Oct6100EventGetTone(vpm450m->pApiInstance, &tonesearch);
if (tonesearch.ulNumValidToneEvent) {
if (channel)
*channel = tonefound.ulUserChanId;
Modified: linux/trunk/drivers/dahdi/wctc4xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wctc4xxp/base.c?view=diff&rev=9929&r1=9928&r2=9929
==============================================================================
--- linux/trunk/drivers/dahdi/wctc4xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wctc4xxp/base.c Thu Jun 2 15:00:36 2011
@@ -2868,7 +2868,6 @@
wctc4xxp_load_firmware(struct wcdte *wc, const struct firmware *firmware)
{
unsigned int byteloc;
- unsigned int last_byteloc;
unsigned int length;
struct tcb *cmd;
@@ -2883,7 +2882,6 @@
#endif
while (byteloc < (firmware->size-20)) {
- last_byteloc = byteloc;
length = (firmware->data[byteloc] << 8) |
firmware->data[byteloc+1];
byteloc += 2;
Modified: linux/trunk/drivers/dahdi/wctdm.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wctdm.c?view=diff&rev=9929&r1=9928&r2=9929
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm.c (original)
+++ linux/trunk/drivers/dahdi/wctdm.c Thu Jun 2 15:00:36 2011
@@ -619,13 +619,11 @@
static int __wait_access(struct wctdm *wc, int card)
{
unsigned char data = 0;
- long origjiffies;
int count = 0;
#define MAX 6000 /* attempts */
- origjiffies = jiffies;
/* Wait for indirect access */
while (count++ < MAX)
{
Modified: linux/trunk/drivers/dahdi/wctdm24xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=9929&r1=9928&r2=9929
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm24xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wctdm24xxp/base.c Thu Jun 2 15:00:36 2011
@@ -288,12 +288,9 @@
setchanconfig_from_state(struct vpmadt032 *vpm, int channel,
GpakChannelConfig_t *chanconfig)
{
- const struct vpmadt032_options *options;
GpakEcanParms_t *p;
BUG_ON(!vpm);
-
- options = &vpm->options;
chanconfig->PcmInPortA = 3;
chanconfig->PcmInSlotA = channel;
Modified: linux/trunk/drivers/dahdi/wctdm24xxp/xhfc.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wctdm24xxp/xhfc.c?view=diff&rev=9929&r1=9928&r2=9929
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm24xxp/xhfc.c (original)
+++ linux/trunk/drivers/dahdi/wctdm24xxp/xhfc.c Thu Jun 2 15:00:36 2011
@@ -1676,10 +1676,8 @@
static int hdlc_start(struct b400m *b4, int fifo);
static void hfc_init_all_st(struct b400m *b4)
{
- int i, gpio;
+ int i;
struct b400m_span *s;
-
- gpio = 0;
for (i = 0; i < 4; i++) {
s = &b4->spans[i];
@@ -2519,7 +2517,6 @@
/* DAHDI calls this when it has data it wants to send to the HDLC controller */
void wctdm_hdlc_hard_xmit(struct dahdi_chan *chan)
{
- struct wctdm *wc;
struct b400m *b4;
struct b400m_span *bspan;
struct dahdi_span *dspan;
@@ -2528,7 +2525,6 @@
dspan = chan->span;
bspan = bspan_from_dspan(dspan);
b4 = bspan->parent;
- wc = b4->wc;
span = bspan->port;
if ((DBG_FOPS || DBG_HDLC) && DBG_SPANFILTER) {
Modified: linux/trunk/drivers/dahdi/wcte12xp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wcte12xp/base.c?view=diff&rev=9929&r1=9928&r2=9929
==============================================================================
--- linux/trunk/drivers/dahdi/wcte12xp/base.c (original)
+++ linux/trunk/drivers/dahdi/wcte12xp/base.c Thu Jun 2 15:00:36 2011
@@ -1329,12 +1329,9 @@
setchanconfig_from_state(struct vpmadt032 *vpm, int channel,
GpakChannelConfig_t *chanconfig)
{
- const struct vpmadt032_options *options;
GpakEcanParms_t *p;
BUG_ON(!vpm);
-
- options = &vpm->options;
chanconfig->PcmInPortA = 3;
chanconfig->PcmInSlotA = (channel + 1) * 2;
Modified: linux/trunk/drivers/dahdi/xpp/card_bri.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/card_bri.c?view=diff&rev=9929&r1=9928&r2=9929
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/card_bri.c (original)
+++ linux/trunk/drivers/dahdi/xpp/card_bri.c Thu Jun 2 15:00:36 2011
@@ -344,14 +344,12 @@
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 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 @@
#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_remove(xbus_t *xbus, xpd_t *xpd)
{
- struct BRI_priv_data *priv;
-
- BUG_ON(!xpd);
- priv = xpd->priv;
+ BUG_ON(!xpd);
XPD_DBG(GENERAL, xpd, "\n");
bri_proc_remove(xbus, xpd);
return 0;
@@ -934,11 +926,9 @@
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_open(xpd_t *xpd, lineno_t pos)
{
- struct BRI_priv_data *priv;
-
- BUG_ON(!xpd);
- priv = xpd->priv;
+ BUG_ON(!xpd);
if(pos == 2) {
LINE_DBG(SIGNAL, xpd, pos, "OFFHOOK the whole span\n");
BIT_SET(PHONEDEV(xpd).offhook_state, 0);
@@ -1487,14 +1474,12 @@
/*---------------- 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;
Modified: linux/trunk/drivers/dahdi/xpp/card_fxo.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/card_fxo.c?view=diff&rev=9929&r1=9928&r2=9929
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/card_fxo.c (original)
+++ linux/trunk/drivers/dahdi/xpp/card_fxo.c Thu Jun 2 15:00:36 2011
@@ -486,10 +486,7 @@
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 int FXO_card_open(xpd_t *xpd, lineno_t chan)
{
- struct FXO_priv_data *priv;
-
BUG_ON(!xpd);
- priv = xpd->priv;
return 0;
}
Modified: linux/trunk/drivers/dahdi/xpp/card_fxs.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/card_fxs.c?view=diff&rev=9929&r1=9928&r2=9929
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/card_fxs.c (original)
+++ linux/trunk/drivers/dahdi/xpp/card_fxs.c Thu Jun 2 15:00:36 2011
@@ -423,12 +423,10 @@
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 @@
static int FXS_card_remove(xbus_t *xbus, xpd_t *xpd)
{
- struct FXS_priv_data *priv;
-
- BUG_ON(!xpd);
- priv = xpd->priv;
+ BUG_ON(!xpd);
XPD_DBG(GENERAL, xpd, "\n");
fxs_proc_remove(xbus, xpd);
return 0;
Modified: linux/trunk/drivers/dahdi/xpp/card_pri.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/card_pri.c?view=diff&rev=9929&r1=9928&r2=9929
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/card_pri.c (original)
+++ linux/trunk/drivers/dahdi/xpp/card_pri.c Thu Jun 2 15:00:36 2011
@@ -747,11 +747,8 @@
*/
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 @@
{
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 @@
static int PRI_card_remove(xbus_t *xbus, xpd_t *xpd)
{
- struct PRI_priv_data *priv;
-
- BUG_ON(!xpd);
- priv = xpd->priv;
+ BUG_ON(!xpd);
XPD_DBG(GENERAL, xpd, "\n");
return 0;
}
@@ -1278,11 +1270,9 @@
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);
Modified: linux/trunk/drivers/dahdi/xpp/xbus-core.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xbus-core.c?view=diff&rev=9929&r1=9928&r2=9929
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xbus-core.c (original)
+++ linux/trunk/drivers/dahdi/xpp/xbus-core.c Thu Jun 2 15:00:36 2011
@@ -1453,7 +1453,6 @@
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 @@
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,
Modified: linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c?view=diff&rev=9929&r1=9928&r2=9929
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c (original)
+++ linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c Thu Jun 2 15:00:36 2011
@@ -275,13 +275,11 @@
{
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 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);
Modified: linux/trunk/drivers/dahdi/xpp/xpp_usb.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xpp_usb.c?view=diff&rev=9929&r1=9928&r2=9929
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xpp_usb.c (original)
+++ linux/trunk/drivers/dahdi/xpp/xpp_usb.c Thu Jun 2 15:00:36 2011
@@ -816,7 +816,6 @@
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 @@
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 @@
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 @@
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;
More information about the svn-commits
mailing list