Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp885452rdg; Fri, 11 Aug 2023 03:10:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEiWsmdUPgnib2Acb9sKLBXVI0prtzEcmNP6jeBaQDB6YqRzf0ZHGAyUIo4cpD2EcZuAT9h X-Received: by 2002:aa7:d644:0:b0:523:223e:66fb with SMTP id v4-20020aa7d644000000b00523223e66fbmr1154557edr.34.1691748602176; Fri, 11 Aug 2023 03:10:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691748602; cv=none; d=google.com; s=arc-20160816; b=0S4FUg+PimaeBhFch3k9w4cy6YYnRmLE9FM7c6u1xJr/CIWhF/LrTIqR0GQym0N41A Q9Rs7rJUiADNN7eoZ+iWtP8AdcBfSUwMSFA9MCJSXzUYLPcMEroNli+6+J8EJrKZXdqv bQs+j+q7NRGnIrf2UOlzoyPBWCukVqXUlGHOgSBS3lHhELQEkrSIb8yQ26e3z3wxG4FA euh1FKadMFyoJNI2CjVZOMT7ks0OTTZA9VCyv92i/WAdg5TJv3vxHBwpiQlQymKyHTGd L77pCuSVPsg1rSaNXtyCYYAQjy411FMgJGShvAqoBZllaCpFMGltIfUJBrCFPPptiRm7 j+VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=zQq5l8p7ntpwSBorx8rwP7Q1ivYBiG/tkQpzZllOQDA=; fh=wsT/DBxo2H+Tn8aGP+EbQlRI8SDmeRyvn/wq52UQfpw=; b=eEwZ28MvqbVzx8l2rtjrbp3PrD9NzSi2BNPRfj5ddRTjrSGm0lKqxUwo1dXclk5SUW uMy0UlsqUYIDkQ+7dRZyQMNvpW/NcvGXmsBILz3L8C72E7Y0RAjMPij0YFv9lp3dyH7q Trxw2UNG2CDFmriwPhID5U5eHDc3JhTQ2Q6IMeSg52mUNEKo5gXU6qEKlFFDwHLCY7x7 ETMXZrR2lAP1luaZHTR4AAXwVNo6gZyHcE+saUyyjPcfnJwVSBF5evYJyiZ0TnlTo/BX D4CIm8kXSssyxzxgHlGiar4USEgrwf5mfi+Ybk0wqQbI9qGKE+vbCDSEKdAC5SZdxe5j x/YQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m4-20020aa7c2c4000000b0052307b13724si3071262edp.375.2023.08.11.03.09.37; Fri, 11 Aug 2023 03:10:02 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234015AbjHKJtf (ORCPT + 99 others); Fri, 11 Aug 2023 05:49:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229657AbjHKJte (ORCPT ); Fri, 11 Aug 2023 05:49:34 -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 2421D272D; Fri, 11 Aug 2023 02:49:33 -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 A886566DA3; Fri, 11 Aug 2023 09:49:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A1991C433C8; Fri, 11 Aug 2023 09:49:29 +0000 (UTC) Message-ID: <9520cdcb-5262-f429-b7bc-35c4cda08c12@xs4all.nl> Date: Fri, 11 Aug 2023 11:49:28 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH v2 3/3] media: exynos4-is: fimc-is: replace duplicate pmu node with phandle Content-Language: en-US, nl To: Andi Shyti , 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 References: <20230807131256.254243-1-krzysztof.kozlowski@linaro.org> <20230807131256.254243-3-krzysztof.kozlowski@linaro.org> <20230807231320.svssge6uymw3jiho@intel.intel> From: Hans Verkuil In-Reply-To: <20230807231320.svssge6uymw3jiho@intel.intel> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,NICE_REPLY_A,RCVD_IN_DNSWL_BLOCKED, 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, On 08/08/2023 01:13, Andi Shyti wrote: > 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. I agree with Andi for this part. The only time you want to see this message is if samsung,pmu-syscon is missing AND pmu is present. If both are missing, then just return ENODEV as it was before. > > ... and... "*please* update your DTB", the user might get upset > and out of sheer spite, decides not to do it – just because! :) I don't care about this bit. I guess it doesn't hurt to add 'please', but I accept it either way. Regards, Hans > > Andi > >> + }