Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1639358 > unrolled thread

[PATCH 1/2] of: remove extraneous 'const' in typedef

Started byArnd Bergmann <arnd@arndb.de>
First post2017-05-11 14:30 +0200
Last post2017-05-11 17:20 +0200
Articles 4 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/2] of: remove extraneous 'const' in typedef Arnd Bergmann <arnd@arndb.de> - 2017-05-11 14:30 +0200
    Re: [PATCH 1/2] of: remove extraneous 'const' in typedef Rob Herring <robh+dt@kernel.org> - 2017-05-11 16:50 +0200
      Re: [PATCH 1/2] of: remove extraneous 'const' in typedef Arnd Bergmann <arnd@arndb.de> - 2017-05-11 17:10 +0200
        Re: [PATCH 1/2] of: remove extraneous 'const' in typedef Rob Herring <robh+dt@kernel.org> - 2017-05-11 17:20 +0200

#1639358 — [PATCH 1/2] of: remove extraneous 'const' in typedef

FromArnd Bergmann <arnd@arndb.de>
Date2017-05-11 14:30 +0200
Subject[PATCH 1/2] of: remove extraneous 'const' in typedef
Message-ID<tFVod-6fr-3@gated-at.bofh.it>
One change that was meant to address a sparse warning turned out
to cause hundreds of new gcc-7 warnings:

include/linux/of_irq.h:11:13: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers]

After reverting the change, the gcc warnings are gone again, and I
can't reproduce the sparse warnings either.

Fixes: 17a70355ea57 ("of: fix sparse warnings in fdt, irq, reserved mem, and resolver code")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 include/linux/of_irq.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h
index ec6b11deb773..1e0deb8e8494 100644
--- a/include/linux/of_irq.h
+++ b/include/linux/of_irq.h
@@ -8,7 +8,7 @@
 #include <linux/ioport.h>
 #include <linux/of.h>
 
-typedef int const (*of_irq_init_cb_t)(struct device_node *, struct device_node *);
+typedef int (*of_irq_init_cb_t)(struct device_node *, struct device_node *);
 
 /*
  * Workarounds only applied to 32bit powermac machines
-- 
2.9.0

[toc] | [next] | [standalone]


#1639647

FromRob Herring <robh+dt@kernel.org>
Date2017-05-11 16:50 +0200
Message-ID<tFXzJ-7Av-47@gated-at.bofh.it>
In reply to#1639358
On Thu, May 11, 2017 at 7:24 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> One change that was meant to address a sparse warning turned out
> to cause hundreds of new gcc-7 warnings:

I guess you are the only one on gcc-7.

> include/linux/of_irq.h:11:13: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers]
>
> After reverting the change, the gcc warnings are gone again, and I
> can't reproduce the sparse warnings either.

Humm, maybe different sparse versions? I'm on 0.5.0.

>
> Fixes: 17a70355ea57 ("of: fix sparse warnings in fdt, irq, reserved mem, and resolver code")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  include/linux/of_irq.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h
> index ec6b11deb773..1e0deb8e8494 100644
> --- a/include/linux/of_irq.h
> +++ b/include/linux/of_irq.h
> @@ -8,7 +8,7 @@
>  #include <linux/ioport.h>
>  #include <linux/of.h>
>
> -typedef int const (*of_irq_init_cb_t)(struct device_node *, struct device_node *);
> +typedef int (*of_irq_init_cb_t)(struct device_node *, struct device_node *);
>
>  /*
>   * Workarounds only applied to 32bit powermac machines
> --
> 2.9.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[toc] | [prev] | [next] | [standalone]


#1639666

FromArnd Bergmann <arnd@arndb.de>
Date2017-05-11 17:10 +0200
Message-ID<tFXT4-7X6-37@gated-at.bofh.it>
In reply to#1639647
On Thu, May 11, 2017 at 4:44 PM, Rob Herring <robh+dt@kernel.org> wrote:
> On Thu, May 11, 2017 at 7:24 AM, Arnd Bergmann <arnd@arndb.de> wrote:
>> One change that was meant to address a sparse warning turned out
>> to cause hundreds of new gcc-7 warnings:
>
> I guess you are the only one on gcc-7.

It was just released last week or so. I actually had been using it for
a while but accidentally disabled a lot of the warning output until now
some others started using it too and asked me about it.

>> include/linux/of_irq.h:11:13: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers]
>>
>> After reverting the change, the gcc warnings are gone again, and I
>> can't reproduce the sparse warnings either.
>
> Humm, maybe different sparse versions? I'm on 0.5.0.

I have v0.5.0-183-gfbbfc73. To clarify, I did not get a sparse warning after my
patch, I did not try reverting your patch first.

      Arnd

[toc] | [prev] | [next] | [standalone]


#1639721

FromRob Herring <robh+dt@kernel.org>
Date2017-05-11 17:20 +0200
Message-ID<tFY2N-81A-81@gated-at.bofh.it>
In reply to#1639666
On Thu, May 11, 2017 at 10:03 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Thu, May 11, 2017 at 4:44 PM, Rob Herring <robh+dt@kernel.org> wrote:
>> On Thu, May 11, 2017 at 7:24 AM, Arnd Bergmann <arnd@arndb.de> wrote:
>>> One change that was meant to address a sparse warning turned out
>>> to cause hundreds of new gcc-7 warnings:
>>
>> I guess you are the only one on gcc-7.
>
> It was just released last week or so. I actually had been using it for
> a while but accidentally disabled a lot of the warning output until now
> some others started using it too and asked me about it.
>
>>> include/linux/of_irq.h:11:13: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers]
>>>
>>> After reverting the change, the gcc warnings are gone again, and I
>>> can't reproduce the sparse warnings either.
>>
>> Humm, maybe different sparse versions? I'm on 0.5.0.
>
> I have v0.5.0-183-gfbbfc73. To clarify, I did not get a sparse warning after my
> patch, I did not try reverting your patch first.

Indeed, the warnings are gone with current sparse from git.

Rob

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web