Module Name:    src
Committed By:   thorpej
Date:           Sat Jun 19 16:13:40 UTC 2021

Modified Files:
        src/sys/arch/alpha/pci: mcpcia.c pci_kn300.c pci_kn300.h

Log Message:
Remove the "first" argument from pci_kn300_pickintr().  It's redundant with
information we already have, and is a needless divergence from other
"pickintr" routines.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/alpha/pci/mcpcia.c
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/alpha/pci/pci_kn300.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/alpha/pci/pci_kn300.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/alpha/pci/mcpcia.c
diff -u src/sys/arch/alpha/pci/mcpcia.c:1.32 src/sys/arch/alpha/pci/mcpcia.c:1.33
--- src/sys/arch/alpha/pci/mcpcia.c:1.32	Fri Jun 18 22:17:53 2021
+++ src/sys/arch/alpha/pci/mcpcia.c	Sat Jun 19 16:13:40 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: mcpcia.c,v 1.32 2021/06/18 22:17:53 thorpej Exp $ */
+/* $NetBSD: mcpcia.c,v 1.33 2021/06/19 16:13:40 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include <sys/cdefs.h>			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: mcpcia.c,v 1.32 2021/06/18 22:17:53 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mcpcia.c,v 1.33 2021/06/19 16:13:40 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -126,7 +126,6 @@ mcpciamatch(device_t parent, cfdata_t cf
 static void
 mcpciaattach(device_t parent, device_t self, void *aux)
 {
-	static int first = 1;
 	struct mcbus_dev_attach_args *ma = aux;
 	struct mcpcia_softc *mcp = device_private(self);
 	struct mcpcia_config *ccp;
@@ -174,8 +173,7 @@ mcpciaattach(device_t parent, device_t s
 	/*
 	 * Set up interrupts
 	 */
-	pci_kn300_pickintr(ccp, first);
-	first = 0;
+	pci_kn300_pickintr(ccp);
 
 	/*
 	 * Attach PCI bus

Index: src/sys/arch/alpha/pci/pci_kn300.c
diff -u src/sys/arch/alpha/pci/pci_kn300.c:1.38 src/sys/arch/alpha/pci/pci_kn300.c:1.39
--- src/sys/arch/alpha/pci/pci_kn300.c:1.38	Fri Sep 25 03:40:11 2020
+++ src/sys/arch/alpha/pci/pci_kn300.c	Sat Jun 19 16:13:40 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_kn300.c,v 1.38 2020/09/25 03:40:11 thorpej Exp $ */
+/* $NetBSD: pci_kn300.c,v 1.39 2021/06/19 16:13:40 thorpej Exp $ */
 
 /*
  * Copyright (c) 1998 by Matthew Jacob
@@ -32,7 +32,7 @@
 
 #include <sys/cdefs.h>			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: pci_kn300.c,v 1.38 2020/09/25 03:40:11 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_kn300.c,v 1.39 2021/06/19 16:13:40 thorpej Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -85,12 +85,12 @@ static void	kn300_enable_intr(struct mcp
 static void	kn300_disable_intr(struct mcpcia_config *, int);
 
 void
-pci_kn300_pickintr(struct mcpcia_config *ccp, int first)
+pci_kn300_pickintr(struct mcpcia_config *ccp)
 {
 	char *cp;
 	pci_chipset_tag_t pc = &ccp->cc_pc;
 
-	if (first) {
+	if (kn300_pci_intr == NULL) {
 		int g;
 
 #define PCI_KN300_IRQ_STR	16

Index: src/sys/arch/alpha/pci/pci_kn300.h
diff -u src/sys/arch/alpha/pci/pci_kn300.h:1.3 src/sys/arch/alpha/pci/pci_kn300.h:1.4
--- src/sys/arch/alpha/pci/pci_kn300.h:1.3	Sat Mar 14 14:45:53 2009
+++ src/sys/arch/alpha/pci/pci_kn300.h	Sat Jun 19 16:13:40 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_kn300.h,v 1.3 2009/03/14 14:45:53 dsl Exp $ */
+/* $NetBSD: pci_kn300.h,v 1.4 2021/06/19 16:13:40 thorpej Exp $ */
 
 /*
  * Copyright (c) 1998 by Matthew Jacob
@@ -30,4 +30,4 @@
  * SUCH DAMAGE.
  */
 
-void	pci_kn300_pickintr(struct mcpcia_config *, int);
+void	pci_kn300_pickintr(struct mcpcia_config *);

Reply via email to