public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Udo A. Steinberg" <reality@delusion.de>
To: Linus Torvalds <torvalds@transmeta.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] 2.5.4-pre6 pci/proc.c compile fix
Date: Mon, 11 Feb 2002 03:29:57 +0100	[thread overview]
Message-ID: <3C672CA5.1285184D@delusion.de> (raw)


Hi Linus,

The attached patch fixes the following compile warning in 2.5.4-pre6:

proc.c: In function `proc_bus_pci_read':
proc.c:49: warning: passing arg 1 of `PDE' discards qualifiers from pointer target type
proc.c: In function `proc_bus_pci_write':
proc.c:131: warning: passing arg 1 of `PDE' discards qualifiers from pointer target type

I see no reason why the two inline functions should not use const qualifier. Otherwise
the caller in proc.c should be fixed.

Regards,
Udo.

--- linux-2.5.4-pre-vanilla/include/linux/proc_fs.h     Mon Feb 11 03:03:48 2002
+++ linux-2.5.4-pre/include/linux/proc_fs.h     Mon Feb 11 03:09:50 2002
@@ -217,12 +217,12 @@
        struct inode vfs_inode;
 };
 
-static inline struct proc_inode *PROC_I(struct inode *inode)
+static inline struct proc_inode *PROC_I(const struct inode *inode)
 {
        return list_entry(inode, struct proc_inode, vfs_inode);
 }
 
-static inline struct proc_dir_entry *PDE(struct inode *inode)
+static inline struct proc_dir_entry *PDE(const struct inode *inode)
 {
        return PROC_I(inode)->pde;
 }

                 reply	other threads:[~2002-02-11  2:30 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=3C672CA5.1285184D@delusion.de \
    --to=reality@delusion.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.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