From: Sudeep Holla <sudeep.holla@arm.com>
To: Cristian Marussi <cristian.marussi@arm.com>
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
Subject: Re: [PATCH v3 2/6] firmware: arm_scmi: add SCMIv3.0 Sensors descriptors extensions
Date: Thu, 19 Nov 2020 14:40:26 +0000 [thread overview]
Message-ID: <20201119144026.opawwlgianhe2ptq@bogus> (raw)
In-Reply-To: <20201119122028.GA56553@e120937-lin>
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
next prev parent reply other threads:[~2020-11-19 14:43 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-18 16:28 [PATCH v3 0/6] SCMIv3.0 Sensor Extensions Cristian Marussi
2020-11-18 16:29 ` [PATCH v3 1/6] firmware: arm_scmi: rework scmi_sensors_protocol_init Cristian Marussi
2020-11-18 16:29 ` [PATCH v3 2/6] firmware: arm_scmi: add SCMIv3.0 Sensors descriptors extensions Cristian Marussi
2020-11-19 11:39 ` Sudeep Holla
2020-11-19 12:20 ` Cristian Marussi
2020-11-19 14:40 ` Sudeep Holla [this message]
2020-11-18 16:29 ` [PATCH v3 3/6] hwmon: scmi: update hwmon internal scale data type Cristian Marussi
2020-11-19 11:40 ` Sudeep Holla
2020-11-19 12:22 ` Cristian Marussi
2020-11-19 14:35 ` Sudeep Holla
2020-11-18 16:29 ` [PATCH v3 4/6] firmware: arm_scmi: add SCMIv3.0 Sensors timestamped reads Cristian Marussi
2020-11-19 11:42 ` Sudeep Holla
2020-11-19 12:24 ` Cristian Marussi
2020-11-18 16:29 ` [PATCH v3 5/6] firmware: arm_scmi: add SCMIv3.0 Sensor configuration support Cristian Marussi
2020-11-19 12:01 ` Sudeep Holla
2020-11-18 16:29 ` [PATCH v3 6/6] firmware: arm_scmi: add SCMIv3.0 Sensor notifications Cristian Marussi
2020-11-19 12:03 ` Sudeep Holla
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201119144026.opawwlgianhe2ptq@bogus \
--to=sudeep.holla@arm.com \
--cc=Igor.Skalkin@opensynergy.com \
--cc=Jonathan.Cameron@Huawei.com \
--cc=cristian.marussi@arm.com \
--cc=egranata@google.com \
--cc=jbhayana@google.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=mikhail.golubev@opensynergy.com \
--cc=peter.hilber@opensynergy.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox