summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorCorentin Labbe <clabbe@baylibre.com>2019-11-21 08:14:43 +0000
committerDave Airlie <airlied@redhat.com>2019-12-04 13:35:33 +1000
commit5f1b24a6445ddbfccc8de1f5c1a31394a5b9ac66 (patch)
tree7d0a7622f73ecd422360c6d0671a14f6430c9266 /drivers/char
parent0f109f0e9a608c381846b3f2270a6a7b72158cb4 (diff)
downloadlinux-5f1b24a6445ddbfccc8de1f5c1a31394a5b9ac66.tar.bz2
agp: remove unused variable num_segments
This patch fix the following build warning: warning: variable 'num_segments' set but not used [-Wunused-but-set-variable] Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Dave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/1574324085-4338-4-git-send-email-clabbe@baylibre.com
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/agp/frontend.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/char/agp/frontend.c b/drivers/char/agp/frontend.c
index f6955888e676..47098648502d 100644
--- a/drivers/char/agp/frontend.c
+++ b/drivers/char/agp/frontend.c
@@ -102,14 +102,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) &&