From: Cristian Marussi <cristian.marussi@arm.com>
To: Peter Hilber <peter.hilber@opensynergy.com>
Cc: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, sudeep.holla@arm.com
Subject: Re: [PATCH 2/3] firmware: arm_scmi: Fix SENSOR_AXIS_NAME_GET behaviour when unsupported
Date: Wed, 8 Jun 2022 17:26:40 +0100 [thread overview]
Message-ID: <YqDNsj26zo1NgsUR@e120937-lin> (raw)
In-Reply-To: <a349b6be-daa8-e523-6e63-4e9105aa75d9@opensynergy.com>
On Wed, Jun 08, 2022 at 05:19:02PM +0200, Peter Hilber wrote:
> Hi Cristian,
>
> I think I found two missing endianness conversions, see below.
>
> Best regards,
>
> Peter
[snip]
> > @@ -393,12 +398,14 @@ iter_axes_desc_process_response(const struct scmi_protocol_handle *ph,
> > u32 attrh, attrl;
> > struct scmi_sensor_axis_info *a;
> > size_t dsize = SCMI_MSG_RESP_AXIS_DESCR_BASE_SZ;
> > - struct scmi_sensor_info *s = priv;
> > + struct scmi_apriv *apriv = priv;
> > const struct scmi_axis_descriptor *adesc = st->priv;
> >
> > attrl = le32_to_cpu(adesc->attributes_low);
> > + if (SUPPORTS_EXTENDED_AXIS_NAMES(attrl))
> > + apriv->any_axes_support_extended_names = true;
> >
> > - a = &s->axis[st->desc_index + st->loop_idx];
> > + a = &apriv->s->axis[st->desc_index + st->loop_idx];
> > a->id = le32_to_cpu(adesc->id);
> > a->extended_attrs = SUPPORTS_EXTEND_ATTRS(attrl);
> >
> > @@ -444,10 +451,18 @@ iter_axes_extended_name_process_response(const struct scmi_protocol_handle *ph,
> > void *priv)
> > {
> > struct scmi_sensor_axis_info *a;
> > - const struct scmi_sensor_info *s = priv;
> > + const struct scmi_apriv *apriv = priv;
> > struct scmi_sensor_axis_name_descriptor *adesc = st->priv;
> >
> > - a = &s->axis[st->desc_index + st->loop_idx];
> > + if (adesc->axis_id >= st->max_resources)
>
> I think adesc->axis_id uses in this function need to be wrapped with
> le32_to_cpu() (here and below as well).
>
...damn, my bad ... I'm posting a V2.
Thanks for the review !
Cristian
_______________________________________________
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:[~2022-06-08 16:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-08 9:55 [PATCH 1/3] firmware: arm_scmi: Review BASE protocol string-buffers sizes Cristian Marussi
2022-06-08 9:55 ` [PATCH 2/3] firmware: arm_scmi: Fix SENSOR_AXIS_NAME_GET behaviour when unsupported Cristian Marussi
2022-06-08 15:19 ` Peter Hilber
2022-06-08 16:26 ` Cristian Marussi [this message]
2022-06-08 16:40 ` [PATCH v2 " Cristian Marussi
2022-06-08 16:49 ` Peter Hilber
2022-06-08 9:55 ` [PATCH 3/3] firmware: arm_scmi: Use preferred strscpy to handle strings Cristian Marussi
2022-06-08 15:19 ` Peter Hilber
2022-06-10 16:59 ` [PATCH 1/3] firmware: arm_scmi: Review BASE protocol string-buffers sizes 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=YqDNsj26zo1NgsUR@e120937-lin \
--to=cristian.marussi@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peter.hilber@opensynergy.com \
--cc=sudeep.holla@arm.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