diff mbox series

[14/30] iio: dac: ad5064: Value returned by ad5064_vref_name may not be 'const * const'

Message ID 20200716135928.1456727-15-lee.jones@linaro.org (mailing list archive)
State New, archived
Headers show
Series First batch of W=1 fixes for IIO | expand

Commit Message

Lee Jones July 16, 2020, 1:59 p.m. UTC
Fixes the following W=1 kernel build warning(s):

 drivers/iio/dac/ad5064.c:790:8: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
 790 | static const char * const ad5064_vref_name(struct ad5064_state *st,
 | ^~~~~

Cc: Michael Hennerich <Michael.Hennerich@analog.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/iio/dac/ad5064.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jonathan Cameron July 18, 2020, 2:57 p.m. UTC | #1
On Thu, 16 Jul 2020 14:59:12 +0100
Lee Jones <lee.jones@linaro.org> wrote:

> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/iio/dac/ad5064.c:790:8: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
>  790 | static const char * const ad5064_vref_name(struct ad5064_state *st,
>  | ^~~~~
> 
> Cc: Michael Hennerich <Michael.Hennerich@analog.com>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Applied.

Thanks,

Jonathan

> ---
>  drivers/iio/dac/ad5064.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/dac/ad5064.c b/drivers/iio/dac/ad5064.c
> index d33642de9720e..303f6d1a5f311 100644
> --- a/drivers/iio/dac/ad5064.c
> +++ b/drivers/iio/dac/ad5064.c
> @@ -787,7 +787,7 @@ static const char * const ad5064_vref_names[] = {
>  	"vrefD",
>  };
>  
> -static const char * const ad5064_vref_name(struct ad5064_state *st,
> +static const char *ad5064_vref_name(struct ad5064_state *st,
>  	unsigned int vref)
>  {
>  	return st->chip_info->shared_vref ? "vref" : ad5064_vref_names[vref];
diff mbox series

Patch

diff --git a/drivers/iio/dac/ad5064.c b/drivers/iio/dac/ad5064.c
index d33642de9720e..303f6d1a5f311 100644
--- a/drivers/iio/dac/ad5064.c
+++ b/drivers/iio/dac/ad5064.c
@@ -787,7 +787,7 @@  static const char * const ad5064_vref_names[] = {
 	"vrefD",
 };
 
-static const char * const ad5064_vref_name(struct ad5064_state *st,
+static const char *ad5064_vref_name(struct ad5064_state *st,
 	unsigned int vref)
 {
 	return st->chip_info->shared_vref ? "vref" : ad5064_vref_names[vref];