* [PATCH] : Mark read-only ISA-PNP function parameters as "const"
@ 2001-01-10 17:38 Chris Rankin
2001-01-10 20:16 ` [IBPATCH] " Dan Aloni
0 siblings, 1 reply; 2+ messages in thread
From: Chris Rankin @ 2001-01-10 17:38 UTC (permalink / raw)
To: torvalds; +Cc: perex, linux-kernel
Hi,
This is an incredibly boring patch that just adds "const" to some of
the ISA-PNP function prototypes. It compiles cleanly with gcc-2.95.2.
Cheers,
Chris
--- linux-vanilla/include/linux/isapnp.h Sun Dec 31 19:11:06 2000
+++ linux-2.4.0-ac3/include/linux/isapnp.h Wed Jan 10 17:08:28 2001
@@ -188,7 +188,7 @@
struct pci_bus *isapnp_find_card(unsigned short vendor,
unsigned short device,
struct pci_bus *from);
-struct pci_dev *isapnp_find_dev(struct pci_bus *card,
+struct pci_dev *isapnp_find_dev(const struct pci_bus *card,
unsigned short vendor,
unsigned short function,
struct pci_dev *from);
@@ -234,7 +234,7 @@
extern inline struct pci_bus *isapnp_find_card(unsigned short vendor,
unsigned short device,
struct pci_bus *from) { return NULL; }
-extern inline struct pci_dev *isapnp_find_dev(struct pci_bus *card,
+extern inline struct pci_dev *isapnp_find_dev(const struct pci_bus *card,
unsigned short vendor,
unsigned short function,
struct pci_dev *from) { return NULL; }
--- linux-vanilla/drivers/pnp/isapnp.c Mon Dec 11 20:38:58 2000
+++ linux-2.4.0-ac3/drivers/pnp/isapnp.c Wed Jan 10 16:49:13 2001
@@ -1058,7 +1058,7 @@
* Resource manager.
*/
-static struct isapnp_port *isapnp_find_port(struct pci_dev *dev, int index)
+static struct isapnp_port *isapnp_find_port(const struct pci_dev *dev, int index)
{
struct isapnp_resources *res;
struct isapnp_port *port;
@@ -1075,7 +1075,7 @@
return NULL;
}
-struct isapnp_irq *isapnp_find_irq(struct pci_dev *dev, int index)
+struct isapnp_irq *isapnp_find_irq(const struct pci_dev *dev, int index)
{
struct isapnp_resources *res, *resa;
struct isapnp_irq *irq;
@@ -1102,7 +1102,7 @@
return NULL;
}
-struct isapnp_dma *isapnp_find_dma(struct pci_dev *dev, int index)
+struct isapnp_dma *isapnp_find_dma(const struct pci_dev *dev, int index)
{
struct isapnp_resources *res;
struct isapnp_dma *dma;
@@ -1119,7 +1119,7 @@
return NULL;
}
-struct isapnp_mem *isapnp_find_mem(struct pci_dev *dev, int index)
+struct isapnp_mem *isapnp_find_mem(const struct pci_dev *dev, int index)
{
struct isapnp_resources *res;
struct isapnp_mem *mem;
@@ -1136,7 +1136,7 @@
return NULL;
}
-struct isapnp_mem32 *isapnp_find_mem32(struct pci_dev *dev, int index)
+struct isapnp_mem32 *isapnp_find_mem32(const struct pci_dev *dev, int index)
{
struct isapnp_resources *res;
struct isapnp_mem32 *mem32;
@@ -1176,7 +1176,7 @@
return NULL;
}
-struct pci_dev *isapnp_find_dev(struct pci_bus *card,
+struct pci_dev *isapnp_find_dev(const struct pci_bus *card,
unsigned short vendor,
unsigned short function,
struct pci_dev *from)
@@ -1549,7 +1549,7 @@
return 0;
}
-static int isapnp_check_port(struct isapnp_cfgtmp *cfg, int port, int size, int idx)
+static int isapnp_check_port(const struct isapnp_cfgtmp *cfg, int port, int size, int idx)
{
int i, tmp, rport, rsize;
struct isapnp_port *xport;
@@ -1652,7 +1652,7 @@
{
}
-static int isapnp_check_interrupt(struct isapnp_cfgtmp *cfg, int irq, int idx)
+static int isapnp_check_interrupt(const struct isapnp_cfgtmp *cfg, int irq, int idx)
{
int i;
struct pci_dev *dev;
@@ -1739,7 +1739,7 @@
return 0;
}
-static int isapnp_check_dma(struct isapnp_cfgtmp *cfg, int dma, int idx)
+static int isapnp_check_dma(const struct isapnp_cfgtmp *cfg, int dma, int idx)
{
int i;
struct pci_dev *dev;
@@ -1814,7 +1814,7 @@
return 0;
}
-static int isapnp_check_mem(struct isapnp_cfgtmp *cfg, unsigned int addr, unsigned int size, int idx)
+static int isapnp_check_mem(const struct isapnp_cfgtmp *cfg, unsigned int addr, unsigned int size, int idx)
{
int i, tmp;
unsigned int raddr, rsize;
@@ -1911,7 +1911,7 @@
return 0;
}
-static int isapnp_check_valid(struct isapnp_cfgtmp *cfg)
+static int isapnp_check_valid(const struct isapnp_cfgtmp *cfg)
{
int tmp;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 2+ messages in thread
* [IBPATCH] Re: [PATCH] : Mark read-only ISA-PNP function parameters as "const"
2001-01-10 17:38 [PATCH] : Mark read-only ISA-PNP function parameters as "const" Chris Rankin
@ 2001-01-10 20:16 ` Dan Aloni
0 siblings, 0 replies; 2+ messages in thread
From: Dan Aloni @ 2001-01-10 20:16 UTC (permalink / raw)
To: Chris Rankin; +Cc: perex, linux-kernel
On Wed, 10 Jan 2001, Chris Rankin wrote:
> Hi,
>
> This is an incredibly boring patch that just adds "const" to some of
> the ISA-PNP function prototypes. It compiles cleanly with gcc-2.95.2.
>
Talking about the ISA-PNP code, this is also an Incredibly Boring Patch,
though small, it prevents unneeded exportion of some functions. I don't
even bother CC'ing it to Linus right now. I'm not sure if the AC tree
already contains it.
--- linux/drivers/net/ppp_generic.c Sun Dec 3 08:17:26 2000
+++ linux/drivers/net/ppp_generic.c Wed Dec 13 20:05:45 2000
@@ -2408,7 +2408,7 @@
kfree(pch);
}
-void __exit ppp_cleanup(void)
+static void __exit ppp_cleanup(void)
{
/* should never happen */
if (!list_empty(&all_ppp_units) || !list_empty(&all_channels))
--- linux/drivers/net/ppp_synctty.c Wed Dec 13 20:07:11 2000
+++ linux/drivers/net/ppp_synctty.c Wed Dec 13 20:06:45 2000
@@ -738,7 +738,7 @@
}
}
-void __exit
+static void __exit
ppp_sync_cleanup(void)
{
if (tty_register_ldisc(N_SYNC_PPP, NULL) != 0)
--- linux/drivers/net/ppp_async.c Fri Apr 21 23:31:10 2000
+++ linux/drivers/net/ppp_async.c Wed Dec 13 20:08:38 2000
@@ -965,7 +965,7 @@
}
}
-void __exit ppp_async_cleanup(void)
+static void __exit ppp_async_cleanup(void)
{
if (tty_register_ldisc(N_PPP, NULL) != 0)
printk(KERN_ERR "failed to unregister PPP line discipline\n");
--- linux/drivers/char/agp/agpgart_fe.c Thu Jul 13 07:58:42 2000
+++ linux/drivers/char/agp/agpgart_fe.c Wed Dec 13 20:11:58 2000
@@ -1105,7 +1105,7 @@
return 0;
}
-void __exit agp_frontend_cleanup(void)
+static void __exit agp_frontend_cleanup(void)
{
misc_deregister(&agp_miscdev);
}
--
Dan Aloni
dax@karrde.org
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-01-10 20:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-10 17:38 [PATCH] : Mark read-only ISA-PNP function parameters as "const" Chris Rankin
2001-01-10 20:16 ` [IBPATCH] " Dan Aloni
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).