mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alex Elder <elder@linaro.org>
To: Bjorn Andersson <bjorn.andersson@linaro.org>,
	Andy Gross <andy.gross@linaro.org>,
	David Brown <david.brown@linaro.org>
Cc: linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] soc: qcom: smem: Correct check for global partition
Date: Mon, 25 Jun 2018 16:58:09 -0500	[thread overview]
Message-ID: <983a7c61-fecc-91dc-a75b-8b1b409a8393@linaro.org> (raw)
In-Reply-To: <20180625200613.20245-1-bjorn.andersson@linaro.org>

On 06/25/2018 03:06 PM, Bjorn Andersson wrote:
> The moved check for the global partition ended up in the wrong place and I
> failed to spot this in my review. This moves it to the correct place.

Whoops.  That's strange.  The description explains what it was supposed
to do.  And what got committed is actually what I sent...  Hmmm.  I bet
quilt did a fuzzy refresh and I neglected to verify the result was correct.
Or more likely, I just did something stupid.

In any case, this looks good.

Reviewed-by: Alex Elder <elder@linaro.org>

> 
> Fixes: 11d2e7edac6a ("soc: qcom: smem: check sooner in qcom_smem_set_global_partition()")
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
>  drivers/soc/qcom/smem.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/soc/qcom/smem.c b/drivers/soc/qcom/smem.c
> index 70b2ee80d6bd..bf4bd71ab53f 100644
> --- a/drivers/soc/qcom/smem.c
> +++ b/drivers/soc/qcom/smem.c
> @@ -364,11 +364,6 @@ static int qcom_smem_alloc_private(struct qcom_smem *smem,
>  	end = phdr_to_last_uncached_entry(phdr);
>  	cached = phdr_to_last_cached_entry(phdr);
>  
> -	if (smem->global_partition) {
> -		dev_err(smem->dev, "Already found the global partition\n");
> -		return -EINVAL;
> -	}
> -
>  	while (hdr < end) {
>  		if (hdr->canary != SMEM_PRIVATE_CANARY)
>  			goto bad_canary;
> @@ -736,6 +731,11 @@ static int qcom_smem_set_global_partition(struct qcom_smem *smem)
>  	bool found = false;
>  	int i;
>  
> +	if (smem->global_partition) {
> +		dev_err(smem->dev, "Already found the global partition\n");
> +		return -EINVAL;
> +	}
> +
>  	ptable = qcom_smem_get_ptable(smem);
>  	if (IS_ERR(ptable))
>  		return PTR_ERR(ptable);
> 


      reply	other threads:[~2018-06-25 21:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-25 20:06 Bjorn Andersson
2018-06-25 21:58 ` Alex Elder [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=983a7c61-fecc-91dc-a75b-8b1b409a8393@linaro.org \
    --to=elder@linaro.org \
    --cc=andy.gross@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=david.brown@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-soc@vger.kernel.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®