dmaengine fixes for 4.11-rc5
Couple of minor fixes for 4.11 - array bound fix for __get_unmap_pool() - cyclic period splitting for bcm2835 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJY4L1bAAoJEHwUBw8lI4NHoI4P/j+t5ZiMd9LgBaEWrkQRJd0j RiTD2ub93XRaMGCCTG9mpKy6QJ18T2Hma8e73sW6+kxG0KPP7JldvK395cO9pTgb R0CktSA72HPlUyy+OSg5OeB9T3pdcOfwv/RuD1g4TfEyknGVTWXKd4u/v5Lupn/y UTWIhsd/0VlIIIEKlaoelG0UsK92rqAc3dnjdVzx102XuZZYBStZxP7j7Jnuep4y O4BNLq64/og5X8VvSGjvzkzV83X+JFxPLk1sVrcmChzttOjKWRZkTssiR6DH5qni pz7WI3fxDFgJJwLSejAfhHo+wOwaezytymlVmfViAfDQLgDG8hrt/if1meBffrg6 VpumHcgKiDfPanji1fauC2DK9QFZZ0NuT0DXsL07csVFbqRndFp3qIhDGHy00z4k r2MrFiGcuA5LEQotha3VKD0Z5HjeOOUKCj9hacZAuCXNUohX8KX6Yietc7oEIWco WCodC6vQ3yICPI4bS9dUIkJRkI1qJoB5f5cVcl9NaMybXza/mvyeI7yIOWgoRBvf O0bh1j8sxeyYyfsJ8DZ+NI3uBKm5+iMb6VsVWrso+O8+0sH3f+s8wZkemMDWCBMv V1kx5ZVKJ+7qw4OLOm6tlom8WGdvYQAQjYoLT0Zh9yXc5CQUfpwk4tZ0WOnsoVIi vIJGh6uu3S1rXOTeGXJR =bNTJ -----END PGP SIGNATURE----- Merge tag 'dmaengine-fix-4.11-rc5' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine fixes from Vinod Koul: "A couple of minor fixes for 4.11: - array bound fix for __get_unmap_pool() - cyclic period splitting for bcm2835" * tag 'dmaengine-fix-4.11-rc5' of git://git.infradead.org/users/vkoul/slave-dma: dmaengine: Fix array index out of bounds warning in __get_unmap_pool() dmaengine: bcm2835: Fix cyclic DMA period splitting
This commit is contained in:
commit
f49237bfcd
|
@ -251,8 +251,11 @@ static void bcm2835_dma_create_cb_set_length(
|
|||
*/
|
||||
|
||||
/* have we filled in period_length yet? */
|
||||
if (*total_len + control_block->length < period_len)
|
||||
if (*total_len + control_block->length < period_len) {
|
||||
/* update number of bytes in this period so far */
|
||||
*total_len += control_block->length;
|
||||
return;
|
||||
}
|
||||
|
||||
/* calculate the length that remains to reach period_length */
|
||||
control_block->length = period_len - *total_len;
|
||||
|
|
|
@ -1108,12 +1108,14 @@ static struct dmaengine_unmap_pool *__get_unmap_pool(int nr)
|
|||
switch (order) {
|
||||
case 0 ... 1:
|
||||
return &unmap_pool[0];
|
||||
#if IS_ENABLED(CONFIG_DMA_ENGINE_RAID)
|
||||
case 2 ... 4:
|
||||
return &unmap_pool[1];
|
||||
case 5 ... 7:
|
||||
return &unmap_pool[2];
|
||||
case 8:
|
||||
return &unmap_pool[3];
|
||||
#endif
|
||||
default:
|
||||
BUG();
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue
Block a user