[PATCH] ARM: Use list_for_each_entry() for dmabounce

Convert dmabounce.c to use list_for_each_entry() instead of
list_for_each() + list_entry().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

+5 -13
+5 -13
arch/arm/common/dmabounce.c
··· 93 static inline struct dmabounce_device_info * 94 find_dmabounce_dev(struct device *dev) 95 { 96 - struct list_head *entry; 97 98 - list_for_each(entry, &dmabounce_devs) { 99 - struct dmabounce_device_info *d = 100 - list_entry(entry, struct dmabounce_device_info, node); 101 - 102 if (d->dev == dev) 103 return d; 104 - } 105 return NULL; 106 } 107 ··· 169 static inline struct safe_buffer * 170 find_safe_buffer(struct dmabounce_device_info *device_info, dma_addr_t safe_dma_addr) 171 { 172 - struct list_head *entry; 173 174 - list_for_each(entry, &device_info->safe_buffers) { 175 - struct safe_buffer *b = 176 - list_entry(entry, struct safe_buffer, node); 177 - 178 if (b->safe_dma_addr == safe_dma_addr) 179 return b; 180 - } 181 182 return NULL; 183 } ··· 293 "%s: unsafe buffer %p (phy=%p) mapped to %p (phy=%p)\n", 294 __func__, buf->ptr, (void *) virt_to_dma(dev, buf->ptr), 295 buf->safe, (void *) buf->safe_dma_addr); 296 - 297 298 DO_STATS ( device_info->bounce_count++ ); 299
··· 93 static inline struct dmabounce_device_info * 94 find_dmabounce_dev(struct device *dev) 95 { 96 + struct dmabounce_device_info *d; 97 98 + list_for_each_entry(d, &dmabounce_devs, node) 99 if (d->dev == dev) 100 return d; 101 + 102 return NULL; 103 } 104 ··· 172 static inline struct safe_buffer * 173 find_safe_buffer(struct dmabounce_device_info *device_info, dma_addr_t safe_dma_addr) 174 { 175 + struct safe_buffer *b; 176 177 + list_for_each_entry(b, &device_info->safe_buffers, node) 178 if (b->safe_dma_addr == safe_dma_addr) 179 return b; 180 181 return NULL; 182 } ··· 300 "%s: unsafe buffer %p (phy=%p) mapped to %p (phy=%p)\n", 301 __func__, buf->ptr, (void *) virt_to_dma(dev, buf->ptr), 302 buf->safe, (void *) buf->safe_dma_addr); 303 304 DO_STATS ( device_info->bounce_count++ ); 305