Thread (8 messages) read the whole thread 8 messages, 7 authors, 2020-01-08

Re: [PATCH] treewide: remove redundent IS_ERR() before error code check

From: "Rafael J. Wysocki" <rafael@kernel.org>
Date: 2020-01-07 09:53:11
Also in: alsa-devel, linux-acpi, linux-arm-kernel, linux-clk, linux-crypto, linux-devicetree, linux-gpio, linux-i2c, lkml

On Mon, Jan 6, 2020 at 6:11 AM Masahiro Yamada [off-list ref] wrote:
'PTR_ERR(p) == -E*' is a stronger condition than IS_ERR(p).
Hence, IS_ERR(p) is unneeded.

The semantic patch that generates this commit is as follows:

// <smpl>
@@
expression ptr;
constant error_code;
@@
-IS_ERR(ptr) && (PTR_ERR(ptr) == - error_code)
+PTR_ERR(ptr) == - error_code
// </smpl>

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
Acked-by: Rafael J. Wysocki <redacted>

for the acpi/scan.c change, but there seems to be a typo in the subject:

s/redundent/redundant/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help