Delete unnecessary variable initialisations in seven functions
Subsystems (5)
PATCH v2 1/1 Delete unnecessary variable initialisations in seven functions
From: Markus Elfring <[email protected]>
Date: Thu, 22 Feb 2018 21:45:47 +0100
Some local variables will be set to an appropriate value before usage. Thus omit explicit initialisations at the beginning of these functions.
---
v2:
Hans Verkuil insisted on patch squashing. Thus some changes were recombined based on source files from Linux next-20180216.
drivers/media/radio/radio-mr800.c | 2 +- drivers/media/radio/radio-wl1273.c | 2 +- drivers/media/radio/si470x/radio-si470x-usb.c | 2 +- drivers/media/usb/cx231xx/cx231xx-cards.c | 2 +- drivers/media/usb/cx231xx/cx231xx-dvb.c | 2 +- drivers/media/usb/go7007/snd-go7007.c | 2 +- drivers/media/usb/tm6000/tm6000-cards.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-)
drivers/media/radio/radio-mr800.c +1 -1
@@ -511,5 +511,5 @@ static int usb_amradio_probe(struct usb_interface *intf, const struct usb_device_id *id) {struct amradio_device *radio; -int retval =0 ; +int retval;
drivers/media/radio/radio-wl1273.c +1 -1
@@ -671,6 +671,6 @@ static int wl1273_fm_start(struct wl1273_device *radio, int new_mode)static int wl1273_fm_suspend (struct wl1273_device *radio) {struct wl1273_core *core = radio->core; -int r =0 ; +int r;/* Cannot go from OFF to SUSPENDED */
drivers/media/radio/si470x/radio-si470x-usb.c +1 -1
@@ -578,6 +578,6 @@ static int si470x_usb_driver_probe(struct usb_interface *intf,struct si470x_device *radio;struct usb_host_interface *iface_desc;struct usb_endpoint_descriptor *endpoint; -int i, int_end_size, retval =0 ; +int i, int_end_size, retval;unsigned char version_warning =0 ;
drivers/media/usb/cx231xx/cx231xx-cards.c +1 -1
@@ -1135,6 +1135,6 @@ static void cx231xx_config_tuner(struct cx231xx *dev)static int read_eeprom (struct cx231xx *dev,struct i2c_client *client,u8 *eedata,int len) { -int ret =0 ; +int ret;u8 start_offset =0 ;int len_todo = len;
drivers/media/usb/cx231xx/cx231xx-dvb.c +1 -1
@@ -604,6 +604,6 @@ static void unregister_dvb(struct cx231xx_dvb *dvb)static int dvb_init (struct cx231xx *dev) { -int result =0 ; +int result;struct cx231xx_dvb *dvb;struct i2c_adapter *tuner_i2c;
drivers/media/usb/go7007/snd-go7007.c +1 -1
@@ -227,7 +227,7 @@ int go7007_snd_init(struct go7007 *go) {static int dev;struct go7007_snd *gosnd; -int ret =0 ; +int ret;if (dev >=SNDRV_CARDS )return -ENODEV ;
drivers/media/usb/tm6000/tm6000-cards.c +1 -1
@@ -1174,7 +1174,7 @@ static int tm6000_usb_probe(struct usb_interface *interface, {struct usb_device *usbdev;struct tm6000_core *dev; -int i, rc =0 ; +int i, rc;int nr =0 ;char *speed;
Signature · 1 line
2.16.2
Quoted 6 lines · SF Markus Elfring
From: Markus Elfring <[email protected]>
Date: Thu, 22 Feb 2018 21:45:47 +0100Some local variables will be set to an appropriate value before usage. Thus omit explicit initialisations at the beginning of these functions.
Quoted 8 lines
Signed-off-by Markus Elfring <[email protected]>---
v2:
Hans Verkuil insisted on patch squashing. Thus some changes were recombined based on source files from Linux next-20180216.drivers/media/radio/radio-mr800.c | 2 +-
For radio-mr800:
drivers/media/radio/radio-wl1273.c
Quoted 20 lines
drivers/media/radio/radio-wl1273.c | 2 +- drivers/media/radio/si470x/radio-si470x-usb.c | 2 +- drivers/media/usb/cx231xx/cx231xx-cards.c | 2 +- drivers/media/usb/cx231xx/cx231xx-dvb.c | 2 +- drivers/media/usb/go7007/snd-go7007.c | 2 +- drivers/media/usb/tm6000/tm6000-cards.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-)drivers/media/radio/radio-mr800.c +1
-1@@ -511,5 +511,5 @@ static int usb_amradio_probe(struct usb_interface *intf, const struct usb_device_id *id) {struct amradio_device *radio; -int retval =0 ; +int retval;drivers/media/radio/radio-wl1273.c +0
-0
[..]
Thanks!
Alexey