From: Robin Murphy <robin.murphy@arm.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
yuji2.ishikawa@toshiba.co.jp
Cc: krzysztof.kozlowski@linaro.org, hverkuil@xs4all.nl,
sakari.ailus@iki.fi, mchehab@kernel.org, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
nobuhiro1.iwamatsu@toshiba.co.jp, broonie@kernel.org,
linux-media@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [PATCH v7 2/5] media: platform: visconti: Add Toshiba Visconti Video Input Interface driver
Date: Mon, 21 Aug 2023 14:35:55 +0100 [thread overview]
Message-ID: <e91dde98-b1ec-6e68-b823-9b5232a4774d@arm.com> (raw)
In-Reply-To: <20230821131903.GI10135@pendragon.ideasonboard.com>
On 2023-08-21 14:19, Laurent Pinchart wrote:
[...]
>>>> + viif_dev->tables =
>>>> + dma_alloc_wc(dev, sizeof(struct viif_table_area), &tables_dma, GFP_KERNEL);
>>>> + if (!viif_dev->tables) {
>>>> + dev_err(dev, "dma_alloc_wc failed\n");
>>>
>>> Are you sure DMA memory allocation errors shall be printed?
>>
>> Printing this error is useless for users in general?
>> If so, I'll drop this debug output.
>
> Failures to allocate memory in the kernel generally result in warning
> messages being printed by the allocation function, so there's no need to
> do so manually in drivers. This being said, I check dma_alloc_wc()
> (which is a wrapper around dma_alloc_attrs()), and unless I'm missing
> something, it can return NULL without printing any error. I don't know
> if this is an oversight in some code paths taken by dma_alloc_attrs() or
> if it's on purpose. Maybe Christoph, Marek or Roben will known.
Yeah, there might be a few edge cases, but in most cases
dma_alloc_attrs() will end up falling back to the page allocator as a
last resort if all the more preferred allocation options fail, and thus
complete failure should eventually cause that to scream unless
DMA_ATTR_NO_WARN was specified.
Thanks,
Robin.
next prev parent reply other threads:[~2023-08-21 13:36 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-14 1:50 [PATCH v7 0/5] " Yuji Ishikawa
2023-07-14 1:50 ` [PATCH v7 1/5] dt-bindings: media: platform: visconti: Add Toshiba Visconti Video Input Interface Yuji Ishikawa
2023-07-14 7:50 ` Krzysztof Kozlowski
2023-07-25 6:08 ` yuji2.ishikawa
2023-07-26 17:21 ` Krzysztof Kozlowski
2023-07-14 1:50 ` [PATCH v7 2/5] media: platform: visconti: Add Toshiba Visconti Video Input Interface driver Yuji Ishikawa
2023-07-14 8:00 ` Krzysztof Kozlowski
2023-07-25 6:10 ` yuji2.ishikawa
2023-08-21 13:19 ` Laurent Pinchart
2023-08-21 13:35 ` Robin Murphy [this message]
2023-08-30 0:47 ` yuji2.ishikawa
2023-07-14 1:50 ` [PATCH v7 3/5] media: add V4L2 vendor specific control handlers Yuji Ishikawa
2023-08-21 12:28 ` Hans Verkuil
2023-08-21 12:33 ` Laurent Pinchart
2023-08-30 0:46 ` yuji2.ishikawa
2023-07-14 1:50 ` [PATCH v7 4/5] documentation: media: add documentation for Toshiba Visconti Video Input Interface driver Yuji Ishikawa
2023-07-14 1:50 ` [PATCH v7 5/5] MAINTAINERS: Add entries for Toshiba Visconti Video Input Interface Yuji Ishikawa
2023-08-21 12:58 ` [PATCH v7 0/5] Add Toshiba Visconti Video Input Interface driver Hans Verkuil
2023-08-30 0:44 ` yuji2.ishikawa
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=e91dde98-b1ec-6e68-b823-9b5232a4774d@arm.com \
--to=robin.murphy@arm.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=hch@lst.de \
--cc=hverkuil@xs4all.nl \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=mchehab@kernel.org \
--cc=nobuhiro1.iwamatsu@toshiba.co.jp \
--cc=robh+dt@kernel.org \
--cc=sakari.ailus@iki.fi \
--cc=yuji2.ishikawa@toshiba.co.jp \
/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®