Author: scottl
Date: Mon Feb 17 20:12:34 2020
New Revision: 358041
URL: https://svnweb.freebsd.org/changeset/base/358041

Log:
  Fix syntax error from r357647.  Adjust a variable name to make the use more
  clear.
  
  Reported by:  dim

Modified:
  head/sys/dev/altera/sdcard/altera_sdcard_io.c

Modified: head/sys/dev/altera/sdcard/altera_sdcard_io.c
==============================================================================
--- head/sys/dev/altera/sdcard/altera_sdcard_io.c       Mon Feb 17 20:09:06 
2020        (r358040)
+++ head/sys/dev/altera/sdcard/altera_sdcard_io.c       Mon Feb 17 20:12:34 
2020        (r358041)
@@ -293,27 +293,31 @@ recheck:
 }
 
 static void
-altera_sdcard_io_start_internal(struct altera_sdcard_softc *sc, struct bio 
**bp)
+altera_sdcard_io_start_internal(struct altera_sdcard_softc *sc,
+    struct bio **bpp)
 {
+       struct bio *bp;
 
-       switch (*bp->bio_cmd) {
+       bp = *bpp;
+
+       switch (bp->bio_cmd) {
        case BIO_READ:
-               altera_sdcard_write_cmd_arg(sc, *bp->bio_pblkno *
+               altera_sdcard_write_cmd_arg(sc, bp->bio_pblkno *
                    ALTERA_SDCARD_SECTORSIZE);
                altera_sdcard_write_cmd(sc, ALTERA_SDCARD_CMD_READ_BLOCK);
                break;
 
        case BIO_WRITE:
-               altera_sdcard_write_rxtx_buffer(sc, *bp->bio_data,
-                   *bp->bio_bcount);
-               altera_sdcard_write_cmd_arg(sc, *bp->bio_pblkno *
+               altera_sdcard_write_rxtx_buffer(sc, bp->bio_data,
+                   bp->bio_bcount);
+               altera_sdcard_write_cmd_arg(sc, bp->bio_pblkno *
                    ALTERA_SDCARD_SECTORSIZE);
                altera_sdcard_write_cmd(sc, ALTERA_SDCARD_CMD_WRITE_BLOCK);
                break;
 
        default:
-               biofinish(*bp, NULL, EOPNOTSUPP);
-               *bp = NULL;
+               biofinish(bp, NULL, EOPNOTSUPP);
+               *bpp = NULL;
        }
 }
 
@@ -333,7 +337,7 @@ altera_sdcard_io_start(struct altera_sdcard_softc *sc,
        KASSERT(bp->bio_bcount == ALTERA_SDCARD_SECTORSIZE,
            ("%s: I/O size not %d", __func__, ALTERA_SDCARD_SECTORSIZE));
        altera_sdcard_io_start_internal(sc, &bp);
-       sc->as_currentbio = *bp;
+       sc->as_currentbio = bp;
        sc->as_retriesleft = ALTERA_SDCARD_RETRY_LIMIT;
 }
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to