[PATCH] drm/nouveau: remove unused memory target test

Timur Tabi ttabi at nvidia.com
Thu Jul 17 15:06:24 UTC 2025


On Thu, 2025-07-17 at 11:09 +0300, Zhi Wang wrote:
> On Tue, 15 Jul 2025 16:05:59 -0500
> Timur Tabi <ttabi at nvidia.com> wrote:
> 
> There is also a similar code block in this function:
> 
>         if (fw->inst) {
>                 nvkm_falcon_mask(falcon, 0x048, 0x00000001, 0x00000001);
> 
>                 switch (nvkm_memory_target(fw->inst)) {
>                 case NVKM_MEM_TARGET_VRAM: target = 0; break;
>                 case NVKM_MEM_TARGET_HOST: target = 2; break;
>                 case NVKM_MEM_TARGET_NCOH: target = 3; break;
>                 default:
>                         WARN_ON(1);
>                         return -EINVAL;
>                 }
> 
> Should this be removed with the same purpose here?

No, 'target' is actually used in this block.  That's why I moved that variable to inside the
block.

	falcon->func->bind_inst(falcon, target, nvkm_memory_addr(fw->inst));



More information about the Nouveau mailing list