lkml.org 
[lkml]   [2009]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] arch/avr32: Fix build failure for avr32 caused by typo
On Mon, 28 Dec 2009 10:59:30 +0100
Peter Hüwe <PeterHuewe@gmx.de> wrote:

> 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;
> }
>

Sounds like the patch should be split in two, one addressing the proper
naming of the struct mci_dma_data and one fixing the allocation of
memory and proper cleanup.

--
Best regards,
Hans-Christian Egtvedt
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-12-28 11:05    [W:0.089 / U:4.292 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site