media: dvb-usb: break long strings in dvb_usb_device_init
PATCH v2 1/3 media: dvb-usb: break long strings in dvb_usb_device_init
Break long strings into multiple lines.
--- drivers/media/usb/dvb-usb/dvb-usb-init.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/media/usb/dvb-usb/dvb-usb-init.c +5 -3
@@ -286,13 +286,15 @@ int dvb_usb_device_init(struct usb_interface *intf, desc =dvb_usb_find_device (udev, &d->props, &cold);if (!desc) { -deb_err ("something went very wrong, device was not found in current device list - let's see what comes next.\n" ); +deb_err ("something went very wrong, " +"device was not found in current device list.\n" ); ret = -ENODEV ; goto error; }if (cold) { -info ("found a '%s' in cold state, will try to load a firmware" , desc->name); +info ("found a %s in cold state, will try to load a firmware" , + desc->name); ret =dvb_usb_download_firmware (udev, props);if (!props->no_reconnect || ret !=0 ) goto error;
@@ -314,7 +316,7 @@ int dvb_usb_device_init(struct usb_interface *intf,if (du) *du = d; -info ("%s successfully initialized and connected." , desc->name); +info ("%s is successfully initialized and connected." , desc->name);return 0 ; error:
Signature · 1 line
2.25.1
Quoted 12 lines · Dongliang Mu
Break long strings into multiple lines.
Signed-off-by Dongliang Mu <[email protected]>--- drivers/media/usb/dvb-usb/dvb-usb-init.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)drivers/media/usb/dvb-usb/dvb-usb-init.c +0
-0
drivers/media/usb/dvb-usb/dvb-usb-init.c int dvb_usb_device_init(struct usb_interface *intf, · line 290
Quoted 6 lines
drivers/media/usb/dvb-usb/dvb-usb-init.c +2
-1@@ -286,13 +286,15 @@ int dvb_usb_device_init(struct usb_interface *intf, desc =dvb_usb_find_device (udev, &d->props, &cold);if (!desc) { -deb_err ("something went very wrong, device was not found in current device list - let's see what comes next.\n" ); +deb_err ("something went very wrong, " +"device was not found in current device list.\n" );
Long lines are acceptable unto 100 columns or more if they are string constants. Breaking them up does not increase readability.
drivers/media/usb/dvb-usb/dvb-usb-init.c int dvb_usb_device_init(struct usb_interface *intf, · line 297
Quoted 8 lines
drivers/media/usb/dvb-usb/dvb-usb-init.c +2
-1ret = -ENODEV ; goto error; }if (cold) { -info ("found a '%s' in cold state, will try to load a firmware" , desc->name); +info ("found a %s in cold state, will try to load a firmware" , + desc->name);
No reason for removing the quotes, I think.
drivers/media/usb/dvb-usb/dvb-usb-init.c int dvb_usb_device_init(struct usb_interface *intf, · line 319
Quoted 9 lines
drivers/media/usb/dvb-usb/dvb-usb-init.c +1
-1ret =dvb_usb_download_firmware (udev, props);if (!props->no_reconnect || ret !=0 ) goto error;@@ -314,7 +316,7 @@ int dvb_usb_device_init(struct usb_interface *intf,if (du) *du = d; -info ("%s successfully initialized and connected." , desc->name); +info ("%s is successfully initialized and connected." , desc->name);
"is" doesn't really add anything here, and the message is fine without it.
Quoted 5 lines
drivers/media/usb/dvb-usb/dvb-usb-init.c +0
-0return 0 ; error:Signature · 1 line
2.25.1
Quoted 15 lines · Sean Young
Quoted 13 lines · Dongliang Mu
Break long strings into multiple lines.
Signed-off-by Dongliang Mu <[email protected]>--- drivers/media/usb/dvb-usb/dvb-usb-init.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)drivers/media/usb/dvb-usb/dvb-usb-init.c +0
-0@@ -286,13 +286,15 @@ int dvb_usb_device_init(struct usb_interface *intf,
Quoted 8 lines
drivers/media/usb/dvb-usb/dvb-usb-init.c int dvb_usb_device_init(struct usb_interface *intf, · line 290
Quoted 5 lines
drivers/media/usb/dvb-usb/dvb-usb-init.c +2
-1desc =dvb_usb_find_device (udev, &d->props, &cold);if (!desc) { -deb_err ("something went very wrong, device was not found in current device list - let's see what comes next.\n" ); +deb_err ("something went very wrong, " +"device was not found in current device list.\n" );Long lines are acceptable unto 100 columns or more if they are string constants. Breaking them up does not increase readability.
I see. Thanks for your comments. They are valuable to me.
Quoted 29 lines
drivers/media/usb/dvb-usb/dvb-usb-init.c int dvb_usb_device_init(struct usb_interface *intf, · line 297
Quoted 9 lines
drivers/media/usb/dvb-usb/dvb-usb-init.c +2
-1ret = -ENODEV ; goto error; }if (cold) { -info ("found a '%s' in cold state, will try to load a firmware" , desc->name); +info ("found a %s in cold state, will try to load a firmware" , + desc->name);No reason for removing the quotes, I think.
drivers/media/usb/dvb-usb/dvb-usb-init.c int dvb_usb_device_init(struct usb_interface *intf, · line 319
Quoted 9 lines
drivers/media/usb/dvb-usb/dvb-usb-init.c +1
-1ret =dvb_usb_download_firmware (udev, props);if (!props->no_reconnect || ret !=0 ) goto error;@@ -314,7 +316,7 @@ int dvb_usb_device_init(struct usb_interface *intf,if (du) *du = d; -info ("%s successfully initialized and connected." , desc->name); +info ("%s is successfully initialized and connected." , desc->name);"is" doesn't really add anything here, and the message is fine without it.
Quoted 5 lines
drivers/media/usb/dvb-usb/dvb-usb-init.c +0
-1return 0 ; error: --2.25.1