Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752023AbdIAMQG (ORCPT ); Fri, 1 Sep 2017 08:16:06 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:36384 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751995AbdIAMQC (ORCPT ); Fri, 1 Sep 2017 08:16:02 -0400 X-Google-Smtp-Source: ADKCNb4jpK2SmFAmng8bSm0ETFzU5+cevATjoYsmWTK43yCewU4+94eoDkFZy2fDCKeZBF4DyFDhIg== From: Corentin Labbe To: airlied@linux.ie, arnd@arndb.de, gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Corentin Labbe Subject: [PATCH 3/3] agp: remove unused variable num_segments Date: Fri, 1 Sep 2017 14:13:32 +0200 Message-Id: <20170901121332.7219-4-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170901121332.7219-1-clabbe.montjoie@gmail.com> References: <20170901121332.7219-1-clabbe.montjoie@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 914 Lines: 30 This patch fix the following build warning: warning: variable 'num_segments' set but not used [-Wunused-but-set-variable] Signed-off-by: Corentin Labbe --- drivers/char/agp/frontend.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/char/agp/frontend.c b/drivers/char/agp/frontend.c index 68376eb54af4..f91975cee665 100644 --- a/drivers/char/agp/frontend.c +++ b/drivers/char/agp/frontend.c @@ -103,14 +103,13 @@ agp_segment_priv *agp_find_seg_in_client(const struct agp_client *client, int size, pgprot_t page_prot) { struct agp_segment_priv *seg; - int num_segments, i; + int i; off_t pg_start; size_t pg_count; pg_start = offset / 4096; pg_count = size / 4096; seg = *(client->segments); - num_segments = client->num_segments; for (i = 0; i < client->num_segments; i++) { if ((seg[i].pg_start == pg_start) && -- 2.13.5