Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ata Output missing '\n' for capability list when DMA...



details:   https://anonhg.NetBSD.org/src/rev/9fafc1c5db0c
branches:  trunk
changeset: 1023211:9fafc1c5db0c
user:      rin <rin%NetBSD.org@localhost>
date:      Sun Aug 29 23:49:32 2021 +0000

description:
Output missing '\n' for capability list when DMA support is not compiled in.

diffstat:

 sys/dev/ata/ata.c |  16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)

diffs (55 lines):

diff -r b1faac4d9f8b -r 9fafc1c5db0c sys/dev/ata/ata.c
--- a/sys/dev/ata/ata.c Sun Aug 29 17:01:27 2021 +0000
+++ b/sys/dev/ata/ata.c Sun Aug 29 23:49:32 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ata.c,v 1.162 2021/08/07 16:19:09 thorpej Exp $        */
+/*     $NetBSD: ata.c,v 1.163 2021/08/29 23:49:32 rin Exp $    */
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.  All rights reserved.
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.162 2021/08/07 16:19:09 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.163 2021/08/29 23:49:32 rin Exp $");
 
 #include "opt_ata.h"
 
@@ -2044,9 +2044,7 @@
 #if NATA_DMA
        if ((atac->atac_cap & ATAC_CAP_DMA) == 0) {
                /* don't care about DMA modes */
-               if (*sep != '\0')
-                       aprint_verbose("\n");
-               return;
+               goto out;
        }
        if (cf_flags & ATA_CONFIG_DMA_SET) {
                ata_channel_lock(chp);
@@ -2092,13 +2090,10 @@
        }
        ata_channel_unlock(chp);
 
-       if (*sep != '\0')
-               aprint_verbose("\n");
-
 #if NATA_UDMA
        if ((atac->atac_cap & ATAC_CAP_UDMA) == 0) {
                /* don't care about UDMA modes */
-               return;
+               goto out;
        }
        if (cf_flags & ATA_CONFIG_UDMA_SET) {
                ata_channel_lock(chp);
@@ -2113,7 +2108,10 @@
                ata_channel_unlock(chp);
        }
 #endif /* NATA_UDMA */
+out:
 #endif /* NATA_DMA */
+       if (*sep != '\0')
+               aprint_verbose("\n");
 }
 
 /* management of the /dev/atabus* devices */



Home | Main Index | Thread Index | Old Index