From 03d2ab93d2edef5010660a763ef84cd8411d4299 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Thu, 4 May 2017 09:55:34 +0100 Subject: [PATCH] SQUASH: staging: vc04_services: Fix warnings 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: https://github.com/raspberrypi/linux/pull/1987 Signed-off-by: Phil Elwell --- .../vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c index 18f2f529687b6..02e97367cb881 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c @@ -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))