From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E500EEB64D9 for ; Mon, 10 Jul 2023 09:09:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230303AbjGJJJV (ORCPT ); Mon, 10 Jul 2023 05:09:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230393AbjGJJJT (ORCPT ); Mon, 10 Jul 2023 05:09:19 -0400 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E70BFA for ; Mon, 10 Jul 2023 02:09:18 -0700 (PDT) Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-3fbc244d307so49390295e9.1 for ; Mon, 10 Jul 2023 02:09:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688980157; x=1691572157; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=2KujVDHYVUxo9oYyBlDAbR4tdZQxBizaVaIObje0g9I=; b=SXj9Rz4nsv8tsa6nraKDQmFv1NEjRejWmLQwQUVA7Ve3sG8m/jkG3Bxi47Waoppe4F FjJpdtWhJwtCa0T+ie550r4vDGkoJQx4BNlQDYwO1uW0E9aVtF57bYCavOFWFWtFubhv zC3oPEt0uEbrzrFQaHZ8cwKmn0frKa1X19C0fWhc0uKSk4or0qY11CBzYbXYNb5TqgcL oKxqkoUvuxc+N6Fft2Et22Y24nDKvSmZ3qdNH9jtxvlNlpproMgBpSYPJzOQ1XDAT+KV odXJEllBBOZwU4RN3jPVsWkedspCXuQWAnPo5HmLPcgi/kPNAlY6uB8hGqP2KJ3DyZqM vZLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688980157; x=1691572157; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=2KujVDHYVUxo9oYyBlDAbR4tdZQxBizaVaIObje0g9I=; b=bBU7kSB/zD5jMwYCUdrVK0nK+YShgzJvGnX+DxWAc6XnBu2+WOdJHffvhHkB2egPnN wNml58vILMyS+HuTq9yL3/mnJIjzTUQ+7YwKJn5PEILjoSmCW9/FX/Fg9/W7N7Z0OWSJ zHM/FMoK+IIlUD7iQx9PLf/In8WJf8NT/9pkk2klZHnKzeBNiukOVoIvW7NnQZ/2isc4 A4h64XnQdJ0+KDU5ct+wbahG2Qab8zwHI3Kb0xP0Jil9FdN8oOFjVd5ApuCl9mtV6hrI dnSUl47ZNARzjWsPm3sOOi595JcoW1Y5QWufNQJ+jQGihoGax6xIZquc14CUxyvTqiTO 0bvQ== X-Gm-Message-State: ABy/qLb+sy4bWlYmAQ3AtnjNnZliObm+ME1ymp1tfWag1k8vZsdJsdPq Nmy7gAKNB+nZ8c2mkxegygLEsOaUKAD5OO48kmk= X-Google-Smtp-Source: APBJJlGw+SpNS7MUK0khmZtSeZ1AN2xJ7wVJNGsg5GXZzu8g8injjHRG1t4b1w9W/8CiHP7WUddvHQ== X-Received: by 2002:a05:600c:2246:b0:3fa:8fc2:3969 with SMTP id a6-20020a05600c224600b003fa8fc23969mr11079304wmm.17.1688980156913; Mon, 10 Jul 2023 02:09:16 -0700 (PDT) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id y12-20020a05600c364c00b003fc04eb92cbsm6637423wmq.44.2023.07.10.02.09.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jul 2023 02:09:14 -0700 (PDT) Date: Mon, 10 Jul 2023 11:30:52 +0300 From: Dan Carpenter To: Vikash Garodia Cc: Tang Bin , Stanimir Varbanov , Bryan O'Donoghue , Andy Gross , Bjorn Andersson , Konrad Dybcio , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH] Revert "venus: pm_helpers: Fix error check in vcodec_domains_get()" Message-ID: <8215b9e5-e7bb-4739-a39e-e7f39efb053b@kadam.mountain> References: <7550a762-7b00-514d-07a4-d304a6342ae4@quicinc.com> <7d684c80-d9c7-42ca-9ef6-0d4c38ee1876@kadam.mountain> <73e7c244-02da-a275-f187-751c8d5b9816@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <73e7c244-02da-a275-f187-751c8d5b9816@quicinc.com> Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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