mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: linux-kernel@vger.kernel.org
Cc: trivial@rustcorp.com.au
Subject: [TRIVIAL] fix compilation warnings in 2.6.2-rc3/drivers/video/neofb.c
Date: Sun, 01 Feb 2004 03:21:47 -0800	[thread overview]
Message-ID: <7v7jz79h9w.fsf@assigned-by-dhcp.cox.net> (raw)

Compiling neofb.c without MTRR results in two "unused variable"
warnings.

--- 2.6.2-rc3/drivers/video/neofb.c	2003-11-26 12:44:30 -0800
+++ 2.6.2-rc3/drivers/video/neofb.c	2004-02-01 03:05:10 -0800
@@ -1649,8 +1649,6 @@
 static int __devinit neo_map_video(struct fb_info *info,
 				   struct pci_dev *dev, int video_len)
 {
-	struct neofb_par *par = (struct neofb_par *) info->par;
-
 	DBG("neo_map_video");
 
 	info->fix.smem_start = pci_resource_start(dev, 0);
@@ -1674,7 +1672,7 @@
 		       info->screen_base);
 
 #ifdef CONFIG_MTRR
-	par->mtrr =
+	((struct neofb_par *)(info->par))->mtrr =
 	    mtrr_add(info->fix.smem_start, pci_resource_len(dev, 0),
 		     MTRR_TYPE_WRCOMB, 1);
 #endif
@@ -1686,12 +1684,12 @@
 
 static void __devinit neo_unmap_video(struct fb_info *info)
 {
-	struct neofb_par *par = (struct neofb_par *) info->par;
 
 	DBG("neo_unmap_video");
 
 	if (info->screen_base) {
 #ifdef CONFIG_MTRR
+		struct neofb_par *par = (struct neofb_par *) info->par;
 		mtrr_del(par->mtrr, info->fix.smem_start,
 			 info->fix.smem_len);
 #endif


                 reply	other threads:[~2004-02-01 11:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=7v7jz79h9w.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trivial@rustcorp.com.au \
    /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

all inboxes | Powered by JetHome®