linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Corentin Labbe <clabbe@baylibre.com>
To: airlied@redhat.com, airlied@linux.ie, arnd@arndb.de,
	fenghua.yu@intel.com, gregkh@linuxfoundation.org,
	tony.luck@intel.com
Cc: linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org,
	Corentin Labbe <clabbe@baylibre.com>
Subject: [PATCH v2 1/5] agp: remove unused variable size in agp_generic_create_gatt_table
Date: Thu, 21 Nov 2019 08:14:41 +0000	[thread overview]
Message-ID: <1574324085-4338-2-git-send-email-clabbe@baylibre.com> (raw)
In-Reply-To: <1574324085-4338-1-git-send-email-clabbe@baylibre.com>

This patch fix the following warning:
drivers/char/agp/generic.c:853:6: attention : variable ‘size’ set but not used [-Wunused-but-set-variable]
by removing the unused variable size in agp_generic_create_gatt_table

Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
---
 drivers/char/agp/generic.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c
index df1edb5ec0ad..4d2eb0800b2a 100644
--- a/drivers/char/agp/generic.c
+++ b/drivers/char/agp/generic.c
@@ -850,7 +850,6 @@ int agp_generic_create_gatt_table(struct agp_bridge_data *bridge)
 {
 	char *table;
 	char *table_end;
-	int size;
 	int page_order;
 	int num_entries;
 	int i;
@@ -864,25 +863,22 @@ int agp_generic_create_gatt_table(struct agp_bridge_data *bridge)
 	table = NULL;
 	i = bridge->aperture_size_idx;
 	temp = bridge->current_size;
-	size = page_order = num_entries = 0;
+	page_order = num_entries = 0;
 
 	if (bridge->driver->size_type != FIXED_APER_SIZE) {
 		do {
 			switch (bridge->driver->size_type) {
 			case U8_APER_SIZE:
-				size = A_SIZE_8(temp)->size;
 				page_order =
 				    A_SIZE_8(temp)->page_order;
 				num_entries =
 				    A_SIZE_8(temp)->num_entries;
 				break;
 			case U16_APER_SIZE:
-				size = A_SIZE_16(temp)->size;
 				page_order = A_SIZE_16(temp)->page_order;
 				num_entries = A_SIZE_16(temp)->num_entries;
 				break;
 			case U32_APER_SIZE:
-				size = A_SIZE_32(temp)->size;
 				page_order = A_SIZE_32(temp)->page_order;
 				num_entries = A_SIZE_32(temp)->num_entries;
 				break;
@@ -890,7 +886,7 @@ int agp_generic_create_gatt_table(struct agp_bridge_data *bridge)
 			case FIXED_APER_SIZE:
 			case LVL2_APER_SIZE:
 			default:
-				size = page_order = num_entries = 0;
+				page_order = num_entries = 0;
 				break;
 			}
 
@@ -920,7 +916,6 @@ int agp_generic_create_gatt_table(struct agp_bridge_data *bridge)
 			}
 		} while (!table && (i < bridge->driver->num_aperture_sizes));
 	} else {
-		size = ((struct aper_size_info_fixed *) temp)->size;
 		page_order = ((struct aper_size_info_fixed *) temp)->page_order;
 		num_entries = ((struct aper_size_info_fixed *) temp)->num_entries;
 		table = alloc_gatt_pages(page_order);
-- 
2.23.0


  reply	other threads:[~2019-11-21  8:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-21  8:14 [PATCH v2 0/5] agp: minor fixes Corentin Labbe
2019-11-21  8:14 ` Corentin Labbe [this message]
2019-11-21  8:14 ` [PATCH v2 2/5] agp: move AGPGART_MINOR to include/linux/miscdevice.h Corentin Labbe
2019-11-21  8:14 ` [PATCH v2 3/5] agp: remove unused variable num_segments Corentin Labbe
2019-11-21  8:14 ` [PATCH v2 4/5] agp: Add bridge parameter documentation Corentin Labbe
2019-11-21  8:14 ` [PATCH v2 5/5] ia64: agp: Replace empty define with do while Corentin Labbe
2019-11-21  9:05 ` [PATCH v2 0/5] agp: minor fixes Arnd Bergmann
2019-12-02 13:32 ` [PATCH v2 0/5] agp: minor fixes, does the maintainer still there ? LABBE Corentin
2019-12-02 20:01   ` David Airlie
2019-12-05 15:29     ` LABBE Corentin
2019-12-05 19:54       ` David Airlie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1574324085-4338-2-git-send-email-clabbe@baylibre.com \
    --to=clabbe@baylibre.com \
    --cc=airlied@linux.ie \
    --cc=airlied@redhat.com \
    --cc=arnd@arndb.de \
    --cc=fenghua.yu@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).