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.2 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 750FEC6369E for ; Thu, 19 Nov 2020 14:43:58 +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 A9E6B20888 for ; Thu, 19 Nov 2020 14:43:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="HU5JntcN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A9E6B20888 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=5J35Kwva2BtIV8DrB2HcS+wziILYEx3TKhJH6nPP7ro=; b=HU5JntcNNdTDGubnENvAr23VZ VAJKoZheTHBPeJY9BMnckDmzKkK/42aNETlr7vtX2tZfFExWYguwDbkGinXH5BBtdEQ7ygPusInX7 kajB1laKH997CxCIcSC96zDlY1ed4LnVauFrErrJ2e09jLSTgoocm88myWDpheFMuvwIuY12dBlCx 4G9Gh9xewyf9aClzYyVrsHAdbS9LanXUIGgwrZ8Yp4398thGryHQchu1J1I9tJBD5o5UjDq+txi9v nynIUN4BH59ohCcxbcxYWsQ5Chihg/ePiZwp7g2yrL03nYhSl+TvtezB76mjO5M9MHFL3DzKrTZkU b2tRM9D8Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kfl7s-0000m7-Kc; Thu, 19 Nov 2020 14:41:32 +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 1kfl6u-0000Ck-1R for linux-arm-kernel@lists.infradead.org; Thu, 19 Nov 2020 14:40:33 +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 3707111D4; Thu, 19 Nov 2020 06:40:30 -0800 (PST) Received: from bogus (unknown [10.57.54.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BB5213F719; Thu, 19 Nov 2020 06:40:28 -0800 (PST) Date: Thu, 19 Nov 2020 14:40:26 +0000 From: Sudeep Holla To: Cristian Marussi Subject: Re: [PATCH v3 2/6] firmware: arm_scmi: add SCMIv3.0 Sensors descriptors extensions Message-ID: <20201119144026.opawwlgianhe2ptq@bogus> References: <20201118162905.10439-1-cristian.marussi@arm.com> <20201118162905.10439-3-cristian.marussi@arm.com> <20201119113900.rtuyw34sw6uzb3in@bogus> <20201119122028.GA56553@e120937-lin> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201119122028.GA56553@e120937-lin> User-Agent: NeoMutt/20171215 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201119_094032_193313_03E3DAE0 X-CRM114-Status: GOOD ( 23.28 ) 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: mikhail.golubev@opensynergy.com, Igor.Skalkin@opensynergy.com, jbhayana@google.com, linux-kernel@vger.kernel.org, peter.hilber@opensynergy.com, linux-arm-kernel@lists.infradead.org, Jonathan.Cameron@Huawei.com, egranata@google.com, 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 On Thu, Nov 19, 2020 at 12:20:29PM +0000, Cristian Marussi wrote: > Hi Sudeep > [...] > > > + S32_EXT(SENSOR_RES_EXP(ares)); > > > + dsize += sizeof(adesc->resolution); > > > + > > > + scmi_parse_range_attrs(&a->attrs, > > > + &adesc->attrs); > > > + dsize += sizeof(adesc->attrs); > > > + } > > > + > > > + adesc = (typeof(adesc))((u8 *)adesc + dsize); > > > > Just thinking if we can avoid this my having union comprising of v1 and v2 > > structures ? > > > > Not sure to understand, axis_descr are only v3.0 and in fact this is > called only for v > 2 I think, BUT the problem is that both this and the > main sensor descriptor v3 msg payloads are runtime variable, so that it > is stated in the msg->extended_attrs itself if that particular sensor desc > response that I'm parsing has the additional extended fields or not: > so the dance with dsize to keep track of where the current response ends > and when the next starts...but maybe I've not got really what you meant. > No worries, we can always improve later if possible, you can keep it as for now. [...] > > > + * retrieved via a dedicated (optional) command. > > > + * Since the command is optional, on error carry > > > + * on without any update interval. > > > + */ > > > + if (scmi_sensor_update_intervals(handle, s)) > > > + dev_info(handle->dev, > > > + "Update Intervals not available for sensor ID:%d\n", > > > + s->id); > > > > Can we drop the logging or make it _dbg ? Make flood in a system with 100s of > > sensors. > > > > Sure, I was wondering in fact what to do with this: because the command > is optional but it seemed odd to me that an SCMIv3.0 sensor does not > expose any update interval so I wanted to log somehow this anomaly. > (but maybe it's just not an anomaly) > Anything optional can never be anomaly, there is high chance that f/w authors will drop it as it is optional unless it is absolutely necessary. -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel