[PATCH 1/1] net: USB: Deletion of unnecessary checks before the function call kfree

2014-11-20 Thread SF Markus Elfring
From: Markus Elfring elfr...@users.sourceforge.net Date: Thu, 20 Nov 2014 16:11:56 +0100 The kfree() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by:

[PATCH 1/1] USB: gadget: function: Deletion of an unnecessary check before the function call rndis_add_hdr

2014-11-21 Thread SF Markus Elfring
From: Markus Elfring elfr...@users.sourceforge.net Date: Fri, 21 Nov 2014 14:51:43 +0100 The rndis_add_hdr() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software.

[PATCH 1/1] USB: PCI-quirks: Deletion of unnecessary checks before the function call pci_dev_put

2014-11-21 Thread SF Markus Elfring
From: Markus Elfring elfr...@users.sourceforge.net Date: Fri, 21 Nov 2014 15:20:12 +0100 The pci_dev_put() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software.

[PATCH 1/1] USB-SIS: Deletion of an unnecessary check before the function call usb_put_dev

2014-11-21 Thread SF Markus Elfring
From: Markus Elfring elfr...@users.sourceforge.net Date: Fri, 21 Nov 2014 15:50:44 +0100 The usb_put_dev() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software.

[PATCH 1/1] USB: serial: Deletion of an unnecessary check before the function call release_firmware

2014-11-21 Thread SF Markus Elfring
From: Markus Elfring elfr...@users.sourceforge.net Date: Fri, 21 Nov 2014 16:15:34 +0100 The release_firmware() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software.

[PATCH 1/1] USB-IP: Deletion of unnecessary checks before the function call usb_put_dev

2014-11-21 Thread SF Markus Elfring
From: Markus Elfring elfr...@users.sourceforge.net Date: Fri, 21 Nov 2014 16:33:18 +0100 The usb_put_dev() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software.

Re: USB: serial: Deletion of an unnecessary check before the function call release_firmware

2014-11-21 Thread SF Markus Elfring
diff --git a/drivers/usb/serial/mxuport.c b/drivers/usb/serial/mxuport.c index ab1d690..3653ec1 100644 --- a/drivers/usb/serial/mxuport.c +++ b/drivers/usb/serial/mxuport.c @@ -1101,8 +1101,7 @@ static int mxuport_probe(struct usb_serial *serial, */ usb_set_serial_data(serial,

[PATCH] ueagle-atm: Delete unnecessary checks before the function call release_firmware

2015-02-05 Thread SF Markus Elfring
From: Markus Elfring elfr...@users.sourceforge.net Date: Thu, 5 Feb 2015 16:33:09 +0100 The release_firmware() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software.

[PATCH] USB: appledisplay: Deletion of a check before backlight_device_unregister()

2015-02-05 Thread SF Markus Elfring
From: Markus Elfring elfr...@users.sourceforge.net Date: Thu, 5 Feb 2015 16:07:43 +0100 The backlight_device_unregister() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle

[PATCH] USB: whci-hcd: Delete an unnecessary check before the function call usb_put_hcd

2015-02-05 Thread SF Markus Elfring
From: Markus Elfring elfr...@users.sourceforge.net Date: Thu, 5 Feb 2015 16:54:12 +0100 The usb_put_hcd() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software.

[PATCH] uwb/whci: Delete an unnecessary check before the function call umc_device_unregister

2015-02-05 Thread SF Markus Elfring
From: Markus Elfring elfr...@users.sourceforge.net Date: Thu, 5 Feb 2015 21:40:29 +0100 The umc_device_unregister() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software.

[PATCH] USB-mxuport: Delete an unnecessary check before the function call release_firmware

2015-06-28 Thread SF Markus Elfring
From: Markus Elfring elfr...@users.sourceforge.net Date: Sun, 28 Jun 2015 14:59:04 +0200 The release_firmware() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software.

[PATCH] USB-EHCI: Delete unnecessary checks before the function call "dma_pool_destroy"

2015-11-16 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 16 Nov 2015 19:01:44 +0100 The dma_pool_destroy() function tests whether its argument is NULL and then returns immediately. Thus the test around the calls is not needed. This issue was detected by using the Coccinelle software.

Re: [PATCH] usb: gadget: uvc: fix returnvar.cocci warnings

2015-09-17 Thread SF Markus Elfring
> Fortunately it does not matter anyway because the return value > of the drop_link() operation is silently ignored by its caller in > fs/configfs/symlink.c, functions configfs_symlink() and configfs_unlink(). Should such an implementation detail be also reconsidered once more? Regards, Markus

[PATCH] net-huawei_cdc_ncm: Delete an unnecessary variable initialisation in huawei_cdc_ncm_bind()

2016-01-01 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 1 Jan 2016 16:54:13 +0100 Omit explicit initialisation at the beginning for one local variable that is redefined before its first use. Signed-off-by: Markus Elfring ---

[PATCH 1/2] net-qmi_wwan: Refactoring for qmi_wwan_bind()

2016-01-01 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 1 Jan 2016 17:32:07 +0100 Reduce the scope for the local variable "desc" to one branch of an if statement. Signed-off-by: Markus Elfring --- drivers/net/usb/qmi_wwan.c | 3 ++- 1 file changed, 2

[PATCH 0/2] net-qmi_wwan: Fine-tuning for two function implementations

2016-01-01 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 1 Jan 2016 17:47:46 +0100 A few update suggestions were taken into account from static source code analysis. Markus Elfring (2): Refactoring for qmi_wwan_bind() Delete an unnecessary variable initialisation in

[PATCH 2/2] net-qmi_wwan: Delete an unnecessary variable initialisation in qmi_wwan_register_subdriver()

2016-01-01 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 1 Jan 2016 17:35:03 +0100 Omit explicit initialisation at the beginning for one local variable that is redefined before its first use. Signed-off-by: Markus Elfring --- drivers/net/usb/qmi_wwan.c | 2

Re: [patch] usb: gadget: f_midi: missing unlock on error path

2015-12-22 Thread SF Markus Elfring
> We added a new error path to this function and we forgot to drop the lock. > > Fixes: e1e3d7ec5da3 ('usb: gadget: f_midi: pre-allocate IN requests') > Signed-off-by: Dan Carpenter > > diff --git a/drivers/usb/gadget/function/f_midi.c >

[PATCH v2 0/2] USB-FHCI: Use return type "int" for two functions

2015-12-22 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 22 Dec 2015 16:43:12 +0100 Another update suggestion was taken into account after a patch was applied from static source code analysis. Markus Elfring (2): Use a signed return type for fhci_create_ep() Use a signed return type

[PATCH] USB-FHCI: Use a signed return type for fhci_create_ep()

2015-12-19 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 19 Dec 2015 21:10:20 +0100 The return type "u32" was used by the fhci_create_ep() function even though it will eventually return a negative error code. Improve this implementation detail by using the type "s32" instead. This issue

Re: [PATCH] USB-FHCI: Use a signed return type for fhci_create_ep()

2015-12-19 Thread SF Markus Elfring
> Just make it an int. Thanks for your suggestion. Will any more software developers prefer this data type at some source code places? > The caller also casts it to u32... Do you want to get rid of similar casts in affected functions? Regards, Markus -- To unsubscribe from this list: send

[PATCH v2 1/2] USB-FHCI: Use a signed return type for fhci_create_ep()

2015-12-22 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 22 Dec 2015 16:10:14 +0100 The return type "u32" was used by the fhci_create_ep() function even though it will eventually return a negative error code. Improve this implementation detail by using the type "int" instead. This issue

[PATCH v2 2/2] USB-FHCI: Use a signed return type for endpoint_zero_init()

2015-12-22 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 22 Dec 2015 16:24:46 +0100 The return type "u32" was used by the endpoint_zero_init() function even though it can return a value which corresponds to a negative error code from a call of the fhci_create_ep() function. Improve this

[PATCH 0/7] USB-iowarrior: Fine-tuning for some function implementations

2016-08-21 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 21 Aug 2016 15:41:23 +0200 Several update suggestions were taken into account from static source code analysis. Markus Elfring (7): Use memdup_user() rather than duplicating its implementation Delete unnecessary initialisations

[PATCH 2/7] USB-iowarrior: Delete unnecessary initialisations for the variable "dev"

2016-08-21 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 21 Aug 2016 13:26:09 +0200 The local variable "dev" was initialised despite of the detail that it was immediately reassigned by the following statement. Thus remove such unnecessary specifications. Signed-off-by: Markus Elfring

[PATCH 1/7] USB-iowarrior: Use memdup_user() rather than duplicating its implementation

2016-08-21 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 21 Aug 2016 12:48:27 +0200 Reuse existing functionality from memdup_user() instead of keeping duplicate source code. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring

[PATCH 3/7] USB-iowarrior: Delete an unnecessary initialisation in iowarrior_release()

2016-08-21 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 21 Aug 2016 13:45:09 +0200 The local variable "retval" will be set to an appropriate value a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring ---

[PATCH 4/7] USB-iowarrior: Delete unnecessary initialisations in iowarrior_open()

2016-08-21 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 21 Aug 2016 15:15:03 +0200 Two local variables will be set to an appropriate value a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring ---

[PATCH 5/7] USB-iowarrior: Delete unnecessary initialisations in iowarrior_write()

2016-08-21 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 21 Aug 2016 15:17:22 +0200 Two local variables will be set to an appropriate value a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring ---

[PATCH 6/7] USB-iowarrior: Delete unnecessary braces

2016-08-21 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 21 Aug 2016 15:25:30 +0200 Do not use curly brackets at a few source code places where a single statement should be sufficient. Signed-off-by: Markus Elfring --- drivers/usb/misc/iowarrior.c | 22

[PATCH 7/7] USB-iowarrior: Apply another recommendation from "checkpatch.pl"

2016-08-21 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 21 Aug 2016 15:30:11 +0200 The script "checkpatch.pl" can point out that assignments should usually not be performed within condition checks. Thus move the assignments for two local variables to separate statements. Signed-off-by:

[PATCH 0/2] usbnet: Adjustments for usbnet_write_cmd_async()

2017-05-21 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 22 May 2017 07:04:03 +0200 Two update suggestions were taken into account from static source code analysis. Markus Elfring (2): Delete an error message for a failed memory allocation Improve a size determination

[PATCH 1/2] usbnet: Delete an error message for a failed memory allocation in usbnet_write_cmd_async()

2017-05-21 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 22 May 2017 06:33:48 +0200 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link:

[PATCH 2/2] usbnet: Improve a size determination in usbnet_write_cmd_async()

2017-05-21 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 22 May 2017 06:42:33 +0200 Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style

[PATCH 0/4] ueagle-atm: Adjustments for eight function implementations

2017-05-19 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 19 May 2017 19:41:23 +0200 A few update suggestions were taken into account from static source code analysis. Markus Elfring (4): Delete error messages for failed memory allocations in two functions Improve a size determination

[PATCH 1/4] ueagle-atm: Delete error messages for failed memory allocations in two functions

2017-05-19 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 19 May 2017 19:02:01 +0200 Omit two extra messages for memory allocation failures in these functions. This issue was detected by using the Coccinelle software. Link:

[PATCH 4/4] ueagle-atm: Adjust three checks for null pointers

2017-05-19 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 19 May 2017 19:29:08 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written !… Thus

[PATCH 3/4] ueagle-atm: Delete unnecessary return statements in two functions

2017-05-19 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 19 May 2017 19:22:12 +0200 The script "checkpatch.pl" pointed information out like the following. WARNING: void function return statements are not generally useful Thus remove such a statement in the affected functions.

[PATCH 2/4] ueagle-atm: Improve a size determination in uea_bind()

2017-05-19 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 19 May 2017 19:09:28 +0200 Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style

[PATCH] ezusb: Delete an error message for a failed memory allocation in ezusb_writememory()

2017-05-19 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 19 May 2017 22:30:21 +0200 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link:

[PATCH 4/4] [media] zr364xx: Fix a typo in a comment line of the file header

2017-08-28 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 28 Aug 2017 22:46:30 +0200 Fix a word in this description. Signed-off-by: Markus Elfring --- drivers/media/usb/zr364xx/zr364xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 1/4] [media] zr364xx: Delete an error message for a failed memory allocation in two functions

2017-08-28 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 28 Aug 2017 22:23:56 +0200 Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

[PATCH 0/4] [media] zr364xx: Adjustments for some function implementations

2017-08-28 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 29 Aug 2017 07:17:07 +0200 A few update suggestions were taken into account from static source code analysis. Markus Elfring (4): Delete an error message for a failed memory allocation in two functions Improve a size

[PATCH 3/4] [media] zr364xx: Adjust ten checks for null pointers

2017-08-28 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 28 Aug 2017 22:40:47 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written !… Thus

[PATCH 2/4] [media] zr364xx: Improve a size determination in zr364xx_probe()

2017-08-28 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 28 Aug 2017 22:28:02 +0200 Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style

[PATCH] usbtmc: Use common error handling code in three functions

2017-11-04 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 4 Nov 2017 19:36:56 +0100 * Adjust jump targets so that two error messages are stored only once at the end of these function implementations. * Replace 11 calls of the function "dev_err" and 11 assignments to the variable "rv"

[PATCH] USB: core: Improve unlocking of a mutex in two functions

2017-11-04 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 4 Nov 2017 21:00:46 +0100 * Add jump targets so that a call of the function "mutex_unlock" is stored only twice in these function implementations. * Replace five calls by goto statements. This issue was detected by using the

Re: [PATCH] USB: core: Improve unlocking of a mutex in two functions

2017-11-05 Thread SF Markus Elfring
>> @@ -5529,8 +5528,7 @@ static int usb_reset_and_verify_device(struct >> usb_device *udev) >> dev_err(>dev, >> "can't restore configuration #%d (error=%d)\n", >> udev->actconfig->desc.bConfigurationValue, ret); >> -

Re: USB: core: Improve unlocking of a mutex in two functions

2017-11-05 Thread SF Markus Elfring
> Don't worry, or waste your time, I don't take patches from this author > as they are in my blacklist. I am curious if our dialogue can become more constructive again.  I can offer another bit of information for this software development discussion.  The affected source files can be

Re: sr9800: Use common error handling code in sr9800_phy_powerup()

2017-11-04 Thread SF Markus Elfring
> If you play the "smaller executable object code" card, people expect that > you provide the actual numbers, too. I can offer another bit of information for this software development discussion. The affected source file can be compiled for the processor architecture “x86_64” by a tool like “GCC

[PATCH] usb: gadget: bcm63xx_udc: Use common error handling code in bcm63xx_udc_probe()

2017-11-04 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 4 Nov 2017 22:02:46 +0100 Add a jump target so that a specific error message is stored only once at the end of this function implementation. Replace two calls of the function "dev_err" by goto statements. This issue was detected by

[PATCH 1/4] uwb: Delete an error message for a failed memory allocation in hwarc_probe()

2017-12-05 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 5 Dec 2017 20:30:50 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

[PATCH 2/4] uwb: Delete an error message for a failed memory allocation in whcrc_probe()

2017-12-05 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 5 Dec 2017 20:43:31 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

[PATCH 2/2] usbip: Use common error handling code in stub_recv_cmd_submit()

2017-12-05 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 5 Dec 2017 22:40:30 +0100 Add a jump target so that a bit of exception handling can be better reused at the end of this function. Signed-off-by: Markus Elfring --- drivers/usb/usbip/stub_rx.c | 22

[PATCH 0/2] usbip: Adjustments for two function implementations

2017-12-05 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 5 Dec 2017 22:44:55 +0100 Two update suggestions were taken into account from static source code analysis. Markus Elfring (2): Delete an error message for a failed memory allocation in two functions Use common error handling

[PATCH 1/2] usbip: Delete an error message for a failed memory allocation in two functions

2017-12-05 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 5 Dec 2017 22:25:38 +0100 Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

[PATCH 0/4] UWB: Adjustments for four function implementations

2017-12-05 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 5 Dec 2017 21:17:55 +0100 A few update suggestions were taken into account from static source code analysis. Markus Elfring (4): Delete an error message for a failed memory allocation in hwarc_probe() Delete an error message for

[PATCH 4/4] uwb/i1480/dfu/usb: Delete two error messages for a failed memory allocation in i1480_usb_probe()

2017-12-05 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 5 Dec 2017 21:07:47 +0100 Omit extra messages for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

[PATCH 3/4] uwb/i1480/dfu/mac: Delete an error message for a failed memory allocation in fw_hdrs_load()

2017-12-05 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 5 Dec 2017 21:00:03 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

Re: USB: hub: Checking communication difficulties

2017-12-08 Thread SF Markus Elfring
> Greg maintains USB and he's has blocked Markus, How do you think about to reconsider this blockage? > because he never listens to feedback I am listening … > but instead just repsonds that he has a different opinion. I choose such a reaction in some cases. My responses can vary. It seems

Re: USB: hub: Delete an error message for a failed memory allocation in usb_hub_clear_tt_buffer()

2017-12-07 Thread SF Markus Elfring
OOM does a dump_stack() so this function's call tree is shown. >>> >>> A call stack doesn't tell you which device was being handled. >> >> Do you find a default Linux allocation failure report insufficient then? >> >> Would you like to to achieve that the requested information can be

Re: [PATCH 1/2] usbip: Delete an error message for a failed memory allocation in two functions

2017-12-06 Thread SF Markus Elfring
>> Omit an extra message for a memory allocation failure in these functions. >> >> This issue was detected by using the Coccinelle software. > > Please include the problem Do you find the wording “WARNING: Possible unnecessary 'out of memory' message” from the script “checkpatch.pl” more

Re: USB: hub: Delete an error message for a failed memory allocation in usb_hub_clear_tt_buffer()

2017-12-06 Thread SF Markus Elfring
> The system will come to a grinding halt anyway if it can't allocate 24 or 40 > bytes. Maybe. > Which is BTW more or less the amount of memory saved by killing > the useless (error) message. Would you dare to resend this update suggestion after such a view? Regards, Markus -- To unsubscribe

[PATCH] USB: hub: Delete an error message for a failed memory allocation in usb_hub_clear_tt_buffer()

2017-12-06 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 6 Dec 2017 17:00:18 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

Re: USB: hub: Delete an error message for a failed memory allocation in usb_hub_clear_tt_buffer()

2017-12-06 Thread SF Markus Elfring
>>> Does the existing memory allocation error message include the >>> >dev device name and driver name? If it doesn't, there will be >>> no way for the user to tell that the error message is related to the >>> device failure. >> >> No, but the effect is similar. >> >> OOM does a dump_stack()

[PATCH] USB: emi62: Delete an error message for a failed memory allocation in emi62_writememory()

2017-12-06 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 6 Dec 2017 12:42:20 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

[PATCH] USB: emi26: Delete an error message for a failed memory allocation in emi26_writememory()

2017-12-06 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 6 Dec 2017 13:03:21 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

Re: [PATCH] USB: emi26: Delete an error message for a failed memory allocation in emi26_writememory()

2017-12-06 Thread SF Markus Elfring
>> @@ -42,10 +42,9 @@ static int emi26_writememory (struct usb_device *dev, int >> address, >> int result; >> unsigned char *buffer = kmemdup(data, length, GFP_KERNEL); >> >> -if (!buffer) { >> -dev_err(>dev, "kmalloc(%d) failed.\n", length); > > I guess the length

[PATCH] USB: imx21-hcd: Delete an error message for a failed memory allocation in activate_etd()

2017-12-06 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 6 Dec 2017 13:23:35 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

[PATCH] USB: dwc2: Delete an error message for a failed memory allocation in dwc2_hsotg_handle_unaligned_buf_start()

2017-12-06 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 6 Dec 2017 16:16:00 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

[PATCH] lan78xx: Use common error handling code in lan78xx_phy_init()

2017-10-28 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 28 Oct 2017 22:42:52 +0200 * Add a jump target so that a specific error message is stored only once at the end of this function implementation. * Replace two calls of the function "netdev_err" by goto statements. * Adjust two

Re: [PATCH] sr9800: Use common error handling code in sr9800_phy_powerup()

2017-10-29 Thread SF Markus Elfring
>> @@ -700,10 +700,9 @@ static int sr9800_phy_powerup(struct usbnet *dev) >> >> /* set the embedded Ethernet PHY in power-up state */ >> ret = sr_sw_reset(dev, SR_SWRESET_IPRL); >> - if (ret < 0) { >> - netdev_err(dev->net, "Failed to reset PHY: %d\n", ret); >>

[PATCH] smsc95xx: Use common error handling code in smsc95xx_write_eeprom()

2017-10-29 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 29 Oct 2017 11:08:34 +0100 Add a jump target so that a specific error message is stored only once at the end of this function implementation. Replace two calls of the function "netdev_warn" by goto statements. This issue was

[PATCH] sr9800: Use common error handling code in sr9800_phy_powerup()

2017-10-29 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 29 Oct 2017 11:33:14 +0100 Add a jump target so that a specific error message is stored only once at the end of this function implementation. Replace two calls of the function "netdev_err" by goto statements. This issue was detected

Re: mmc: vub300: Use common code in __download_offload_pseudocode()

2017-10-31 Thread SF Markus Elfring
> Regarding posts from Markus' I am well aware of the problems. Interesting … > In my case, it hasn't been much of a hurdle, I simply ignore changes > that seems silly to me. * How often did this happen so far? * Are any update suggestions left over where a constructive feedback will make

Re: mmc: vub300: Use common code in __download_offload_pseudocode()

2017-10-31 Thread SF Markus Elfring
>>> What's the advantage of this patch? The new code seems more complicated >>> to me and GCC automatically reuses duplicate constant strings so there >>> is no memory savings. >> >> It looked to me that the error path got a bit cleaner. However, I >> guess it's matter of taste. >> >> If you

[PATCH] mmc: vub300: Use common code in __download_offload_pseudocode()

2017-10-27 Thread SF Markus Elfring
From: Markus Elfring Date: Fri, 27 Oct 2017 21:21:40 +0200 Add a jump target so that a specific string copy operation is stored only once at the end of this function implementation. Replace two calls of the function "strncpy" by goto statements. This issue was

[PATCH] smsc95xx: Delete an error message for a failed memory allocation in smsc95xx_suspend()

2017-12-31 Thread SF Markus Elfring
From: Markus Elfring Date: Sun, 31 Dec 2017 22:06:49 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

[PATCH] usb/host/imx21: Use seq_putc() in debug_etd_show()

2018-01-13 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 13 Jan 2018 13:12:06 +0100 A single character (line break) should be put into a sequence. Thus use the corresponding function "seq_putc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring

Re: [2/2] net/usb/ax88179_178a: Delete three unnecessary variables in ax88179_chk_eee()

2018-03-13 Thread SF Markus Elfring
>> Use three values directly for a condition check without assigning them >> to intermediate variables. > > Hi, > > what is the benefit of this? I proposed a small source code reduction. Other software design directions might become more interesting for this use case. Regards, Markus -- To

[PATCH 1/2] net/usb/ax88179_178a: Use common code in ax88179_chk_eee()

2018-03-10 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 10 Mar 2018 18:22:43 +0100 Adjust a jump target so that a bit of common code can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring

[PATCH 0/2] net/usb/ax88179_178a: Adjustments for ax88179_chk_eee()

2018-03-10 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 10 Mar 2018 19:05:45 +0100 Two update suggestions were taken into account from static source code analysis. Markus Elfring (2): Use common code Delete three unnecessary variables drivers/net/usb/ax88179_178a.c | 45

[PATCH 2/2] net/usb/ax88179_178a: Delete three unnecessary variables in ax88179_chk_eee()

2018-03-10 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 10 Mar 2018 18:53:28 +0100 Use three values directly for a condition check without assigning them to intermediate variables. Signed-off-by: Markus Elfring --- drivers/net/usb/ax88179_178a.c | 13