[PATCH v3 10/15] nvkm: refine the variable names in r535_gsp_msg_recv()

Timur Tabi ttabi at nvidia.com
Thu Oct 31 16:11:55 UTC 2024


On Thu, 2024-10-31 at 15:49 +0000, Zhi Wang wrote:
> Nice catch!
> 
> It should be fixed in the re-factor in PATCH 12, where 
> r535_gsp_msgq_wait() always returns an int (error code).

I suspect that there are a lot of other places in the kernel, and not just
Nouveau, where IS_ERR_OR_NULL() is used incorrectly.

Just looking the kernel casually, it seems to me that many usages of
IS_ERR_OR_NULL() are sloppy and should be changed to avoid that function. 
Returning NULL should mean something different from returning -ERROR.


More information about the Nouveau mailing list