Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tty: rocket, remove unneeded variable

num_chan in register_PCI is used only as an alias for ports_per_aiop. So
drop num_chan and use ports_per_aiop directly.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20200417105959.15201-1-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jiri Slaby and committed by
Greg Kroah-Hartman
63552502 a8e7346b

+4 -6
+4 -6
drivers/tty/rocket.c
··· 1882 1882 */ 1883 1883 static __init int register_PCI(int i, struct pci_dev *dev) 1884 1884 { 1885 - int num_aiops, aiop, max_num_aiops, num_chan, chan; 1885 + int num_aiops, aiop, max_num_aiops, chan; 1886 1886 unsigned int aiopio[MAX_AIOPS_PER_BOARD]; 1887 1887 CONTROLLER_t *ctlp; 1888 1888 ··· 2154 2154 /* Reset the AIOPIC, init the serial ports */ 2155 2155 for (aiop = 0; aiop < num_aiops; aiop++) { 2156 2156 sResetAiopByNum(ctlp, aiop); 2157 - num_chan = ports_per_aiop; 2158 - for (chan = 0; chan < num_chan; chan++) 2157 + for (chan = 0; chan < ports_per_aiop; chan++) 2159 2158 init_r_port(i, aiop, chan, dev); 2160 2159 } 2161 2160 ··· 2162 2163 if ((rcktpt_type[i] == ROCKET_TYPE_MODEM) || 2163 2164 (rcktpt_type[i] == ROCKET_TYPE_MODEMII) || 2164 2165 (rcktpt_type[i] == ROCKET_TYPE_MODEMIII)) { 2165 - num_chan = ports_per_aiop; 2166 - for (chan = 0; chan < num_chan; chan++) 2166 + for (chan = 0; chan < ports_per_aiop; chan++) 2167 2167 sPCIModemReset(ctlp, chan, 1); 2168 2168 msleep(500); 2169 - for (chan = 0; chan < num_chan; chan++) 2169 + for (chan = 0; chan < ports_per_aiop; chan++) 2170 2170 sPCIModemReset(ctlp, chan, 0); 2171 2171 msleep(500); 2172 2172 rmSpeakerReset(ctlp, rocketModel[i].model);