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 X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA4C0C63697 for ; Mon, 23 Nov 2020 18:50:44 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 749AC20657 for ; Mon, 23 Nov 2020 18:50:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="vZ8J01Ll" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 749AC20657 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=b+hgsSFJ7W451T3u2z42ttvsSmgmLvjUEdjIW50olV0=; b=vZ8J01Llf5zVXPT6lcJq5Id5a MXh7Q9dbAAW1nlxVY/JdNPMvDeuUEPx48st7c/lEJ1bF0l1cVEJyWccR+jjHt3UpqlxG/03k0bILD 6iUloTjDvF7v8+HZGek+3ckL5kjbtbXdyz5l+skBtLHD+xC/R7ZWoHlZHLdOqDp6JjTn++Raifa61 3ntUMVy+RoNNdTxQcB/dpce8UU/MoyIy6ofc0Wnle27KMmJ1LfGK9Eavk28XVWe5jgUJNFeXl0Zb1 hpIzFGs6mmqvUffW8inbutV4xvjONBqd/meQM0+vZrqwvdcjkVBDdS2FryUD5cYgD9ak1PUVER0a7 ZXCq/gA4g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1khGug-0000O4-Go; Mon, 23 Nov 2020 18:50:10 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1khGud-0000Nf-NN for linux-arm-kernel@lists.infradead.org; Mon, 23 Nov 2020 18:50:08 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F3746101E; Mon, 23 Nov 2020 10:50:04 -0800 (PST) Received: from e120937-lin (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 21C5F3F70D; Mon, 23 Nov 2020 10:50:03 -0800 (PST) Date: Mon, 23 Nov 2020 18:49:56 +0000 From: Cristian Marussi To: Mark Brown Subject: Re: [PATCH v6 5/5] regulator: add SCMI driver Message-ID: <20201123184956.GD56553@e120937-lin> References: <20201119191051.46363-1-cristian.marussi@arm.com> <20201119191051.46363-6-cristian.marussi@arm.com> <20201123174941.GM6322@sirena.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201123174941.GM6322@sirena.org.uk> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201123_135007_815933_C32E2376 X-CRM114-Status: GOOD ( 24.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, satyakim@qti.qualcomm.com, f.fainelli@gmail.com, vincent.guittot@linaro.org, robh@kernel.org, Jonathan.Cameron@Huawei.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, james.quinlan@broadcom.com, sudeep.holla@arm.com, souvik.chakravarty@arm.com, etienne.carriere@linaro.org, lukasz.luba@arm.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Mark On Mon, Nov 23, 2020 at 05:49:41PM +0000, Mark Brown wrote: > On Thu, Nov 19, 2020 at 07:10:51PM +0000, Cristian Marussi wrote: > > > + ret = handle->voltage_ops->config_get(handle, sreg->id, > > + &config); > > + if (ret) { > > + dev_err(&sreg->sdev->dev, > > + "Error %d reading regulator %s status.\n", > > + ret, sreg->desc.name); > > + return 0; > > + } > > If we failed to read the status we should return an error rather than > claim the regulator is off, other functions return errors so I'm not > sure why this one would be different. > Yes this seems a bug, I'll fix. > > + vinfo = handle->voltage_ops->info_get(handle, sreg->id); > > + if (!vinfo) { > > + dev_warn(dev, "Skipping invalid voltage domain %d\n", > > + sreg->id); > > + return -ENODEV; > > I'm not sure that this error message is the most informative - the issue > is that we failed to read information, we don't know if that information > would have been valid or not. Same for some of the other enumeration, > it's a failure to read not a lack of validity isn't it? > In fact not reading information here could be due to a failure to communicate with fw or to the fact that the underlying Voltage Domain protocol during its initialization failed to validate the domain for some reason (like getting garbage reads of implauusible out of spec levels from the FW) and so VD decided not to expose the domain entry identified by id. I'll report a generic "Failure to get voltage domain" here at this point if it's fine. > > + /* Allocate pointers' array for all possible domains */ > > No ' > Ok > > + rinfo->num_doms = num_doms; > > + /* > > Several places like this with missing blank lines. What do you mean ? a blank before the comment ? Sorry but checkpatch --strict does not complain, I was not aware of this styling. I'll do (if you confirm that's what you want) How do you prefer these changes (and the DT one) ? All as followup patches in a V7 series on top of sudeep/for-next/scmi-voltage ? Thanks Cristian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel