From: Vinod Koul <vkoul@kernel.org>
To: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
agross@kernel.org, bjorn.andersson@linaro.org,
sanyog.r.kale@intel.com, pierre-louis.bossart@linux.intel.com,
linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] soundwire: qcom: Constify static structs
Date: Mon, 22 Jun 2020 17:28:37 +0530 [thread overview]
Message-ID: <20200622115837.GL2324254@vkoul-mobl> (raw)
In-Reply-To: <20200609230029.69802-1-rikard.falkeborn@gmail.com>
On 10-06-20, 01:00, Rikard Falkeborn wrote:
> qcom_swrm_port_ops and qcom_swrm_ops are not modified and can be made
> const to allow the compiler to put them in read-only memory.
>
> Before:
> text data bss dec hex filename
> 18266 3056 256 21578 544a drivers/soundwire/qcom.o
>
> After:
> text data bss dec hex filename
> 18426 2896 256 21578 544a drivers/soundwire/qcom.o
Applied, thanks
>
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
> ---
> drivers/soundwire/qcom.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
> index a1c2a44a3b4d..915c2cf0c274 100644
> --- a/drivers/soundwire/qcom.c
> +++ b/drivers/soundwire/qcom.c
> @@ -406,13 +406,13 @@ static int qcom_swrm_port_enable(struct sdw_bus *bus,
> return ctrl->reg_write(ctrl, reg, val);
> }
>
> -static struct sdw_master_port_ops qcom_swrm_port_ops = {
> +static const struct sdw_master_port_ops qcom_swrm_port_ops = {
> .dpn_set_port_params = qcom_swrm_port_params,
> .dpn_set_port_transport_params = qcom_swrm_transport_params,
> .dpn_port_enable_ch = qcom_swrm_port_enable,
> };
>
> -static struct sdw_master_ops qcom_swrm_ops = {
> +static const struct sdw_master_ops qcom_swrm_ops = {
> .xfer_msg = qcom_swrm_xfer_msg,
> .pre_bank_switch = qcom_swrm_pre_bank_switch,
> };
> --
> 2.27.0
--
~Vinod
prev parent reply other threads:[~2020-06-22 11:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-09 23:00 Rikard Falkeborn
2020-06-22 11:58 ` Vinod Koul [this message]
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=20200622115837.GL2324254@vkoul-mobl \
--to=vkoul@kernel.org \
--cc=agross@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=bjorn.andersson@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=rikard.falkeborn@gmail.com \
--cc=sanyog.r.kale@intel.com \
--cc=srinivas.kandagatla@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
all inboxes | Powered by JetHome®