Re: [PATCH] drm/nouveau: fix returnvar.cocci warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reviewed-by: Lyude Paul <lyude@xxxxxxxxxx>

Will push upstream in a moment

On Mon, 2022-04-25 at 19:47 +0800, Guo Zhengkui wrote:
> Fix the following coccicheck warning:
> drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c:71:5-12:
> Unneeded variable: "disable". Return "0ULL" on line 85.
> 
> Signed-off-by: Guo Zhengkui <guozhengkui@xxxxxxxx>
> ---
>  drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c
> b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c
> index dc026ac1b595..3d0ab86c3115 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c
> @@ -68,7 +68,6 @@ gt215_devinit_disable(struct nvkm_devinit *init)
>         struct nvkm_device *device = init->subdev.device;
>         u32 r001540 = nvkm_rd32(device, 0x001540);
>         u32 r00154c = nvkm_rd32(device, 0x00154c);
> -       u64 disable = 0ULL;
>  
>         if (!(r001540 & 0x40000000)) {
>                 nvkm_subdev_disable(device, NVKM_ENGINE_MSPDEC, 0);
> @@ -82,7 +81,7 @@ gt215_devinit_disable(struct nvkm_devinit *init)
>         if (!(r00154c & 0x00000200))
>                 nvkm_subdev_disable(device, NVKM_ENGINE_CE, 0);
>  
> -       return disable;
> +       return 0ULL;
>  }
>  
>  static u32

-- 
Cheers,
 Lyude Paul (she/her)
 Software Engineer at Red Hat




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux