From: "Peter Hüwe" <PeterHuewe@gmx.de>
To: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>,
Haavard Skinnemoen <hskinnemoen@atmel.com>,
Andrew Morton <akpm@linux-foundation.org>,
Peter Ma <pma@mediamatech.com>,
linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org
Subject: Re: [PATCH] arch/avr32: Fix build failure for avr32 caused by typo
Date: Mon, 28 Dec 2009 10:59:30 +0100 [thread overview]
Message-ID: <200912281059.30450.PeterHuewe@gmx.de> (raw)
In-Reply-To: <20091228091318.454c4713@hcegtvedt.norway.atmel.com>
Am Montag 28 Dezember 2009 09:13:18 schrieb Hans-Christian Egtvedt:
> On Fri, 25 Dec 2009 20:08:45 +0100
>
> Peter Huewe <PeterHuewe@gmx.de> wrote:
> > This patch fixes a build failure introduced by the patch
> > atmel-mci: change use of dma slave interface by Nicolas Ferre
> > by changing mci_dma_slave to the correct name of mci_dma_data
> >
> > This should make the avr32 tree build again.
>
> Ah, great, I have not gotten around to test this yet. Thanks for the
> patch. I've done some minor changes and also fixed the kzalloc/kfree
> error handling. Please see the inlined patch below.
>
> @@ -1344,7 +1344,7 @@ at32_add_device_mci(unsigned int id, struct
> mci_platform_data *data) ARRAY_SIZE(atmel_mci0_resource)))
> goto fail;
>
> - slave = kzalloc(sizeof(struct mci_dma_slave), GFP_KERNEL);
> + slave = kzalloc(sizeof(struct mci_dma_data), GFP_KERNEL);
>
> slave->sdata.dma_dev = &dw_dmac0_device.dev;
> slave->sdata.reg_width = DW_DMA_SLAVE_WIDTH_32BIT;
Great, thanks for the update.
The only thing that still catches my eye is that the kzalloc line can fail, so
you should perhaps add something like
if (!slave) {
printk(KERN_ERR "No memory left for at32ap700x: at32_add_device_mc");
goto fail;
}
(not tested :)
Apart from that:
Acked-By: Peter Huewe <peterhuewe@gmx.de>
Thanks and best regards,
Peter
next prev parent reply other threads:[~2009-12-28 9:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-25 19:08 [PATCH] arch/avr32: Fix build failure for avr32 caused by typo Peter Huewe
2009-12-28 8:13 ` Hans-Christian Egtvedt
2009-12-28 9:59 ` Peter Hüwe [this message]
2009-12-28 10:02 ` Hans-Christian Egtvedt
2009-12-28 10:20 ` Haavard Skinnemoen
2009-12-28 10:34 ` Peter Hüwe
2009-12-28 11:07 ` Hans-Christian Egtvedt
2009-12-28 11:23 ` Hans-Christian Egtvedt
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=200912281059.30450.PeterHuewe@gmx.de \
--to=peterhuewe@gmx.de \
--cc=akpm@linux-foundation.org \
--cc=hans-christian.egtvedt@atmel.com \
--cc=hskinnemoen@atmel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=nicolas.ferre@atmel.com \
--cc=pma@mediamatech.com \
/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