Skip to content

Commit d65c57f

Browse files
Jiri Slabygregkh
authored andcommitted
TTY: rocket, remove unused variables
drivers/tty/rocket.c:1393:2: warning: Value stored to 'cp' is never read cp = &info->channel; ^ ~~~~~~~~~~~~~~ drivers/tty/rocket.c:1412:2: warning: Value stored to 'cp' is never read cp = &info->channel; ^ ~~~~~~~~~~~~~~ drivers/tty/rocket.c:1730:2: warning: Value stored to 'cp' is never read cp = &info->channel; ^ ~~~~~~~~~~~~~~ drivers/tty/rocket.c:1825:3: warning: Value stored to 'str' is never read str = "8"; ^ ~~~ [many 'str' warnings stripped] drivers/tty/rocket.c:2037:3: warning: Value stored to 'board_type' is never read board_type = "RocketModem"; ^ ~~~~~~~~~~~~~ [some 'board_type' warnings stripped] Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1 parent 9d86f71 commit d65c57f

1 file changed

Lines changed: 0 additions & 47 deletions

File tree

‎drivers/tty/rocket.c‎

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1380,7 +1380,6 @@ static void rp_send_xchar(struct tty_struct *tty, char ch)
13801380
static void rp_throttle(struct tty_struct *tty)
13811381
{
13821382
struct r_port *info = tty->driver_data;
1383-
CHANNEL_t *cp;
13841383

13851384
#ifdef ROCKET_DEBUG_THROTTLE
13861385
printk(KERN_INFO "throttle %s: %d....\n", tty->name,
@@ -1390,7 +1389,6 @@ static void rp_throttle(struct tty_struct *tty)
13901389
if (rocket_paranoia_check(info, "rp_throttle"))
13911390
return;
13921391

1393-
cp = &info->channel;
13941392
if (I_IXOFF(tty))
13951393
rp_send_xchar(tty, STOP_CHAR(tty));
13961394

@@ -1400,7 +1398,6 @@ static void rp_throttle(struct tty_struct *tty)
14001398
static void rp_unthrottle(struct tty_struct *tty)
14011399
{
14021400
struct r_port *info = tty->driver_data;
1403-
CHANNEL_t *cp;
14041401
#ifdef ROCKET_DEBUG_THROTTLE
14051402
printk(KERN_INFO "unthrottle %s: %d....\n", tty->name,
14061403
tty->ldisc.chars_in_buffer(tty));
@@ -1409,7 +1406,6 @@ static void rp_unthrottle(struct tty_struct *tty)
14091406
if (rocket_paranoia_check(info, "rp_throttle"))
14101407
return;
14111408

1412-
cp = &info->channel;
14131409
if (I_IXOFF(tty))
14141410
rp_send_xchar(tty, START_CHAR(tty));
14151411

@@ -1722,13 +1718,10 @@ static int rp_write_room(struct tty_struct *tty)
17221718
static int rp_chars_in_buffer(struct tty_struct *tty)
17231719
{
17241720
struct r_port *info = tty->driver_data;
1725-
CHANNEL_t *cp;
17261721

17271722
if (rocket_paranoia_check(info, "rp_chars_in_buffer"))
17281723
return 0;
17291724

1730-
cp = &info->channel;
1731-
17321725
#ifdef ROCKET_DEBUG_WRITE
17331726
printk(KERN_INFO "rp_chars_in_buffer returns %d...\n", info->xmit_cnt);
17341727
#endif
@@ -1779,7 +1772,6 @@ static __init int register_PCI(int i, struct pci_dev *dev)
17791772
{
17801773
int num_aiops, aiop, max_num_aiops, num_chan, chan;
17811774
unsigned int aiopio[MAX_AIOPS_PER_BOARD];
1782-
char *str, *board_type;
17831775
CONTROLLER_t *ctlp;
17841776

17851777
int fast_clock = 0;
@@ -1800,107 +1792,92 @@ static __init int register_PCI(int i, struct pci_dev *dev)
18001792
/* Depending on the model, set up some config variables */
18011793
switch (dev->device) {
18021794
case PCI_DEVICE_ID_RP4QUAD:
1803-
str = "Quadcable";
18041795
max_num_aiops = 1;
18051796
ports_per_aiop = 4;
18061797
rocketModel[i].model = MODEL_RP4QUAD;
18071798
strcpy(rocketModel[i].modelString, "RocketPort 4 port w/quad cable");
18081799
rocketModel[i].numPorts = 4;
18091800
break;
18101801
case PCI_DEVICE_ID_RP8OCTA:
1811-
str = "Octacable";
18121802
max_num_aiops = 1;
18131803
rocketModel[i].model = MODEL_RP8OCTA;
18141804
strcpy(rocketModel[i].modelString, "RocketPort 8 port w/octa cable");
18151805
rocketModel[i].numPorts = 8;
18161806
break;
18171807
case PCI_DEVICE_ID_URP8OCTA:
1818-
str = "Octacable";
18191808
max_num_aiops = 1;
18201809
rocketModel[i].model = MODEL_UPCI_RP8OCTA;
18211810
strcpy(rocketModel[i].modelString, "RocketPort UPCI 8 port w/octa cable");
18221811
rocketModel[i].numPorts = 8;
18231812
break;
18241813
case PCI_DEVICE_ID_RP8INTF:
1825-
str = "8";
18261814
max_num_aiops = 1;
18271815
rocketModel[i].model = MODEL_RP8INTF;
18281816
strcpy(rocketModel[i].modelString, "RocketPort 8 port w/external I/F");
18291817
rocketModel[i].numPorts = 8;
18301818
break;
18311819
case PCI_DEVICE_ID_URP8INTF:
1832-
str = "8";
18331820
max_num_aiops = 1;
18341821
rocketModel[i].model = MODEL_UPCI_RP8INTF;
18351822
strcpy(rocketModel[i].modelString, "RocketPort UPCI 8 port w/external I/F");
18361823
rocketModel[i].numPorts = 8;
18371824
break;
18381825
case PCI_DEVICE_ID_RP8J:
1839-
str = "8J";
18401826
max_num_aiops = 1;
18411827
rocketModel[i].model = MODEL_RP8J;
18421828
strcpy(rocketModel[i].modelString, "RocketPort 8 port w/RJ11 connectors");
18431829
rocketModel[i].numPorts = 8;
18441830
break;
18451831
case PCI_DEVICE_ID_RP4J:
1846-
str = "4J";
18471832
max_num_aiops = 1;
18481833
ports_per_aiop = 4;
18491834
rocketModel[i].model = MODEL_RP4J;
18501835
strcpy(rocketModel[i].modelString, "RocketPort 4 port w/RJ45 connectors");
18511836
rocketModel[i].numPorts = 4;
18521837
break;
18531838
case PCI_DEVICE_ID_RP8SNI:
1854-
str = "8 (DB78 Custom)";
18551839
max_num_aiops = 1;
18561840
rocketModel[i].model = MODEL_RP8SNI;
18571841
strcpy(rocketModel[i].modelString, "RocketPort 8 port w/ custom DB78");
18581842
rocketModel[i].numPorts = 8;
18591843
break;
18601844
case PCI_DEVICE_ID_RP16SNI:
1861-
str = "16 (DB78 Custom)";
18621845
max_num_aiops = 2;
18631846
rocketModel[i].model = MODEL_RP16SNI;
18641847
strcpy(rocketModel[i].modelString, "RocketPort 16 port w/ custom DB78");
18651848
rocketModel[i].numPorts = 16;
18661849
break;
18671850
case PCI_DEVICE_ID_RP16INTF:
1868-
str = "16";
18691851
max_num_aiops = 2;
18701852
rocketModel[i].model = MODEL_RP16INTF;
18711853
strcpy(rocketModel[i].modelString, "RocketPort 16 port w/external I/F");
18721854
rocketModel[i].numPorts = 16;
18731855
break;
18741856
case PCI_DEVICE_ID_URP16INTF:
1875-
str = "16";
18761857
max_num_aiops = 2;
18771858
rocketModel[i].model = MODEL_UPCI_RP16INTF;
18781859
strcpy(rocketModel[i].modelString, "RocketPort UPCI 16 port w/external I/F");
18791860
rocketModel[i].numPorts = 16;
18801861
break;
18811862
case PCI_DEVICE_ID_CRP16INTF:
1882-
str = "16";
18831863
max_num_aiops = 2;
18841864
rocketModel[i].model = MODEL_CPCI_RP16INTF;
18851865
strcpy(rocketModel[i].modelString, "RocketPort Compact PCI 16 port w/external I/F");
18861866
rocketModel[i].numPorts = 16;
18871867
break;
18881868
case PCI_DEVICE_ID_RP32INTF:
1889-
str = "32";
18901869
max_num_aiops = 4;
18911870
rocketModel[i].model = MODEL_RP32INTF;
18921871
strcpy(rocketModel[i].modelString, "RocketPort 32 port w/external I/F");
18931872
rocketModel[i].numPorts = 32;
18941873
break;
18951874
case PCI_DEVICE_ID_URP32INTF:
1896-
str = "32";
18971875
max_num_aiops = 4;
18981876
rocketModel[i].model = MODEL_UPCI_RP32INTF;
18991877
strcpy(rocketModel[i].modelString, "RocketPort UPCI 32 port w/external I/F");
19001878
rocketModel[i].numPorts = 32;
19011879
break;
19021880
case PCI_DEVICE_ID_RPP4:
1903-
str = "Plus Quadcable";
19041881
max_num_aiops = 1;
19051882
ports_per_aiop = 4;
19061883
altChanRingIndicator++;
@@ -1910,7 +1887,6 @@ static __init int register_PCI(int i, struct pci_dev *dev)
19101887
rocketModel[i].numPorts = 4;
19111888
break;
19121889
case PCI_DEVICE_ID_RPP8:
1913-
str = "Plus Octacable";
19141890
max_num_aiops = 2;
19151891
ports_per_aiop = 4;
19161892
altChanRingIndicator++;
@@ -1920,7 +1896,6 @@ static __init int register_PCI(int i, struct pci_dev *dev)
19201896
rocketModel[i].numPorts = 8;
19211897
break;
19221898
case PCI_DEVICE_ID_RP2_232:
1923-
str = "Plus 2 (RS-232)";
19241899
max_num_aiops = 1;
19251900
ports_per_aiop = 2;
19261901
altChanRingIndicator++;
@@ -1930,7 +1905,6 @@ static __init int register_PCI(int i, struct pci_dev *dev)
19301905
rocketModel[i].numPorts = 2;
19311906
break;
19321907
case PCI_DEVICE_ID_RP2_422:
1933-
str = "Plus 2 (RS-422)";
19341908
max_num_aiops = 1;
19351909
ports_per_aiop = 2;
19361910
altChanRingIndicator++;
@@ -1943,7 +1917,6 @@ static __init int register_PCI(int i, struct pci_dev *dev)
19431917

19441918
max_num_aiops = 1;
19451919
ports_per_aiop = 6;
1946-
str = "6-port";
19471920

19481921
/* If revision is 1, the rocketmodem flash must be loaded.
19491922
* If it is 2 it is a "socketed" version. */
@@ -1961,7 +1934,6 @@ static __init int register_PCI(int i, struct pci_dev *dev)
19611934
case PCI_DEVICE_ID_RP4M:
19621935
max_num_aiops = 1;
19631936
ports_per_aiop = 4;
1964-
str = "4-port";
19651937
if (dev->revision == 1) {
19661938
rcktpt_type[i] = ROCKET_TYPE_MODEMII;
19671939
rocketModel[i].loadrm2 = 1;
@@ -1974,7 +1946,6 @@ static __init int register_PCI(int i, struct pci_dev *dev)
19741946
rocketModel[i].numPorts = 4;
19751947
break;
19761948
default:
1977-
str = "(unknown/unsupported)";
19781949
max_num_aiops = 0;
19791950
break;
19801951
}
@@ -2000,14 +1971,12 @@ static __init int register_PCI(int i, struct pci_dev *dev)
20001971
if (!
20011972
(sInW(ConfigIO + _PCI_9030_GPIO_CTRL) &
20021973
PCI_GPIO_CTRL_8PORT)) {
2003-
str = "Quadcable";
20041974
ports_per_aiop = 4;
20051975
rocketModel[i].numPorts = 4;
20061976
}
20071977
}
20081978
break;
20091979
case PCI_DEVICE_ID_UPCI_RM3_8PORT:
2010-
str = "8 ports";
20111980
max_num_aiops = 1;
20121981
rocketModel[i].model = MODEL_UPCI_RM3_8PORT;
20131982
strcpy(rocketModel[i].modelString, "RocketModem III 8 port");
@@ -2018,7 +1987,6 @@ static __init int register_PCI(int i, struct pci_dev *dev)
20181987
rcktpt_type[i] = ROCKET_TYPE_MODEMIII;
20191988
break;
20201989
case PCI_DEVICE_ID_UPCI_RM3_4PORT:
2021-
str = "4 ports";
20221990
max_num_aiops = 1;
20231991
rocketModel[i].model = MODEL_UPCI_RM3_4PORT;
20241992
strcpy(rocketModel[i].modelString, "RocketModem III 4 port");
@@ -2032,21 +2000,6 @@ static __init int register_PCI(int i, struct pci_dev *dev)
20322000
break;
20332001
}
20342002

2035-
switch (rcktpt_type[i]) {
2036-
case ROCKET_TYPE_MODEM:
2037-
board_type = "RocketModem";
2038-
break;
2039-
case ROCKET_TYPE_MODEMII:
2040-
board_type = "RocketModem II";
2041-
break;
2042-
case ROCKET_TYPE_MODEMIII:
2043-
board_type = "RocketModem III";
2044-
break;
2045-
default:
2046-
board_type = "RocketPort";
2047-
break;
2048-
}
2049-
20502003
if (fast_clock) {
20512004
sClockPrescale = 0x12; /* mod 2 (divide by 3) */
20522005
rp_baud_base[i] = 921600;

0 commit comments

Comments
 (0)