lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190628040215.GA24852@intel.com>
Date:   Fri, 28 Jun 2019 09:32:15 +0530
From:   Ramalingam C <ramalingam.c@...el.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        Maxime Ripard <maxime.ripard@...tlin.com>,
        Sean Paul <sean@...rly.run>, David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        Noralf Trønnes <noralf@...nnes.org>,
        Alex Deucher <alexander.deucher@....com>,
        Ville Syrjälä <ville.syrjala@...ux.intel.com>,
        Nicholas Kazlauskas <nicholas.kazlauskas@....com>,
        Lyude Paul <lyude@...hat.com>,
        Uma Shankar <uma.shankar@...el.com>,
        Boris Brezillon <bbrezillon@...nel.org>,
        Radhakrishna Sripada <radhakrishna.sripada@...el.com>,
        dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm: connector: remove bogus NULL check

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@...db.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@...z%s%s%s\n",
>  		      connector->name,
> -		      mode->name ? mode->name : "",
> +		      mode->name,
Looks good to me.

Reviewed-by: Ramalingam C <ramlaingam.c@...el.com>
>  		      mode->xres, mode->yres,
>  		      mode->refresh_specified ? mode->refresh : 60,
>  		      mode->rb ? " reduced blanking" : "",
> -- 
> 2.20.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ