* [PATCH] arm: mach-omap2: remove superfluous NULL pointer check
@ 2015-03-22 0:00 ` Stefan Agner
0 siblings, 0 replies; 4+ messages in thread
From: Stefan Agner @ 2015-03-22 0:00 UTC (permalink / raw)
To: tony; +Cc: linux-omap, linux-arm-kernel, linux-kernel, llvmlinux, Stefan Agner
The NULL pointer check for superset->muxnames will always evaluate
true since muxnames is an array within struct omap_mux. Remove the
superfluous check to avoid warnings when using LLVM/clang.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
For the reference, the warning generated by LLVM/clang:
arch/arm/mach-omap2/mux.c:1056:18: warning: address of array
'superset->muxnames' will always evaluate to 'true' [-Wpointer-bool-conversion]
if (!superset->muxnames || !superset->muxnames[0]) {
~~~~~~~~~~~^~~~~~~~
arch/arm/mach-omap2/mux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 78064b0..176eef6 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -1053,7 +1053,7 @@ static void __init omap_mux_init_list(struct omap_mux_partition *partition,
struct omap_mux *entry;
#ifdef CONFIG_OMAP_MUX
- if (!superset->muxnames || !superset->muxnames[0]) {
+ if (!superset->muxnames[0]) {
superset++;
continue;
}
--
2.3.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] arm: mach-omap2: remove superfluous NULL pointer check
@ 2015-03-22 0:00 ` Stefan Agner
0 siblings, 0 replies; 4+ messages in thread
From: Stefan Agner @ 2015-03-22 0:00 UTC (permalink / raw)
To: linux-arm-kernel
The NULL pointer check for superset->muxnames will always evaluate
true since muxnames is an array within struct omap_mux. Remove the
superfluous check to avoid warnings when using LLVM/clang.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
For the reference, the warning generated by LLVM/clang:
arch/arm/mach-omap2/mux.c:1056:18: warning: address of array
'superset->muxnames' will always evaluate to 'true' [-Wpointer-bool-conversion]
if (!superset->muxnames || !superset->muxnames[0]) {
~~~~~~~~~~~^~~~~~~~
arch/arm/mach-omap2/mux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 78064b0..176eef6 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -1053,7 +1053,7 @@ static void __init omap_mux_init_list(struct omap_mux_partition *partition,
struct omap_mux *entry;
#ifdef CONFIG_OMAP_MUX
- if (!superset->muxnames || !superset->muxnames[0]) {
+ if (!superset->muxnames[0]) {
superset++;
continue;
}
--
2.3.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] arm: mach-omap2: remove superfluous NULL pointer check
2015-03-22 0:00 ` Stefan Agner
@ 2015-03-26 17:34 ` Tony Lindgren
-1 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2015-03-26 17:34 UTC (permalink / raw)
To: Stefan Agner; +Cc: linux-omap, linux-arm-kernel, linux-kernel, llvmlinux
* Stefan Agner <stefan@agner.ch> [150321 17:00]:
> The NULL pointer check for superset->muxnames will always evaluate
> true since muxnames is an array within struct omap_mux. Remove the
> superfluous check to avoid warnings when using LLVM/clang.
>
> Signed-off-by: Stefan Agner <stefan@agner.ch>
Applying into omap-for-v4.1/fixes-not-urgent thanks.
Tony
> ---
> For the reference, the warning generated by LLVM/clang:
> arch/arm/mach-omap2/mux.c:1056:18: warning: address of array
> 'superset->muxnames' will always evaluate to 'true' [-Wpointer-bool-conversion]
> if (!superset->muxnames || !superset->muxnames[0]) {
> ~~~~~~~~~~~^~~~~~~~
>
> arch/arm/mach-omap2/mux.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
> index 78064b0..176eef6 100644
> --- a/arch/arm/mach-omap2/mux.c
> +++ b/arch/arm/mach-omap2/mux.c
> @@ -1053,7 +1053,7 @@ static void __init omap_mux_init_list(struct omap_mux_partition *partition,
> struct omap_mux *entry;
>
> #ifdef CONFIG_OMAP_MUX
> - if (!superset->muxnames || !superset->muxnames[0]) {
> + if (!superset->muxnames[0]) {
> superset++;
> continue;
> }
> --
> 2.3.3
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] arm: mach-omap2: remove superfluous NULL pointer check
@ 2015-03-26 17:34 ` Tony Lindgren
0 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2015-03-26 17:34 UTC (permalink / raw)
To: linux-arm-kernel
* Stefan Agner <stefan@agner.ch> [150321 17:00]:
> The NULL pointer check for superset->muxnames will always evaluate
> true since muxnames is an array within struct omap_mux. Remove the
> superfluous check to avoid warnings when using LLVM/clang.
>
> Signed-off-by: Stefan Agner <stefan@agner.ch>
Applying into omap-for-v4.1/fixes-not-urgent thanks.
Tony
> ---
> For the reference, the warning generated by LLVM/clang:
> arch/arm/mach-omap2/mux.c:1056:18: warning: address of array
> 'superset->muxnames' will always evaluate to 'true' [-Wpointer-bool-conversion]
> if (!superset->muxnames || !superset->muxnames[0]) {
> ~~~~~~~~~~~^~~~~~~~
>
> arch/arm/mach-omap2/mux.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
> index 78064b0..176eef6 100644
> --- a/arch/arm/mach-omap2/mux.c
> +++ b/arch/arm/mach-omap2/mux.c
> @@ -1053,7 +1053,7 @@ static void __init omap_mux_init_list(struct omap_mux_partition *partition,
> struct omap_mux *entry;
>
> #ifdef CONFIG_OMAP_MUX
> - if (!superset->muxnames || !superset->muxnames[0]) {
> + if (!superset->muxnames[0]) {
> superset++;
> continue;
> }
> --
> 2.3.3
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-03-26 17:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-22 0:00 [PATCH] arm: mach-omap2: remove superfluous NULL pointer check Stefan Agner
2015-03-22 0:00 ` Stefan Agner
2015-03-26 17:34 ` Tony Lindgren
2015-03-26 17:34 ` Tony Lindgren
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.