If you are convinced that dropping the null tests is a good idea, then you
can submit the patch that makes the change to the relevant maintainers and
mailing lists.
Hello,
A couple of functions perform input parameter validation before their
implementations will try further actions with
If you are convinced that dropping the null tests is a good idea, then you
can submit the patch that makes the change to the relevant maintainers and
mailing lists.
From 48c9c4f61a7d7ea98538e02631a981a429281005 Mon Sep 17 00:00:00 2001
From: Markus Elfring elfr...@users.sourceforge.net
Date:
If you are convinced that dropping the null tests is a good idea, then you
can submit the patch that makes the change to the relevant maintainers and
mailing lists.
From 1d2de3c3cfa43cc3c78a91200c41cef438b26a8f Mon Sep 17 00:00:00 2001
From: Markus Elfring elfr...@users.sourceforge.net
Date:
If you are convinced that dropping the null tests is a good idea, then you
can submit the patch that makes the change to the relevant maintainers and
mailing lists.
From f4608fceec40b2b94aa9b4abe3bbb6d98ed5eed9 Mon Sep 17 00:00:00 2001
From: Markus Elfring elfr...@users.sourceforge.net
Date:
If you are convinced that dropping the null tests is a good idea, then you
can submit the patch that makes the change to the relevant maintainers and
mailing lists.
From e6a21b920fcca2f6f01c9528909dc036a9b3bc41 Mon Sep 17 00:00:00 2001
From: Markus Elfring elfr...@users.sourceforge.net
Date:
If you are convinced that dropping the null tests is a good idea, then you
can submit the patch that makes the change to the relevant maintainers and
mailing lists.
From bedf1cb3ddd162ee3b4c31cbb98d97431f70103d Mon Sep 17 00:00:00 2001
From: Markus Elfring elfr...@users.sourceforge.net
Date:
This patch adds a trivial script warning on
if(foo)
kfree(foo)
[...]
You should probably add all of the unnecessary
conditional tests that checkpatch uses:
[...]
Would you like to look at my previous update suggestion Deletion of unnecessary
checks before specific function calls
I checked the profile results, the reason the jobs finish is some threads
had no work or little work.
Could you find out during the data processing which parts or files
result in a special application behaviour you would like to point out here?
Regards,
Markus
--
To unsubscribe from this list:
Could you find out during the data processing which parts or files
result in a special application behaviour you would like to point out here?
I don't understand the question at all, but since the various files have
different properties, it is hard to determine automatically in advance how
Obviously I considered writing SmPL for this, but one thing which seemed
hard was that for after the request_firmware_nowait() we tend to tuck
away into another new call the rest of the code that was in place in the
original function after the old request_firmware() call. Is there a way
to
V3:
-Update print_main message.
Does the discussion topic need also an adjustment?
How do you think about my previous update suggestion Deletion of
unnecessary checks before specific function calls?
https://systeme.lip6.fr/pipermail/cocci/2014-March/000675.html
How do you think about my previous update suggestion Deletion of
unnecessary checks before specific function calls?
https://systeme.lip6.fr/pipermail/cocci/2014-March/000675.html
https://lkml.org/lkml/2014/3/5/344
I didn't see you made the same kind of script.
Will my approach become a
Sorry but I'm not working on coccinelle ; just did a small script for kernel
tree.
I would appreciate a more constructive feedback for my update suggestions around
the topic Deletion of unnecessary checks before specific function calls.
- Did you look at the concrete patches?
- How do you
https://systeme.lip6.fr/pipermail/cocci/2014-March/000676.html
http://marc.info/?l=kernel-janitorsm=139405971927100w=2
Regular expressions do not allow taking advantage of the optimizations
provided by Coccinelle and are not easy for a reader to understand.
I find that the application of
I hope you had information you wanted from Julia ?
Yes. - I am waiting on another Coccinelle software release which will
contain improvements for my feature requests and bug reports.
I'm curious when I should retry proposed filter patterns.
Regards,
Markus
--
To unsubscribe from this
+@r depends on context || report || org @
+expression E;
+position p;
+@@
+
+* if (E)
+*
\(kfree@p\|debugfs_remove@p\|debugfs_remove_recursive@p\|usb_free_urb\)(E);
How do you think about to add the construct @p also behind the function name
usb_free_urb?
Is my previous update
I still don't think this should be done for any random function that
performs a null test on its argument. The corrections involved here are
not as trivial as they would seem.
I would prefer to make the list of corresponding function names more complete.
Often it is not the case that the
@r depends on context || report || org @
@@ -37,7 +35,8 @@ position p;
@@
* if (E)
-*
\(kfree@p\|debugfs_remove@p\|debugfs_remove_recursive@p\|usb_free_urb\)(E);
+* \(kfree@p\|debugfs_remove@p\|debugfs_remove_recursive@p\|usb_free_urb@p\|
+*of_node_put@p\)(E);
Why do you
From 45970693cad6c12da2d5ac7da3d2bd7a566170d7 Mon Sep 17 00:00:00 2001
From: Markus Elfring elfr...@users.sourceforge.net
Date: Thu, 23 Oct 2014 20:55:13 +0200
Subject: [PATCH] staging - rtl8188eu: Deletion of unnecessary checks before
three function calls
The functions kfree(),
What platforms have you tested the code on at this point ?
None. - My test computer does not provide the corresponding hardware for the
affected driver source files.
Regards,
Markus
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to
If you are convinced that dropping the null tests is a good idea, then you
can submit the patch that makes the change to the relevant maintainers and
mailing lists.
Would you like to integrate the following proposal into your source code
repository?
Regards,
Markus
From
If you are convinced that dropping the null tests is a good idea, then you
can submit the patch that makes the change to the relevant maintainers and
mailing lists.
Would you like to integrate the following proposal into your source code
repository?
Regards,
Markus
From
If you are convinced that dropping the null tests is a good idea, then you
can submit the patch that makes the change to the relevant maintainers and
mailing lists.
From af73fb59d5d4b2c289fb236d0752522b6b38 Mon Sep 17 00:00:00 2001
From: Markus Elfring elfr...@users.sourceforge.net
Date:
If you are convinced that dropping the null tests is a good idea, then you
can submit the patch that makes the change to the relevant maintainers and
mailing lists.
I resent the request once more because another Triple-X software development
adventure might follow ...?
Regards,
Markus
Using seq_puts to write a one-character string is suboptimal,
since puts has to call strlen().
Are there any more functions which work with such strings in a similar way?
Would it make sense to look also at other function names?
Regards,
Markus
--
To unsubscribe from this list: send the line
This adds an extra argument onto parse_params() to be used
as a way to make the unused callback a bit more useful and
generic by allowing the caller to pass on a data structure
of its choice.
How do you think about to work with more data type definitions for such callback
functions?
Regards,
How do you think about to work with more data type definitions for such
callback functions?
Sorry I don't understand what you mean.
Can a specific typedef help in corresponding software maintenance?
Do you find descriptions from an other software application useful for such an
use case
If you are convinced that dropping the null tests is a good idea, then you
can submit the patch that makes the change to the relevant maintainers and
mailing lists.
Hello,
A couple of functions perform input parameter validation before their
implementations will try further actions with
If you are convinced that dropping the null tests is a good idea, then you
can submit the patch that makes the change to the relevant maintainers and
mailing lists.
From 48c9c4f61a7d7ea98538e02631a981a429281005 Mon Sep 17 00:00:00 2001
From: Markus Elfring elfr...@users.sourceforge.net
Date:
If you are convinced that dropping the null tests is a good idea, then you
can submit the patch that makes the change to the relevant maintainers and
mailing lists.
From 1d2de3c3cfa43cc3c78a91200c41cef438b26a8f Mon Sep 17 00:00:00 2001
From: Markus Elfring elfr...@users.sourceforge.net
Date:
If you are convinced that dropping the null tests is a good idea, then you
can submit the patch that makes the change to the relevant maintainers and
mailing lists.
From f4608fceec40b2b94aa9b4abe3bbb6d98ed5eed9 Mon Sep 17 00:00:00 2001
From: Markus Elfring elfr...@users.sourceforge.net
Date:
If you are convinced that dropping the null tests is a good idea, then you
can submit the patch that makes the change to the relevant maintainers and
mailing lists.
From e6a21b920fcca2f6f01c9528909dc036a9b3bc41 Mon Sep 17 00:00:00 2001
From: Markus Elfring elfr...@users.sourceforge.net
Date:
If you are convinced that dropping the null tests is a good idea, then you
can submit the patch that makes the change to the relevant maintainers and
mailing lists.
From bedf1cb3ddd162ee3b4c31cbb98d97431f70103d Mon Sep 17 00:00:00 2001
From: Markus Elfring elfr...@users.sourceforge.net
Date:
The functions debug_unregister() and kfree_fsm() test whether their argument
is NULL and then return immediately. Thus the test around the call
is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring elfr...@users.sourceforge.net
---
The functions kfree(), rtw_free_netdev() and vfree() test whether their
argument is NULL and then return immediately. Thus the test around the call
is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring elfr...@users.sourceforge.net
---
The functions kfree(), rtw_free_netdev() and vfree() test whether their
argument is NULL and then return immediately. Thus the test around the call
is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring elfr...@users.sourceforge.net
---
From: Markus Elfring elfr...@users.sourceforge.net
Date: Tue, 18 Nov 2014 15:42:43 +0100
The sysctl_head_finish() function was called in an inefficient way by the
implementation of the proc_sys_lookup() function in case of a lookup failure.
The corresponding source code was improved by deletion
From: Markus Elfring elfr...@users.sourceforge.net
Date: Tue, 18 Nov 2014 18:33:08 +0100
Another update suggestion was taken into account after a patch was applied
from static source code analysis.
Markus Elfring (2):
Deletion of unnecessary checks before the function call iput
One function
From: Markus Elfring elfr...@users.sourceforge.net
Date: Tue, 18 Nov 2014 17:17:46 +0100
The iput() 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:
From: Markus Elfring elfr...@users.sourceforge.net
Date: Tue, 18 Nov 2014 18:29:10 +0100
The iput() function was called in up to three cases by the udf_fill_super()
function during error handling even if the passed data structure element
contained still a null pointer. This implementation detail
From: Markus Elfring elfr...@users.sourceforge.net
Date: Tue, 18 Nov 2014 20:10:34 +0100
The proc_remove() 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.
From: Markus Elfring elfr...@users.sourceforge.net
Date: Tue, 18 Nov 2014 20:37:05 +0100
The functions free_percpu() and module_put() test whether their argument
is NULL and then return immediately. Thus the test around the call is
not needed.
This issue was detected by using the Coccinelle
From: Markus Elfring elfr...@users.sourceforge.net
Date: Tue, 18 Nov 2014 21:03:13 +0100
The __module_get() 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.
From: Markus Elfring elfr...@users.sourceforge.net
Date: Tue, 18 Nov 2014 21:21:16 +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:
From: Markus Elfring elfr...@users.sourceforge.net
Date: Tue, 18 Nov 2014 21:41:26 +0100
The ipcomp_free_tfms() 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.
From: Markus Elfring elfr...@users.sourceforge.net
Date: Tue, 18 Nov 2014 21:57:14 +0100
The key_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.
Signed-off-by:
index 3995f54..f1e7d45 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -1527,8 +1527,7 @@ int register_kprobe(struct kprobe *p)
out:
mutex_unlock(kprobe_mutex);
-if (probed_mod)
-module_put(probed_mod);
+module_put(probed_mod);
This is OK, but I you
From: Markus Elfring elfr...@users.sourceforge.net
Date: Wed, 19 Nov 2014 10:11:04 +0100
The kzfree() 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:
The ipcomp_free_tfms() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.
It doesn't though...
You are right that this function implementation does a bit more before
returning because of a detected null pointer.
From: Markus Elfring elfr...@users.sourceforge.net
Date: Wed, 19 Nov 2014 11:38:38 +0100
The vunmap() function performes also input parameter validation. Thus the test
around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
From: Markus Elfring elfr...@users.sourceforge.net
Date: Wed, 19 Nov 2014 12:21:24 +0100
The wakeup_source_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.
From: Markus Elfring elfr...@users.sourceforge.net
Date: Wed, 19 Nov 2014 13:33:32 +0100
The lc_destroy() 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.
From: Markus Elfring elfr...@users.sourceforge.net
Date: Wed, 19 Nov 2014 14:24:20 +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.
From: Markus Elfring elfr...@users.sourceforge.net
Date: Wed, 19 Nov 2014 14:44:15 +0100
The tpm_dev_vendor_release() 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.
From: Markus Elfring elfr...@users.sourceforge.net
Date: Wed, 19 Nov 2014 16:00:13 +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.
From: Markus Elfring elfr...@users.sourceforge.net
Date: Wed, 19 Nov 2014 16:33:17 +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.
From: Markus Elfring elfr...@users.sourceforge.net
Date: Wed, 19 Nov 2014 17:05:20 +0100
The drm_fbdev_cma_hotplug_event() 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
From: Markus Elfring elfr...@users.sourceforge.net
Date: Wed, 19 Nov 2014 17:33:32 +0100
The vunmap() function performes also input parameter validation. Thus the test
around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
From: Markus Elfring elfr...@users.sourceforge.net
Date: Wed, 19 Nov 2014 17:50:19 +0100
The vfree() function performes also input parameter validation. Thus the test
around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
From: Markus Elfring elfr...@users.sourceforge.net
Date: Wed, 19 Nov 2014 18:30:22 +0100
The functions backlight_device_unregister(), lcd_device_unregister() and
rc_unregister_device() test whether their argument is NULL and then
return immediately. Thus the test around the call is not needed.
From: Markus Elfring elfr...@users.sourceforge.net
Date: Wed, 19 Nov 2014 19:19:21 +0100
The functions kfree() and pci_dev_put() test whether their argument is NULL
and then return immediately. Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Marcus, what tree are you looking at?
I dared to base this update suggestion on the source files
for Linux 3.17.3. Are newer software developments relevant here?
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/log/net/sched/
Regards,
Markus
--
To unsubscribe from this list:
From: Markus Elfring elfr...@users.sourceforge.net
Date: Wed, 19 Nov 2014 20:48:26 +0100
The vfree() function performs also input parameter validation. Thus the test
around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
From: Markus Elfring elfr...@users.sourceforge.net
Date: Wed, 19 Nov 2014 21:25:39 +0100
The kobject_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.
From: Markus Elfring elfr...@users.sourceforge.net
Date: Wed, 19 Nov 2014 21:48:10 +0100
The functions dm_table_destroy() and vfree() perform also input
parameter validation. Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by:
From: Markus Elfring elfr...@users.sourceforge.net
Date: Wed, 19 Nov 2014 23:30:37 +0100
Another update suggestion was taken into account after a patch was applied
from static source code analysis.
Markus Elfring (3):
DVB-frontends: Deletion of unnecessary checks before the function
call
From: Markus Elfring elfr...@users.sourceforge.net
Date: Wed, 19 Nov 2014 23:20:51 +0100
The release_firmware() function was called in some cases by the
m88ds3103_init() function during error handling even if the passed variable
contained still a null pointer. This implementation detail could be
From: Markus Elfring elfr...@users.sourceforge.net
Date: Wed, 19 Nov 2014 22:27:24 +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.
From: Markus Elfring elfr...@users.sourceforge.net
Date: Wed, 19 Nov 2014 23:23:15 +0100
The release_firmware() function was called in some cases by the
si2168_init() function during error handling even if the passed variable
contained still a null pointer. This implementation detail could be
From: Markus Elfring elfr...@users.sourceforge.net
Date: Thu, 20 Nov 2014 10:49:07 +0100
The dvb_unregister_device() 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.
From: Markus Elfring elfr...@users.sourceforge.net
Date: Thu, 20 Nov 2014 11:13:16 +0100
The rc_unregister_device() 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.
From: Markus Elfring elfr...@users.sourceforge.net
Date: Thu, 20 Nov 2014 11:44:20 +0100
The functions i2c_put_adapter() and release_firmware() test whether their
argument is NULL and then return immediately. Thus the test around the call
is not needed.
This issue was detected by using the
From: Markus Elfring elfr...@users.sourceforge.net
Date: Thu, 20 Nov 2014 13:01:32 +0100
The functions input_free_device() and rc_close() test whether their argument
is NULL and then return immediately. Thus the test around the call
is not needed.
This issue was detected by using the Coccinelle
From: Markus Elfring elfr...@users.sourceforge.net
Date: Thu, 20 Nov 2014 13:26:36 +0100
The functions pvr2_hdw_destroy(), rc_unregister_device() and vfree() perform
also input parameter validation. Thus the test around the call is not needed.
This issue was detected by using the Coccinelle
From: Markus Elfring elfr...@users.sourceforge.net
Date: Thu, 20 Nov 2014 13:50:43 +0100
The functions kfree() and pci_dev_put() test whether their argument is NULL
and then return immediately. Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
From: Markus Elfring elfr...@users.sourceforge.net
Date: Thu, 20 Nov 2014 14:22:47 +0100
The of_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.
From: Markus Elfring elfr...@users.sourceforge.net
Date: Thu, 20 Nov 2014 14:47:12 +0100
The functions kfree() and of_node_put() test whether their argument is NULL
and then return immediately. Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
From: Markus Elfring elfr...@users.sourceforge.net
Date: Thu, 20 Nov 2014 15:15:21 +0100
The vfree() function performs also input parameter validation. Thus the test
around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: 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:
From: Markus Elfring elfr...@users.sourceforge.net
Date: Thu, 20 Nov 2014 16:42:51 +0100
The functions brcmu_pkt_buf_free_skb() and release_firmware() test whether
their argument is NULL and then return immediately. Thus the test around
the call is not needed.
This issue was detected by using
Sorry but you're too late as someone else has already fixed this :)
Thanks for your feedback.
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/crypto/drbg.c?id=46f64f6ef978dc1f36ebaa50ed79c7c8386711ee
Regards,
Markus
--
To unsubscribe from this list: send the line
From: Markus Elfring elfr...@users.sourceforge.net
Date: Thu, 20 Nov 2014 17:42:23 +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.
From: Markus Elfring elfr...@users.sourceforge.net
Date: Thu, 20 Nov 2014 18:11:28 +0100
The put_disk() 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:
From: Markus Elfring elfr...@users.sourceforge.net
Date: Thu, 20 Nov 2014 18:48:52 +0100
The put_device() 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.
From: Markus Elfring elfr...@users.sourceforge.net
Date: Thu, 20 Nov 2014 20:10:19 +0100
The fc_fcp_ddp_done() 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.
From: Markus Elfring elfr...@users.sourceforge.net
Date: Thu, 20 Nov 2014 20:37:30 +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.
From: Markus Elfring elfr...@users.sourceforge.net
Date: Thu, 20 Nov 2014 23:18: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:
From: Markus Elfring elfr...@users.sourceforge.net
Date: Thu, 20 Nov 2014 23:43:17 +0100
The vfree() function performs also input parameter validation. Thus the test
around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
From: Markus Elfring elfr...@users.sourceforge.net
Date: Fri, 21 Nov 2014 09:15:10 +0100
The dst_release() 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.
From: Markus Elfring elfr...@users.sourceforge.net
Date: Fri, 21 Nov 2014 09:39:43 +0100
The vfree() function performs also input parameter validation. Thus the test
around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
From: Markus Elfring elfr...@users.sourceforge.net
Date: Fri, 21 Nov 2014 10:25:45 +0100
The module_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.
From: Markus Elfring elfr...@users.sourceforge.net
Date: Fri, 21 Nov 2014 11:06:33 +0100
The functions cpufreq_cooling_unregister() and thermal_zone_device_unregister()
test whether their argument is NULL and then return immediately.
Thus the test around the call is not needed.
This issue was
From: Markus Elfring elfr...@users.sourceforge.net
Date: Fri, 21 Nov 2014 11:30:18 +0100
The ring_free() 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.
From: Markus Elfring elfr...@users.sourceforge.net
Date: Fri, 21 Nov 2014 12:40:32 +0100
The tty_kref_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.
ring_free does not check for null:
http://lxr.free-electrons.com/source/drivers/thunderbolt/nhi.c#L398
Maybe your software confuses the method with:
http://lxr.free-electrons.com/source/drivers/char/tpm/xen-tpmfront.c#L268
Thanks for your feedback.
I am sorry for a bit of confusion here.
From: Markus Elfring elfr...@users.sourceforge.net
Date: Fri, 21 Nov 2014 13:42:29 +0100
The functions put_device() and tty_kref_put() test whether their argument
is NULL and then return immediately.
Thus the test around the call is not needed.
This issue was detected by using the Coccinelle
for (i = 0; i th_zone-cool_dev_size; i++) {
-if (th_zone-cool_dev[i])
-cpufreq_cooling_unregister(th_zone-cool_dev[i]);
+cpufreq_cooling_unregister(th_zone-cool_dev[i]);
}
Now you have unnecessary {}
How are the chances that your
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.
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.
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.
1 - 100 of 10642 matches
Mail list logo