From: Jon Hunter <jonathanh@nvidia.com>
To: Peter Griffin <peter.griffin@linaro.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <kernel@stlinux.com>,
<vinod.koul@intel.com>, <linus.walleij@linaro.org>,
<dan.j.williams@intel.com>, <leoli@freescale.com>,
<zw@zh-kernel.org>, <baohua@kernel.org>,
<maxime.ripard@free-electrons.com>, <wens@csie.org>,
<ldewangan@nvidia.com>, <swarren@wwwdotorg.org>,
<thierry.reding@gmail.com>, <gnurou@gmail.com>
Cc: <lee.jones@linaro.org>, <dmaengine@vger.kernel.org>,
<linux-tegra@vger.kernel.org>, <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH 8/8] dmaengine: Remove site specific OOM error messages on kzalloc
Date: Wed, 8 Jun 2016 09:22:51 +0100 [thread overview]
Message-ID: <5757D5DB.5030401@nvidia.com> (raw)
In-Reply-To: <1465321121-22238-9-git-send-email-peter.griffin@linaro.org>
On 07/06/16 18:38, Peter Griffin wrote:
> If kzalloc() fails it will issue it's own error message including
> a dump_stack(). So remove the site specific error messages.
>
> Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
> ---
> drivers/dma/amba-pl08x.c | 10 +---------
> drivers/dma/bestcomm/bestcomm.c | 2 --
> drivers/dma/edma.c | 16 ++++------------
> drivers/dma/fsldma.c | 2 --
> drivers/dma/k3dma.c | 10 ++++------
> drivers/dma/mmp_tdma.c | 5 ++---
> drivers/dma/moxart-dma.c | 4 +---
> drivers/dma/nbpfaxi.c | 5 ++---
> drivers/dma/pl330.c | 5 +----
> drivers/dma/ppc4xx/adma.c | 2 --
> drivers/dma/s3c24xx-dma.c | 5 +----
> drivers/dma/sh/shdmac.c | 9 ++-------
> drivers/dma/sh/sudmac.c | 9 ++-------
> drivers/dma/sirf-dma.c | 5 ++---
> drivers/dma/ste_dma40.c | 4 +---
> drivers/dma/tegra20-apb-dma.c | 11 +++--------
> drivers/dma/timb_dma.c | 8 ++------
> 17 files changed, 28 insertions(+), 84 deletions(-)
[snip]
> diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
> index 7f4af8c..032884f 100644
> --- a/drivers/dma/tegra20-apb-dma.c
> +++ b/drivers/dma/tegra20-apb-dma.c
> @@ -300,10 +300,8 @@ static struct tegra_dma_desc *tegra_dma_desc_get(
>
> /* Allocate DMA desc */
> dma_desc = kzalloc(sizeof(*dma_desc), GFP_NOWAIT);
> - if (!dma_desc) {
> - dev_err(tdc2dev(tdc), "dma_desc alloc failed\n");
> + if (!dma_desc)
> return NULL;
> - }
>
> dma_async_tx_descriptor_init(&dma_desc->txd, &tdc->dma_chan);
> dma_desc->txd.tx_submit = tegra_dma_tx_submit;
> @@ -340,8 +338,7 @@ static struct tegra_dma_sg_req *tegra_dma_sg_req_get(
> spin_unlock_irqrestore(&tdc->lock, flags);
>
> sg_req = kzalloc(sizeof(struct tegra_dma_sg_req), GFP_NOWAIT);
> - if (!sg_req)
> - dev_err(tdc2dev(tdc), "sg_req alloc failed\n");
> +
> return sg_req;
> }
>
> @@ -1319,10 +1316,8 @@ static int tegra_dma_probe(struct platform_device *pdev)
>
> tdma = devm_kzalloc(&pdev->dev, sizeof(*tdma) + cdata->nr_channels *
> sizeof(struct tegra_dma_channel), GFP_KERNEL);
> - if (!tdma) {
> - dev_err(&pdev->dev, "Error: memory allocation failed\n");
> + if (!tdma)
> return -ENOMEM;
> - }
>
> tdma->dev = &pdev->dev;
> tdma->chip_data = cdata;
For the tegra portion ...
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Cheers
Jon
--
nvpublic
next prev parent reply other threads:[~2016-06-08 8:25 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-07 17:38 [PATCH 0/8] Various dmaengine cleanups Peter Griffin
2016-06-07 17:38 ` [PATCH 1/8] dmaengine: fsl-edma: Fix clock handling error paths Peter Griffin
2016-06-07 17:38 ` [PATCH 2/8] dmaengine: fsl-edma: print error code in error messages Peter Griffin
2016-06-07 17:38 ` [PATCH 3/8] dmaengine: coh901318: Only calculate residue if txstate exists Peter Griffin
2016-06-08 12:15 ` Linus Walleij
2016-06-07 17:38 ` [PATCH 4/8] dmaengine: s3c24xx: Simplify code in s3c24xx_dma_tx_status() Peter Griffin
2016-06-07 17:38 ` [PATCH 5/8] dmaengine: ste_dma40: Only calculate residue if txstate exists Peter Griffin
2016-06-08 12:15 ` Linus Walleij
2016-06-07 17:38 ` [PATCH 6/8] dmaengine: sun6i-dma: Only calculate residue if state exists Peter Griffin
2016-06-07 17:38 ` [PATCH 7/8] dmaengine: tegra20-apb-dma: Only calculate residue if txstate exists Peter Griffin
2016-06-08 8:51 ` Jon Hunter
2016-06-21 16:01 ` Vinod Koul
2016-06-21 17:19 ` Jon Hunter
2016-06-28 4:04 ` Vinod Koul
2016-06-07 17:38 ` [PATCH 8/8] dmaengine: Remove site specific OOM error messages on kzalloc Peter Griffin
2016-06-08 8:22 ` Jon Hunter [this message]
2016-06-08 12:12 ` Linus Walleij
2016-06-09 15:30 ` Lee Jones
2016-06-15 17:08 ` Vinod Koul
2016-06-21 16:05 ` [PATCH 0/8] Various dmaengine cleanups Vinod Koul
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=5757D5DB.5030401@nvidia.com \
--to=jonathanh@nvidia.com \
--cc=baohua@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=gnurou@gmail.com \
--cc=kernel@stlinux.com \
--cc=ldewangan@nvidia.com \
--cc=lee.jones@linaro.org \
--cc=leoli@freescale.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maxime.ripard@free-electrons.com \
--cc=peter.griffin@linaro.org \
--cc=swarren@wwwdotorg.org \
--cc=thierry.reding@gmail.com \
--cc=vinod.koul@intel.com \
--cc=wens@csie.org \
--cc=zw@zh-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).