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: <CA+M3ks7ha2PkznLJ8JO=ZLo9eN2Q3ijiR+Zw9x2PKPH3Vwbovw@mail.gmail.com>
Date:   Tue, 7 Jan 2020 14:13:38 +0100
From:   Benjamin Gaignard <benjamin.gaignard@...aro.org>
To:     Benjamin Gaignard <benjamin.gaignard@...com>
Cc:     Jani Nikula <jani.nikula@...ux.intel.com>,
        Thomas Zimmermann <tzimmermann@...e.de>,
        Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        Maxime Ripard <mripard@...nel.org>,
        Sean Paul <sean@...rly.run>, David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>, yakui.zhao@...el.com,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        ML dri-devel <dri-devel@...ts.freedesktop.org>
Subject: Re: [PATCH] drm/modes: tag unused variables to avoid warnings

Le mer. 11 déc. 2019 à 10:20, Benjamin Gaignard
<benjamin.gaignard@...com> a écrit :
>
> Some variables are set but never used. To avoid warning when compiling
> with W=1 and keep the algorithm like it is tag theses variables
> with _maybe_unused macro.

Gentle ping.
Thanks,
Benjamin

>
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@...com>
> ---
> changes in this version:
> - do not modify the code to remove the unused variables
>   just prefix them with __maybe_unused macro.
>
>  drivers/gpu/drm/drm_modes.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
> index 88232698d7a0..70aed4e2990d 100644
> --- a/drivers/gpu/drm/drm_modes.c
> +++ b/drivers/gpu/drm/drm_modes.c
> @@ -233,7 +233,7 @@ struct drm_display_mode *drm_cvt_mode(struct drm_device *dev, int hdisplay,
>                 /* 3) Nominal HSync width (% of line period) - default 8 */
>  #define CVT_HSYNC_PERCENTAGE   8
>                 unsigned int hblank_percentage;
> -               int vsyncandback_porch, vback_porch, hblank;
> +               int vsyncandback_porch, __maybe_unused vback_porch, hblank;
>
>                 /* estimated the horizontal period */
>                 tmp1 = HV_FACTOR * 1000000  -
> @@ -386,9 +386,10 @@ drm_gtf_mode_complex(struct drm_device *dev, int hdisplay, int vdisplay,
>         int top_margin, bottom_margin;
>         int interlace;
>         unsigned int hfreq_est;
> -       int vsync_plus_bp, vback_porch;
> -       unsigned int vtotal_lines, vfieldrate_est, hperiod;
> -       unsigned int vfield_rate, vframe_rate;
> +       int vsync_plus_bp, __maybe_unused vback_porch;
> +       unsigned int vtotal_lines, __maybe_unused vfieldrate_est;
> +       unsigned int __maybe_unused hperiod;
> +       unsigned int vfield_rate, __maybe_unused vframe_rate;
>         int left_margin, right_margin;
>         unsigned int total_active_pixels, ideal_duty_cycle;
>         unsigned int hblank, total_pixels, pixel_freq;
> --
> 2.15.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ