All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Jeremy McNicoll <jeremymc@redhat.com>
Cc: linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org,
	devicetree@vger.kernel.org, linux-mmc@vger.kernel.org,
	andy.gross@linaro.org, sboyd@codeaurora.org, robh@kernel.org,
	arnd@arndb.de, riteshh@codeaurora.org
Subject: Re: [PATCH 2/5] smd: Make packet size a constant
Date: Wed, 23 Nov 2016 22:14:50 -0800	[thread overview]
Message-ID: <20161124061450.GV28340@tuxbot> (raw)
In-Reply-To: <1479863388-23678-3-git-send-email-jeremymc@redhat.com>

On Tue 22 Nov 17:09 PST 2016, Jeremy McNicoll wrote:

> Use a macro to define the maximum size of a RPM message.
> 

No thanks.

> Signed-off-by: Jeremy McNicoll <jeremymc@redhat.com>
> ---
>  drivers/soc/qcom/smd-rpm.c   | 2 +-
>  include/linux/soc/qcom/smd.h | 7 +++++++
>  2 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/soc/qcom/smd-rpm.c b/drivers/soc/qcom/smd-rpm.c
> index 6609d7e..b5a2836 100644
> --- a/drivers/soc/qcom/smd-rpm.c
> +++ b/drivers/soc/qcom/smd-rpm.c
> @@ -114,7 +114,7 @@ int qcom_rpm_smd_write(struct qcom_smd_rpm *rpm,
>  	size_t size = sizeof(*pkt) + count;
>  
>  	/* SMD packets to the RPM may not exceed 256 bytes */
> -	if (WARN_ON(size >= 256))
> +	if (WARN_ON(size >= SMD_RPM_MAX_SIZE))
>  		return -EINVAL;

The only thing you do is to change "oh, the max packet size is 256
bytes" to "hmm, i wonder what SMD_RPM_MAX_SIZE is and if the comment is
still valid".

>  
>  	pkt = kmalloc(size, GFP_KERNEL);
> diff --git a/include/linux/soc/qcom/smd.h b/include/linux/soc/qcom/smd.h
> index f148e0f..8039015 100644
> --- a/include/linux/soc/qcom/smd.h
> +++ b/include/linux/soc/qcom/smd.h
> @@ -4,6 +4,13 @@
>  #include <linux/device.h>
>  #include <linux/mod_devicetable.h>
>  
> +
> +/*
> + * SMD packets to the RPM may not exceed 256 bytes
> + */
> +#define SMD_RPM_MAX_SIZE 256
> +

And this has nothing to do with SMD, it's a limitation of RPM.

Regards,
Bjorn

  reply	other threads:[~2016-11-24  6:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-23  1:09 [PATCH 0/5] Enable onboard SDHCI for Nexus 5X (msm8992) Jeremy McNicoll
2016-11-23  1:09 ` [PATCH 1/5] clk: gcc: Updates for SDHCI enablement Jeremy McNicoll
2016-11-23  1:09 ` [PATCH 2/5] smd: Make packet size a constant Jeremy McNicoll
2016-11-24  6:14   ` Bjorn Andersson [this message]
2016-11-28 21:20     ` Jeremy McNicoll
2016-11-23  1:09 ` [PATCH 3/5] arm64: dts: Enable SDHCI for Nexus 5X (msm8992) Jeremy McNicoll
     [not found]   ` <1479863388-23678-4-git-send-email-jeremymc-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-11-28 21:53     ` Rob Herring
2016-11-23  1:09 ` [PATCH 4/5] sdhci: dump vendor state and regs Jeremy McNicoll
2016-11-23  1:09 ` [PATCH 5/5] sdhci: Add quirk for delayed IRQ ACK Jeremy McNicoll
2016-11-23  3:36   ` Jisheng Zhang
2016-11-23  3:48     ` Jeremy McNicoll
     [not found]       ` <ecacec51-4b06-49cd-c756-489128729499-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-11-23  4:12         ` Jisheng Zhang
2016-11-23  5:23           ` Jeremy McNicoll

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=20161124061450.GV28340@tuxbot \
    --to=bjorn.andersson@linaro.org \
    --cc=andy.gross@linaro.org \
    --cc=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=jeremymc@redhat.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-soc@vger.kernel.org \
    --cc=riteshh@codeaurora.org \
    --cc=robh@kernel.org \
    --cc=sboyd@codeaurora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.