Message ID | 20180913151716.6333-2-wsa+renesas@sang-engineering.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | dma-mapping: clear dangling pointers consistently | expand |
On Thu, Sep 13, 2018 at 5:18 PM Wolfram Sang <wsa+renesas@sang-engineering.com> wrote: > Update the comment because we don't set the pointer to NULL anymore. > Also use the correct pointer name 'dma_ops' instead of 'dma_map_ops'. > > Fixes: 1874619a7df4 ("ARM: dma-mapping: Set proper DMA ops in arm_iommu_detach_device()") > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Nice catch! Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Gr{oetje,eeting}s, Geert
On Fri, Sep 14, 2018 at 02:15:01PM +0200, Geert Uytterhoeven wrote: > On Thu, Sep 13, 2018 at 5:18 PM Wolfram Sang > <wsa+renesas@sang-engineering.com> wrote: > > Update the comment because we don't set the pointer to NULL anymore. > > Also use the correct pointer name 'dma_ops' instead of 'dma_map_ops'. > > > > Fixes: 1874619a7df4 ("ARM: dma-mapping: Set proper DMA ops in arm_iommu_detach_device()") > > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> > > Nice catch! > > Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Thanks, so I sent this seperately via ALKML now.
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 66566472c153..e3b04786838f 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -2287,7 +2287,7 @@ EXPORT_SYMBOL_GPL(arm_iommu_attach_device); * @dev: valid struct device pointer * * Detaches the provided device from a previously attached map. - * This voids the dma operations (dma_map_ops pointer) + * This overwrites the dma_ops pointer with appropriate non-IOMMU ops. */ void arm_iommu_detach_device(struct device *dev) {
Update the comment because we don't set the pointer to NULL anymore. Also use the correct pointer name 'dma_ops' instead of 'dma_map_ops'. Fixes: 1874619a7df4 ("ARM: dma-mapping: Set proper DMA ops in arm_iommu_detach_device()") Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> --- arch/arm/mm/dma-mapping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)