diff mbox

xen/privcmd: remove unused variable pageidx

Message ID 20171108130030.25394-1-colin.king@canonical.com (mailing list archive)
State New, archived
Headers show

Commit Message

Colin King Nov. 8, 2017, 1 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Variable pageidx is assigned a value but it is never read, hence it
is redundant and can be removed. Cleans up clang warning:

drivers/xen/privcmd.c:199:2: warning: Value stored to 'pageidx'
is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/xen/privcmd.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Jürgen Groß Nov. 8, 2017, 1:30 p.m. UTC | #1
On 08/11/17 14:00, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Variable pageidx is assigned a value but it is never read, hence it
> is redundant and can be removed. Cleans up clang warning:
> 
> drivers/xen/privcmd.c:199:2: warning: Value stored to 'pageidx'
> is never read
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Reviewed-by: Juergen Gross <jgross@suse.com>


Juergen
Boris Ostrovsky Nov. 8, 2017, 9:22 p.m. UTC | #2
On 11/08/2017 08:30 AM, Juergen Gross wrote:
> On 08/11/17 14:00, Colin King wrote:
>> From: Colin Ian King <colin.king@canonical.com>
>>
>> Variable pageidx is assigned a value but it is never read, hence it
>> is redundant and can be removed. Cleans up clang warning:
>>
>> drivers/xen/privcmd.c:199:2: warning: Value stored to 'pageidx'
>> is never read
>>
>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> Reviewed-by: Juergen Gross <jgross@suse.com>


Applied to for-linus-4.15.

-boris
diff mbox

Patch

diff --git a/drivers/xen/privcmd.c b/drivers/xen/privcmd.c
index feca75b07fdd..1c909183c42a 100644
--- a/drivers/xen/privcmd.c
+++ b/drivers/xen/privcmd.c
@@ -191,13 +191,10 @@  static int traverse_pages_block(unsigned nelem, size_t size,
 				void *state)
 {
 	void *pagedata;
-	unsigned pageidx;
 	int ret = 0;
 
 	BUG_ON(size > PAGE_SIZE);
 
-	pageidx = PAGE_SIZE;
-
 	while (nelem) {
 		int nr = (PAGE_SIZE/size);
 		struct page *page;