* Re: [PATCH] drm: connector: remove bogus NULL check
2019-06-28 10:39 [PATCH] drm: connector: remove bogus NULL check Arnd Bergmann
@ 2019-06-28 4:02 ` Ramalingam C
2019-06-28 10:41 ` Boris Brezillon
2019-07-02 15:09 ` Boris Brezillon
2 siblings, 0 replies; 4+ messages in thread
From: Ramalingam C @ 2019-06-28 4:02 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Maarten Lankhorst, Maxime Ripard, Sean Paul, David Airlie,
Daniel Vetter, Noralf Trønnes, Alex Deucher,
Ville Syrjälä,
Nicholas Kazlauskas, Lyude Paul, Uma Shankar, Boris Brezillon,
Radhakrishna Sripada, dri-devel, linux-kernel
On 2019-06-28 at 12:39:05 +0200, Arnd Bergmann wrote:
> mode->name is a character array in a structure, checking it's
> address is pointless and causes a warning with some compilers:
>
> drivers/gpu/drm/drm_connector.c:144:15: error: address of array 'mode->name' will always evaluate to 'true'
> [-Werror,-Wpointer-bool-conversion]
> mode->name ? mode->name : "",
> ~~~~~~^~~~ ~
> include/drm/drm_print.h:366:29: note: expanded from macro 'DRM_DEBUG_KMS'
> drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
> ^~~~~~~~~~~
>
> Remove the check here.
>
> Fixes: 3aeeb13d8996 ("drm/modes: Support modes names on the command line")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/gpu/drm/drm_connector.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
> index 3afed5677946..b3f2cf7eae9c 100644
> --- a/drivers/gpu/drm/drm_connector.c
> +++ b/drivers/gpu/drm/drm_connector.c
> @@ -141,7 +141,7 @@ static void drm_connector_get_cmdline_mode(struct drm_connector *connector)
>
> DRM_DEBUG_KMS("cmdline mode for connector %s %s %dx%d@%dHz%s%s%s\n",
> connector->name,
> - mode->name ? mode->name : "",
> + mode->name,
Looks good to me.
Reviewed-by: Ramalingam C <ramlaingam.c@intel.com>
> mode->xres, mode->yres,
> mode->refresh_specified ? mode->refresh : 60,
> mode->rb ? " reduced blanking" : "",
> --
> 2.20.0
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] drm: connector: remove bogus NULL check
@ 2019-06-28 10:39 Arnd Bergmann
2019-06-28 4:02 ` Ramalingam C
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Arnd Bergmann @ 2019-06-28 10:39 UTC (permalink / raw)
To: Maarten Lankhorst, Maxime Ripard, Sean Paul, David Airlie, Daniel Vetter
Cc: Arnd Bergmann, Noralf Trønnes, Alex Deucher,
Ville Syrjälä,
Nicholas Kazlauskas, Lyude Paul, Uma Shankar, Boris Brezillon,
Ramalingam C, Radhakrishna Sripada, dri-devel, linux-kernel
mode->name is a character array in a structure, checking it's
address is pointless and causes a warning with some compilers:
drivers/gpu/drm/drm_connector.c:144:15: error: address of array 'mode->name' will always evaluate to 'true'
[-Werror,-Wpointer-bool-conversion]
mode->name ? mode->name : "",
~~~~~~^~~~ ~
include/drm/drm_print.h:366:29: note: expanded from macro 'DRM_DEBUG_KMS'
drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
^~~~~~~~~~~
Remove the check here.
Fixes: 3aeeb13d8996 ("drm/modes: Support modes names on the command line")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/gpu/drm/drm_connector.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
index 3afed5677946..b3f2cf7eae9c 100644
--- a/drivers/gpu/drm/drm_connector.c
+++ b/drivers/gpu/drm/drm_connector.c
@@ -141,7 +141,7 @@ static void drm_connector_get_cmdline_mode(struct drm_connector *connector)
DRM_DEBUG_KMS("cmdline mode for connector %s %s %dx%d@%dHz%s%s%s\n",
connector->name,
- mode->name ? mode->name : "",
+ mode->name,
mode->xres, mode->yres,
mode->refresh_specified ? mode->refresh : 60,
mode->rb ? " reduced blanking" : "",
--
2.20.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm: connector: remove bogus NULL check
2019-06-28 10:39 [PATCH] drm: connector: remove bogus NULL check Arnd Bergmann
2019-06-28 4:02 ` Ramalingam C
@ 2019-06-28 10:41 ` Boris Brezillon
2019-07-02 15:09 ` Boris Brezillon
2 siblings, 0 replies; 4+ messages in thread
From: Boris Brezillon @ 2019-06-28 10:41 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Maarten Lankhorst, Maxime Ripard, Sean Paul, David Airlie,
Daniel Vetter, Noralf Trønnes, Alex Deucher,
Ville Syrjälä,
Nicholas Kazlauskas, Lyude Paul, Uma Shankar, Boris Brezillon,
Ramalingam C, Radhakrishna Sripada, dri-devel, linux-kernel
On Fri, 28 Jun 2019 12:39:05 +0200
Arnd Bergmann <arnd@arndb.de> wrote:
> mode->name is a character array in a structure, checking it's
> address is pointless and causes a warning with some compilers:
>
> drivers/gpu/drm/drm_connector.c:144:15: error: address of array 'mode->name' will always evaluate to 'true'
> [-Werror,-Wpointer-bool-conversion]
> mode->name ? mode->name : "",
> ~~~~~~^~~~ ~
> include/drm/drm_print.h:366:29: note: expanded from macro 'DRM_DEBUG_KMS'
> drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
> ^~~~~~~~~~~
>
> Remove the check here.
>
> Fixes: 3aeeb13d8996 ("drm/modes: Support modes names on the command line")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
> ---
> drivers/gpu/drm/drm_connector.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
> index 3afed5677946..b3f2cf7eae9c 100644
> --- a/drivers/gpu/drm/drm_connector.c
> +++ b/drivers/gpu/drm/drm_connector.c
> @@ -141,7 +141,7 @@ static void drm_connector_get_cmdline_mode(struct drm_connector *connector)
>
> DRM_DEBUG_KMS("cmdline mode for connector %s %s %dx%d@%dHz%s%s%s\n",
> connector->name,
> - mode->name ? mode->name : "",
> + mode->name,
> mode->xres, mode->yres,
> mode->refresh_specified ? mode->refresh : 60,
> mode->rb ? " reduced blanking" : "",
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm: connector: remove bogus NULL check
2019-06-28 10:39 [PATCH] drm: connector: remove bogus NULL check Arnd Bergmann
2019-06-28 4:02 ` Ramalingam C
2019-06-28 10:41 ` Boris Brezillon
@ 2019-07-02 15:09 ` Boris Brezillon
2 siblings, 0 replies; 4+ messages in thread
From: Boris Brezillon @ 2019-07-02 15:09 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Maarten Lankhorst, Maxime Ripard, Sean Paul, David Airlie,
Daniel Vetter, Noralf Trønnes, Alex Deucher,
Ville Syrjälä,
Nicholas Kazlauskas, Lyude Paul, Uma Shankar, Boris Brezillon,
Ramalingam C, Radhakrishna Sripada, dri-devel, linux-kernel
On Fri, 28 Jun 2019 12:39:05 +0200
Arnd Bergmann <arnd@arndb.de> wrote:
> mode->name is a character array in a structure, checking it's
> address is pointless and causes a warning with some compilers:
>
> drivers/gpu/drm/drm_connector.c:144:15: error: address of array 'mode->name' will always evaluate to 'true'
> [-Werror,-Wpointer-bool-conversion]
> mode->name ? mode->name : "",
> ~~~~~~^~~~ ~
> include/drm/drm_print.h:366:29: note: expanded from macro 'DRM_DEBUG_KMS'
> drm_dbg(DRM_UT_KMS, fmt, ##__VA_ARGS__)
> ^~~~~~~~~~~
>
> Remove the check here.
>
> Fixes: 3aeeb13d8996 ("drm/modes: Support modes names on the command line")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Queued to drm-misc-next-fixes.
Thanks,
Boris
> ---
> drivers/gpu/drm/drm_connector.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
> index 3afed5677946..b3f2cf7eae9c 100644
> --- a/drivers/gpu/drm/drm_connector.c
> +++ b/drivers/gpu/drm/drm_connector.c
> @@ -141,7 +141,7 @@ static void drm_connector_get_cmdline_mode(struct drm_connector *connector)
>
> DRM_DEBUG_KMS("cmdline mode for connector %s %s %dx%d@%dHz%s%s%s\n",
> connector->name,
> - mode->name ? mode->name : "",
> + mode->name,
> mode->xres, mode->yres,
> mode->refresh_specified ? mode->refresh : 60,
> mode->rb ? " reduced blanking" : "",
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-07-02 15:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-28 10:39 [PATCH] drm: connector: remove bogus NULL check Arnd Bergmann
2019-06-28 4:02 ` Ramalingam C
2019-06-28 10:41 ` Boris Brezillon
2019-07-02 15:09 ` Boris Brezillon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).