Skip to content

Commit

Permalink
SQUASH: staging: vc04_services: Fix warnings
Browse files Browse the repository at this point in the history
create_pagelist uses a number of WARNs to sanity-check check the input
user pages, verifying that only the first and last entries in the
array are not integral pages. These WARNs use the output array index
when it should be input array index. Although the difference is only
significant in one instance, change all the indices for consistency.

See: raspberrypi#1987

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
  • Loading branch information
Phil Elwell committed May 4, 2017
1 parent d8479ab commit 03d2ab9
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -534,8 +534,8 @@ create_pagelist(char __user *buf, size_t count, unsigned short type,
* aligned and a multiple of the page size
*/
WARN_ON(len == 0);
WARN_ON(k && (k != (dma_buffers - 1)) && (len & ~PAGE_MASK));
WARN_ON(k && (addr & ~PAGE_MASK));
WARN_ON(i && (i != (dma_buffers - 1)) && (len & ~PAGE_MASK));
WARN_ON(i && (addr & ~PAGE_MASK));
if (k > 0 &&
((addrs[k - 1] & PAGE_MASK) +
(((addrs[k - 1] & ~PAGE_MASK) + 1) << PAGE_SHIFT))
Expand Down

0 comments on commit 03d2ab9

Please sign in to comment.