Module Name:    src
Committed By:   tsutsui
Date:           Tue Sep 22 13:26:54 UTC 2009

Modified Files:
        src/sys/dev/ic: aic7xxx_osm.c

Log Message:
- wrap long lines
- remove unnecessary casts against void pointers


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/ic/aic7xxx_osm.c

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

Modified files:

Index: src/sys/dev/ic/aic7xxx_osm.c
diff -u src/sys/dev/ic/aic7xxx_osm.c:1.34 src/sys/dev/ic/aic7xxx_osm.c:1.35
--- src/sys/dev/ic/aic7xxx_osm.c:1.34	Sat Sep 12 19:16:35 2009
+++ src/sys/dev/ic/aic7xxx_osm.c	Tue Sep 22 13:26:54 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: aic7xxx_osm.c,v 1.34 2009/09/12 19:16:35 tsutsui Exp $	*/
+/*	$NetBSD: aic7xxx_osm.c,v 1.35 2009/09/22 13:26:54 tsutsui Exp $	*/
 
 /*
  * Bus independent FreeBSD shim for the aic7xxx based adaptec SCSI controllers
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aic7xxx_osm.c,v 1.34 2009/09/12 19:16:35 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aic7xxx_osm.c,v 1.35 2009/09/22 13:26:54 tsutsui Exp $");
 
 #include <dev/ic/aic7xxx_osm.h>
 #include <dev/ic/aic7xxx_inline.h>
@@ -49,8 +49,10 @@
 #endif
 
 
-static void	ahc_action(struct scsipi_channel *chan, scsipi_adapter_req_t req, void *arg);
-static void	ahc_execute_scb(void *arg, bus_dma_segment_t *dm_segs, int nsegments);
+static void	ahc_action(struct scsipi_channel *chan,
+			   scsipi_adapter_req_t req, void *arg);
+static void	ahc_execute_scb(void *arg, bus_dma_segment_t *dm_segs,
+				int nsegments);
 static int	ahc_poll(struct ahc_softc *ahc, int wait);
 static void	ahc_setup_data(struct ahc_softc *ahc,
 			       struct scsipi_xfer *xs, struct scb *scb);
@@ -184,7 +186,7 @@
 {
 	struct	ahc_softc *ahc;
 
-	ahc = (struct ahc_softc *)arg;
+	ahc = arg;
 	ahc_intr(ahc);
 }
 
@@ -294,9 +296,11 @@
 ahc_ioctl(struct scsipi_channel *channel, u_long cmd, void *addr,
     int flag, struct proc *p)
 {
-	struct ahc_softc *ahc = device_private(channel->chan_adapter->adapt_dev);
+	struct ahc_softc *ahc;
 	int s, ret = ENOTTY;
 
+	ahc = device_private(channel->chan_adapter->adapt_dev);
+
 	switch (cmd) {
 	case SCBUSIORESET:
 		s = splbio();
@@ -523,7 +527,8 @@
 	xs->error = 0;
 	xs->status = 0;
 	xs->xs_status = 0;
-	ahc = device_private(xs->xs_periph->periph_channel->chan_adapter->adapt_dev);
+	ahc = device_private(
+	    xs->xs_periph->periph_channel->chan_adapter->adapt_dev);
 
 	if (nsegments != 0) {
 		struct ahc_dma_seg *sg;
@@ -700,7 +705,7 @@
 		return (EIO);
 	}
 
-	ahc_intr((void *)ahc);
+	ahc_intr(ahc);
 	return (0);
 }
 
@@ -803,8 +808,8 @@
 	int	i;
 	char	channel;
 
-	scb = (struct scb *)arg;
-	ahc = (struct ahc_softc *)scb->ahc_softc;
+	scb = arg;
+	ahc = scb->ahc_softc;
 
 	ahc_lock(ahc, &s);
 

Reply via email to