From patchwork Wed Nov 8 13:00:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin King X-Patchwork-Id: 10048473 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 558FA603FA for ; Wed, 8 Nov 2017 13:02:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4796E2A58F for ; Wed, 8 Nov 2017 13:02:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3AF4B2A5C0; Wed, 8 Nov 2017 13:02:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E5B052A58F for ; Wed, 8 Nov 2017 13:02:56 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eCPyA-0003aa-Ud; Wed, 08 Nov 2017 13:00:38 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eCPy9-0003aR-OZ for xen-devel@lists.xenproject.org; Wed, 08 Nov 2017 13:00:37 +0000 Received: from [85.158.137.68] by server-11.bemta-3.messagelabs.com id 8C/67-00647-5FFF20A5; Wed, 08 Nov 2017 13:00:37 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprCIsWRWlGSWpSXmKPExsUSvTeyQPfLf6Y og/5eRYvvWyYzOTB6HP5whSWAMYo1My8pvyKBNWPRsXlsBfvZKvoX/GZvYNzG2sXIxSEk0Mgk 0TPpMVMXIycHm4C2xP5nLWwgtohAsUR7x15GEJtZwEniz9cOVhBbWMBGYv++OUBxDg4WAVWJ/ 8t9QcK8ArYS01ftYQGxJQTkJc49uM0MEReUODnzCQtIObOApsT6XfoQE+UlmrfOZp7AyD0LSd UshKpZSKoWMDKvYlQvTi0qSy3SNdVLKspMzyjJTczM0TU0MNbLTS0uTkxPzUlMKtZLzs/dxAg Mj3oGBsYdjJe/Oh1ilORgUhLlffCKKUqILyk/pTIjsTgjvqg0J7X4EKMMB4eSBG/+P6CcYFFq empFWmYOMFBh0hIcPEoivBNB0rzFBYm5xZnpEKlTjPYcxzZd/sPEcePhdSD5bObrBmaOaVdbm 5iFWPLy81KlxHkbQdoEQNoySvPghsIi6xKjrJQwLyMDA4MQT0FqUW5mCar8K0ZxDkYlYd5+kC k8mXklcLtfAZ3FBHTW/hAGkLNKEhFSUg2Mi+Z6hUzeeDP3sWa+RdMydYUbzD26ZuwNP9lXzOQ 4tElvVqFwso2bp1KHbWiO5buHz02ya/8eOuAcEPLhZV+2Cce7k1p314bNVLoi8/nqg3+rDXRq zZ9ZmR7IbInsrzvE8EX8/sGXe3znFvBE+z+z15il1jhvz74iC2aBM+zr7GPVjietX7lfiaU4I 9FQi7moOBEAiewRjqcCAAA= X-Env-Sender: colin.king@canonical.com X-Msg-Ref: server-7.tower-31.messagelabs.com!1510146036!106504186!1 X-Originating-IP: [91.189.89.112] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 51553 invoked from network); 8 Nov 2017 13:00:36 -0000 Received: from youngberry.canonical.com (HELO youngberry.canonical.com) (91.189.89.112) by server-7.tower-31.messagelabs.com with AES256-SHA encrypted SMTP; 8 Nov 2017 13:00:36 -0000 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1eCPy3-000694-DP; Wed, 08 Nov 2017 13:00:31 +0000 From: Colin King To: Boris Ostrovsky , Juergen Gross , xen-devel@lists.xenproject.org Date: Wed, 8 Nov 2017 13:00:30 +0000 Message-Id: <20171108130030.25394-1-colin.king@canonical.com> X-Mailer: git-send-email 2.14.1 MIME-Version: 1.0 Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [Xen-devel] [PATCH] xen/privcmd: remove unused variable pageidx X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Colin Ian King 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 Reviewed-by: Juergen Gross --- drivers/xen/privcmd.c | 3 --- 1 file changed, 3 deletions(-) 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;