Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic - wrap long lines



details:   https://anonhg.NetBSD.org/src/rev/bd27bce12b6b
branches:  trunk
changeset: 747588:bd27bce12b6b
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Tue Sep 22 13:26:54 2009 +0000

description:
- wrap long lines
- remove unnecessary casts against void pointers

diffstat:

 sys/dev/ic/aic7xxx_osm.c |  25 +++++++++++++++----------
 1 files changed, 15 insertions(+), 10 deletions(-)

diffs (83 lines):

diff -r 2ca2283f645c -r bd27bce12b6b sys/dev/ic/aic7xxx_osm.c
--- a/sys/dev/ic/aic7xxx_osm.c  Tue Sep 22 13:22:53 2009 +0000
+++ b/sys/dev/ic/aic7xxx_osm.c  Tue Sep 22 13:26:54 2009 +0000
@@ -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);
 



Home | Main Index | Thread Index | Old Index