linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Cristian Marussi <cristian.marussi@arm.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Cristian Marussi <cristian.marussi@arm.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, arm-scmi@vger.kernel.org,
	sudeep.holla@arm.com, james.quinlan@broadcom.com,
	f.fainelli@gmail.com, vincent.guittot@linaro.org,
	etienne.carriere@st.com, peng.fan@oss.nxp.com,
	michal.simek@amd.com, quic_sibis@quicinc.com,
	quic_nkela@quicinc.com
Subject: Re: [PATCH 5/5] firmware: arm_scmi: Relocate atomic_threshold to scmi_desc
Date: Fri, 25 Oct 2024 15:35:57 +0100	[thread overview]
Message-ID: <ZxuszZFKdJoHwiSe@pluto> (raw)
In-Reply-To: <842a9844-ac89-4972-9024-72ed0e08c2d3@stanley.mountain>

On Wed, Oct 23, 2024 at 04:20:53PM +0300, Dan Carpenter wrote:
> On Fri, Oct 18, 2024 at 09:06:02AM +0100, Cristian Marussi wrote:

Hi Dan,

thanks for having a look.

> > @@ -2959,7 +2952,7 @@ static struct scmi_debug_info *scmi_debugfs_common_setup(struct scmi_info *info)
> >  			   (char **)&dbg->name);
> >  
> >  	debugfs_create_u32("atomic_threshold_us", 0400, top_dentry,
> > -			   &info->atomic_threshold);
> > +			   (u32 *)&info->desc->atomic_threshold);
> 
> This cast is unnecessary.

I was indeed wondering why I added that....then I remember something
about debugfs_create....without that (u32 *):

drivers/firmware/arm_scmi/driver.c: In function ‘scmi_debugfs_common_setup’:
drivers/firmware/arm_scmi/driver.c:2988:28: warning: passing argument 4 of ‘debugfs_create_u32’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
                             &info->desc->atomic_threshold);
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

since the enclosing struct ->desc is const AND debugfs_create_u32 is NOT
smart enough to expect a const when the property is R_ONLY...unless I am
missing something.

> 
> >  
> >  	debugfs_create_str("type", 0400, trans, (char **)&dbg->type);
> >  
> > @@ -3071,6 +3064,13 @@ static const struct scmi_desc *scmi_transport_setup(struct device *dev)
> >  		 trans->desc->max_rx_timeout_ms, trans->desc->max_msg_size,
> >  		 trans->desc->max_msg);
> >  
> > +	/* System wide atomic threshold for atomic ops .. if any */
> > +	if (!of_property_read_u32(dev->of_node, "atomic-threshold-us",
> > +				  &trans->desc->atomic_threshold))
> > +		dev_info(dev,
> > +			 "SCMI System wide atomic threshold set to %d us\n",
>                                                                    ^^
> %u for unsigned int.
>

I will fix.

Thanks,
Cristian


  reply	other threads:[~2024-10-25 15:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-18  8:05 [PATCH 0/5] Expose SCMI Transport properties Cristian Marussi
2024-10-18  8:05 ` [PATCH 1/5] firmware: arm_scmi: Account for SHMEM memory overhead Cristian Marussi
2024-10-18  8:05 ` [PATCH 2/5] firmware: arm_scmi: Calculate virtio PDU max size dynamically Cristian Marussi
2024-10-18  8:06 ` [PATCH 3/5] dt-bindings: firmware: arm,scmi: Introduce more transport properties Cristian Marussi
2024-10-18 13:33   ` Rob Herring
2024-10-18 14:10     ` Cristian Marussi
2024-10-18 13:37   ` Rob Herring
2024-10-18 14:11     ` Cristian Marussi
2024-10-18  8:06 ` [PATCH 4/5] firmware: arm_scmi: Use max_msg and max_msg_size devicetree properties Cristian Marussi
2024-10-18  8:06 ` [PATCH 5/5] firmware: arm_scmi: Relocate atomic_threshold to scmi_desc Cristian Marussi
2024-10-23 13:20   ` Dan Carpenter
2024-10-25 14:35     ` Cristian Marussi [this message]
2024-10-25 14:53       ` Dan Carpenter

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=ZxuszZFKdJoHwiSe@pluto \
    --to=cristian.marussi@arm.com \
    --cc=arm-scmi@vger.kernel.org \
    --cc=dan.carpenter@linaro.org \
    --cc=etienne.carriere@st.com \
    --cc=f.fainelli@gmail.com \
    --cc=james.quinlan@broadcom.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@amd.com \
    --cc=peng.fan@oss.nxp.com \
    --cc=quic_nkela@quicinc.com \
    --cc=quic_sibis@quicinc.com \
    --cc=sudeep.holla@arm.com \
    --cc=vincent.guittot@linaro.org \
    /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;
as well as URLs for NNTP newsgroup(s).