Re: [PATCH] Revert "venus: pm_helpers: Fix error check in vcodec_domains_get()"

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

 



On Mon, Jul 10, 2023 at 01:48:52PM +0530, Vikash Garodia wrote:
> > This is a video accelerator.  I would expect that it could still work
> > without power management.
> It won't, without those 2 power domains enabled for Venus. Does it work for you
> when you disabled the config ?

I have not tested this, I'm reviewing static checker bugs, as I
explained here:

> >>> This patch is also based on static analysis and review so probably best
> >>> to be cautious.  My guess is that very few people disable CONFIG_PM
> >>> these days so that's why the bug wasn't caught.


> Its better enforced in Kconfig. By allowing NULL for
> dev_pm_domain_attach_by_name does not still indicate that the functionality is
> dependent on CONFIG_PM to be enabled.

The way I'm writing it is the correct way.  I explain this better in
my blog.

https://staticthinking.wordpress.com/2022/08/01/mixing-error-pointers-and-null/

Currently it looks like the Kconfig does not have a dependency on
CONFIG_PM.  If we fix the the Kconfig, but leave the "harmless" bug here
then it will still show up as a static checker warning when COMPILE_TEST
is enabled.

We should just do it in the correct way even after we fix the Kconfig.

regards,
dan carpenter



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux