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: <e9062811-76ff-4728-17f2-c43fb40af9ed@huawei.com>
Date:   Mon, 31 May 2021 20:38:55 +0800
From:   "libaokun (A)" <libaokun1@...wei.com>
To:     <bskeggs@...hat.com>, <airlied@...ux.ie>, <daniel@...ll.ch>,
        <lyude@...hat.com>, <airlied@...hat.com>, <jajones@...dia.com>,
        <dri-devel@...ts.freedesktop.org>, <nouveau@...ts.freedesktop.org>,
        <linux-kernel@...r.kernel.org>
CC:     <weiyongjun1@...wei.com>, <yuehaibing@...wei.com>,
        <yangjihong1@...wei.com>, <yukuai3@...wei.com>
Subject: Re: [PATCH -next] drm/nouveau:disp: Remove set but not used variable
 'ret'

ping

在 2021/5/15 17:01, Baokun Li 写道:
> From: "libaokun1@...wei.com" <libaokun1@...wei.com>
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/gpu/drm/nouveau/dispnv50/disp.c: In function 'nv50_mstm_cleanup':
> drivers/gpu/drm/nouveau/dispnv50/disp.c:1389:6: warning:
>   variable ‘ret’ set but not used [-Wunused-but-set-variable]
>
> drivers/gpu/drm/nouveau/dispnv50/disp.c: In function 'nv50_mstm_prepare':
> drivers/gpu/drm/nouveau/dispnv50/disp.c:1413:6: warning:
>   variable ‘ret’ set but not used [-Wunused-but-set-variable]
>
> It never used since introduction.
>
> Signed-off-by: Baokun Li <libaokun1@...wei.com>
> ---
>   drivers/gpu/drm/nouveau/dispnv50/disp.c | 9 +++------
>   1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> index 1c9c0cdf85db..5ee3f1fc76d7 100644
> --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
> +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> @@ -1386,12 +1386,10 @@ nv50_mstm_cleanup(struct nv50_mstm *mstm)
>   {
>   	struct nouveau_drm *drm = nouveau_drm(mstm->outp->base.base.dev);
>   	struct drm_encoder *encoder;
> -	int ret;
>   
>   	NV_ATOMIC(drm, "%s: mstm cleanup\n", mstm->outp->base.base.name);
> -	ret = drm_dp_check_act_status(&mstm->mgr);
> -
> -	ret = drm_dp_update_payload_part2(&mstm->mgr);
> +	drm_dp_check_act_status(&mstm->mgr);
> +	drm_dp_update_payload_part2(&mstm->mgr);
>   
>   	drm_for_each_encoder(encoder, mstm->outp->base.base.dev) {
>   		if (encoder->encoder_type == DRM_MODE_ENCODER_DPMST) {
> @@ -1410,10 +1408,9 @@ nv50_mstm_prepare(struct nv50_mstm *mstm)
>   {
>   	struct nouveau_drm *drm = nouveau_drm(mstm->outp->base.base.dev);
>   	struct drm_encoder *encoder;
> -	int ret;
>   
>   	NV_ATOMIC(drm, "%s: mstm prepare\n", mstm->outp->base.base.name);
> -	ret = drm_dp_update_payload_part1(&mstm->mgr);
> +	drm_dp_update_payload_part1(&mstm->mgr);
>   
>   	drm_for_each_encoder(encoder, mstm->outp->base.base.dev) {
>   		if (encoder->encoder_type == DRM_MODE_ENCODER_DPMST) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ