linux-next: manual merge of the dmaengine tree with Linus' tree
Hi all,
Today's linux-next merge of the dmaengine tree got a conflict in:
drivers/dma/mcf-edma.c
between commit:
0a46781c89de ("dmaengine: mcf-edma: Fix a potential un-allocated memory access")
from Linus' tree and commit:
923b13838892 ("dmaengine: mcf-edma: Use struct_size()")
from the dmaengine tree.
I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
Signature · 25 lines
Cheers,
Stephen Rothwell
diff --cc drivers/dma/mcf-edma.c
index 9413fad08a60,28304dd8763a..000000000000
--- a/drivers/dma/mcf-edma.c
+++ b/drivers/dma/mcf-edma.c
@@@ -190,15 -189,9 +189,15 @@@ static int mcf_edma_probe(struct platfo
return -EINVAL;
}
- chans = pdata->dma_channels;
+ if (!pdata->dma_channels) {
+ dev_info(&pdev->dev, "setting default channel number to 64");
+ chans = 64;
+ } else {
+ chans = pdata->dma_channels;
+ }
+
- len = sizeof(*mcf_edma) + sizeof(*mcf_chan) * chans;
- mcf_edma = devm_kzalloc(&pdev->dev, len, GFP_KERNEL);
+ mcf_edma = devm_kzalloc(&pdev->dev, struct_size(mcf_edma, chans, chans),
+ GFP_KERNEL);
if (!mcf_edma)
return -ENOMEM;Quoted 14 lines · Stephen Rothwell
Hi all,
Today's linux-next merge of the dmaengine tree got a conflict in:
drivers/dma/mcf-edma.cbetween commit:
0a46781c89de("dmaengine: mcf-edma: Fix a potential un-allocated memory access")from Linus' tree and commit:
923b13838892("dmaengine: mcf-edma: Usestruct_size()")
Quoted 8 lines
from the dmaengine tree.
I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
Thanks for the merge, it lgtm
Quoted 28 lines
Signature · 3 lines
-- Cheers, Stephen Rothwelldrivers/dma/mcf-edma.c +2
-2@@@ -190,15 -189,9 +189,15 @@@ static int mcf_edma_probe(struct platforeturn -EINVAL ; } - chans = pdata->dma_channels; + if (!pdata->dma_channels) { +dev_info (&pdev->dev,"setting default channel number to 64" ); + chans =64 ; + } else { + chans = pdata->dma_channels; + } + - len =sizeof (*mcf_edma) +sizeof (*mcf_chan) * chans; - mcf_edma =devm_kzalloc (&pdev->dev, len,GFP_KERNEL ); + mcf_edma =devm_kzalloc (&pdev->dev,struct_size (mcf_edma, chans, chans), +GFP_KERNEL );if (!mcf_edma)return -ENOMEM ;
Signature · 1 line
~Vinod