2020-04-17 08:59:03

by Jason Yan

[permalink] [raw]
Subject: [PATCH] backlight: qcom-wled: remove 'wled4_string_cfg' and 'wled3_string_cfg'

Fix the following gcc warning:

drivers/video/backlight/qcom-wled.c:939:34: warning: ‘wled4_string_cfg’
defined but not used [-Wunused-const-variable=]
static const struct wled_var_cfg wled4_string_cfg = {
^~~~~~~~~~~~~~~~
drivers/video/backlight/qcom-wled.c:935:34: warning: ‘wled3_string_cfg’
defined but not used [-Wunused-const-variable=]
static const struct wled_var_cfg wled3_string_cfg = {
^~~~~~~~~~~~~~~~

Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Jason Yan <[email protected]>
---
drivers/video/backlight/qcom-wled.c | 8 --------
1 file changed, 8 deletions(-)

diff --git a/drivers/video/backlight/qcom-wled.c b/drivers/video/backlight/qcom-wled.c
index 3d276b30a78c..df53fbd5cd03 100644
--- a/drivers/video/backlight/qcom-wled.c
+++ b/drivers/video/backlight/qcom-wled.c
@@ -932,14 +932,6 @@ static const struct wled_var_cfg wled4_string_i_limit_cfg = {
.size = ARRAY_SIZE(wled4_string_i_limit_values),
};

-static const struct wled_var_cfg wled3_string_cfg = {
- .size = 8,
-};
-
-static const struct wled_var_cfg wled4_string_cfg = {
- .size = 16,
-};
-
static u32 wled_values(const struct wled_var_cfg *cfg, u32 idx)
{
if (idx >= cfg->size)
--
2.21.1


2020-04-20 15:23:52

by Daniel Thompson

[permalink] [raw]
Subject: Re: [PATCH] backlight: qcom-wled: remove 'wled4_string_cfg' and 'wled3_string_cfg'

On Fri, Apr 17, 2020 at 05:23:35PM +0800, Jason Yan wrote:
> Fix the following gcc warning:
>
> drivers/video/backlight/qcom-wled.c:939:34: warning: ‘wled4_string_cfg’
> defined but not used [-Wunused-const-variable=]
> static const struct wled_var_cfg wled4_string_cfg = {
> ^~~~~~~~~~~~~~~~
> drivers/video/backlight/qcom-wled.c:935:34: warning: ‘wled3_string_cfg’
> defined but not used [-Wunused-const-variable=]
> static const struct wled_var_cfg wled3_string_cfg = {
> ^~~~~~~~~~~~~~~~
>
> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: Jason Yan <[email protected]>

Reviewed-by: Daniel Thompson <[email protected]>


> ---
> drivers/video/backlight/qcom-wled.c | 8 --------
> 1 file changed, 8 deletions(-)
>
> diff --git a/drivers/video/backlight/qcom-wled.c b/drivers/video/backlight/qcom-wled.c
> index 3d276b30a78c..df53fbd5cd03 100644
> --- a/drivers/video/backlight/qcom-wled.c
> +++ b/drivers/video/backlight/qcom-wled.c
> @@ -932,14 +932,6 @@ static const struct wled_var_cfg wled4_string_i_limit_cfg = {
> .size = ARRAY_SIZE(wled4_string_i_limit_values),
> };
>
> -static const struct wled_var_cfg wled3_string_cfg = {
> - .size = 8,
> -};
> -
> -static const struct wled_var_cfg wled4_string_cfg = {
> - .size = 16,
> -};
> -
> static u32 wled_values(const struct wled_var_cfg *cfg, u32 idx)
> {
> if (idx >= cfg->size)
> --
> 2.21.1
>