Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp3643878rwb; Mon, 7 Aug 2023 17:53:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEVXd0e92JykyROpfhSHmTeyoIRkoW6iLfcre/Fsj4nEykxQ8FTuuOkJpsChh3mgI+tH3hg X-Received: by 2002:a05:6a20:968e:b0:138:58b:3259 with SMTP id hp14-20020a056a20968e00b00138058b3259mr10232676pzc.35.1691455998100; Mon, 07 Aug 2023 17:53:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691455998; cv=none; d=google.com; s=arc-20160816; b=jGcPxXucMW8UwJyLTHFbxRxmH7Gwzak/Lfl0sZ0JDXNC6Wye3DUGEPkaJ5nUkAr2NT No2NJV4ZT93vBQrhAMOZp7quYvwUX9h+n/7Df1KNOWqfHFIkygkeawNUIJjhGGRXgGFo UIWRA2t24z5MZLKU3/AZSu853zsq6B7PfsHJAIV9yb8/Z39+IiepDDYBgdr1sG9IR0Im Q2ToY4OnGMTI68adIVjv1/7DEePwixSLBxSAxTYdBgLzYi0ihC/321N74a7xsT1ml32r qUKBI412foj1k7MVC2K/G8zStzQKrsM9KWev6NqSs2hb+v5CcuyZFGXvPfrrqu/jH5HK ly7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=eH/RvCh0v6SVg+066E77gnX89t/tapLcsVJHPcquQOQ=; fh=0NUJO+XCO4pvHXg8rf7OjzW+3eS/EJ0N+MDwIjX+/Is=; b=hTsjDAoLBlZaIAI4FYz9Ou/vOHFA8Fc9KpSoTRmpouGSSe3ybpq4QvAEdfo0GVUwBa zwWzrS73OfNwUgy4giAIYwu4AVHuWCyZuO7MsyESFrMRi+F+JkBu9Ta7tqjv8pD3rsgg 8oykPClDB07i3gq/m6k+mtWHfZbmEQQly9fB7xuU0ZYLZfQJR+lBJ2i3K1ZXeGYVS9wg UTHYruoT+uWAchz3YwjBwvo5nXzvhHUV3GwpLbTUjEo88CGvElr4POoQNvQ4m/X/kEzA O+lO1UYcVPijFmH/7rEM9IYKS2UUleLXF2kwUT9V11UXvCw5oxex2Uq0YDMAmn9aQ7jD kgIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Dw8ZMhze; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j186-20020a638bc3000000b005634a72454asi6220288pge.37.2023.08.07.17.53.06; Mon, 07 Aug 2023 17:53:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Dw8ZMhze; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229456AbjHGXOE (ORCPT + 99 others); Mon, 7 Aug 2023 19:14:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230505AbjHGXNv (ORCPT ); Mon, 7 Aug 2023 19:13:51 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7186170B; Mon, 7 Aug 2023 16:13:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1DA316228D; Mon, 7 Aug 2023 23:13:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2455BC433C7; Mon, 7 Aug 2023 23:13:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691450003; bh=sHveayqydBN1Brz7x3ocQnkmPo6C+nsWsslvZeviEAg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Dw8ZMhze5ZrZj4Y38Di76h0nFqQq9f/KZmJz8ZU6TRJI07ichbVJrR/9BhYKB51Qg gjXSt0lyKeiO6o83RXaT2I0n6tJUpcMz5Xyxg/jEmQlnsxAleX10iRMExcOriD7lq0 KWxatIsERKx0v0E0tNDUFP/OILIFkFNwrJWrXrC8QYg7bLNJwaSso2tsyYG9hLk5y4 FMmUqsBhMdfo0QgcIUGMWroDdy3aXmuhs8fY7yr4uhlI+qE8xSJS5o6a/UEY6UZJEt KtSpARB4M8n7IHv6f6ZOWuBRW+OH23uDa25RiQN/25mrx+tkvKjBKwgAF4cn4jpCjZ bE0yzkNAz4D2Q== Date: Tue, 8 Aug 2023 01:13:20 +0200 From: Andi Shyti To: Krzysztof Kozlowski Cc: Sylwester Nawrocki , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alim Akhtar , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 3/3] media: exynos4-is: fimc-is: replace duplicate pmu node with phandle Message-ID: <20230807231320.svssge6uymw3jiho@intel.intel> References: <20230807131256.254243-1-krzysztof.kozlowski@linaro.org> <20230807131256.254243-3-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230807131256.254243-3-krzysztof.kozlowski@linaro.org> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Krzysztof, [...] > +static void __iomem *fimc_is_get_pmu_regs(struct device *dev) > +{ > + struct device_node *node; > + void __iomem *regs; > + > + node = of_parse_phandle(dev->of_node, "samsung,pmu-syscon", 0); > + if (!node) { > + dev_warn(dev, "Finding PMU node via deprecated method, update your DTB\n"); > + node = of_get_child_by_name(dev->of_node, "pmu"); > + if (!node) > + return IOMEM_ERR_PTR(-ENODEV); in my opinion this should be: ... if (!node) return IOMEM_ERR_PTR(-ENODEV); dev_warn(dev, "Finding PMU node via deprecated method, update your DTB\n"); Because if you don't have both "samsung,pmu-syscon and "pmu" then the warning should not be printed and you need to return -ENODEV. ... and... "*please* update your DTB", the user might get upset and out of sheer spite, decides not to do it – just because! :) Andi > + }