From: Bjorn Andersson <bjorn.andersson@sonymobile.com>
To: Stephen Boyd <sboyd@codeaurora.org>
Cc: Andy Gross <agross@codeaurora.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] soc: qcom: Make qcom_smem_get() return a pointer
Date: Mon, 31 Aug 2015 21:50:55 -0700 [thread overview]
Message-ID: <20150901045055.GA13472@usrtlx11787.corpusers.net> (raw)
In-Reply-To: <1441071666-16156-1-git-send-email-sboyd@codeaurora.org>
On Mon 31 Aug 18:41 PDT 2015, Stephen Boyd wrote:
> Passing a void ** almost always requires a cast at the call site.
> Instead of littering the code with casts every time this function
> is called, have qcom_smem_get() return a void pointer to the
> location of the smem item. This frees the caller from having to
> cast the pointer with the small downside of doing some extra work
> to find the item in the case that the caller doesn't care to use
> the pointer.
>
We still need to find the item even if the caller is not interested, to
know if we should have returned -ENOENT, so I think it's just a matter
of style.
I did have the API to return the pointer earlier in development, but it
didn't look good and uniform. But in the final piece, that was picked
up, I think it makes more sense (and looks better) to do it this way.
Reviewed-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
> ---
>
> This is on top of the smd and smem big endian support.
>
How sneaky of you, then we need to approve those patches before we
add new consumers of this API...
Regards,
Bjorn
next prev parent reply other threads:[~2015-09-01 4:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-01 1:41 Stephen Boyd
2015-09-01 4:50 ` Bjorn Andersson [this message]
2015-09-01 17:50 ` Stephen Boyd
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=20150901045055.GA13472@usrtlx11787.corpusers.net \
--to=bjorn.andersson@sonymobile.com \
--cc=agross@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome