From: "Andrew Jeffery" <andrew@aj.id.au>
To: "Eddie James" <eajames@linux.ibm.com>, linux-media@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, linux-aspeed@lists.ozlabs.org,
"Joel Stanley" <joel@jms.id.au>,
"Mauro Carvalho Chehab" <mchehab@kernel.org>,
linux-clk@vger.kernel.org, "Stephen Boyd" <sboyd@kernel.org>,
"Michael Turquette" <mturquette@baylibre.com>,
devicetree@vger.kernel.org, mark.rutland@arm.com,
"Rob Herring" <robh+dt@kernel.org>
Subject: Re: [PATCH 2/5] media: platform: Aspeed: Make reserved memory optional
Date: Wed, 03 Apr 2019 02:01:08 -0400 [thread overview]
Message-ID: <7effb2de-cc91-47af-88a2-a0075262e9c4@www.fastmail.com> (raw)
In-Reply-To: <1554229504-5661-3-git-send-email-eajames@linux.ibm.com>
On Wed, 3 Apr 2019, at 04:55, Eddie James wrote:
> Reserved memory doesn't need to be required; system memory would work
> fine.
I had to do a bit of legwork to understand what you were doing here. My
understanding is that we allocate out of the default CMA region if the
memory-region property isn't specified. Is that what you're expecting?
Could be helpful to be a little less terse in the commit message.
>
> Signed-off-by: Eddie James <eajames@linux.ibm.com>
> ---
> drivers/media/platform/aspeed-video.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/media/platform/aspeed-video.c
> b/drivers/media/platform/aspeed-video.c
> index 55c55a6..8144fe3 100644
> --- a/drivers/media/platform/aspeed-video.c
> +++ b/drivers/media/platform/aspeed-video.c
> @@ -1608,11 +1608,7 @@ static int aspeed_video_init(struct aspeed_video
> *video)
> return PTR_ERR(video->vclk);
> }
>
> - rc = of_reserved_mem_device_init(dev);
> - if (rc) {
> - dev_err(dev, "Unable to reserve memory\n");
> - return rc;
> - }
> + of_reserved_mem_device_init(dev);
You're ignoring *all* errors here with the expectation that the cause is the
missing memory-region property. However, other errors can propagate
out of of_reserved_mem_device_init() - e.g. ENOMEM. Rather than remove
error checking, I think you should explicitly test for ENODEV, which is what is
returned if the memory-region property is absent.
Cheers,
Andrew
>
> rc = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32));
> if (rc) {
> --
> 1.8.3.1
>
>
next prev parent reply other threads:[~2019-04-03 6:01 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-02 18:24 [PATCH 0/5] Aspeed: Enable video engine Eddie James
2019-04-02 18:25 ` [PATCH 1/5] media: platform: Aspeed: Remove use of reset line Eddie James
2019-04-11 2:49 ` Joel Stanley
2019-04-02 18:25 ` [PATCH 2/5] media: platform: Aspeed: Make reserved memory optional Eddie James
2019-04-03 6:01 ` Andrew Jeffery [this message]
2019-04-03 14:35 ` Eddie James
2019-04-04 2:16 ` Andrew Jeffery
2019-04-02 18:25 ` [PATCH 3/5] media: dt-bindings: aspeed-video: Add missing memory-region property Eddie James
2019-04-02 21:05 ` Jae Hyun Yoo
2019-04-06 6:06 ` Rob Herring
2019-04-02 18:25 ` [PATCH 4/5] clk: Aspeed: Setup video engine clocking Eddie James
2019-04-11 2:50 ` Joel Stanley
2019-04-18 21:56 ` Stephen Boyd
2019-04-02 18:25 ` [PATCH 5/5] ARM: dts: aspeed-g5: Add video engine Eddie James
2019-04-24 10:50 ` [PATCH 0/5] Aspeed: Enable " Hans Verkuil
2019-04-24 15:00 ` Eddie James
-- strict thread matches above, loose matches on Subject: below --
2019-04-02 18:24 Eddie James
2019-04-02 18:24 ` [PATCH 2/5] media: platform: Aspeed: Make reserved memory optional Eddie James
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=7effb2de-cc91-47af-88a2-a0075262e9c4@www.fastmail.com \
--to=andrew@aj.id.au \
--cc=devicetree@vger.kernel.org \
--cc=eajames@linux.ibm.com \
--cc=joel@jms.id.au \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mchehab@kernel.org \
--cc=mturquette@baylibre.com \
--cc=robh+dt@kernel.org \
--cc=sboyd@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;
as well as URLs for NNTP newsgroup(s).