Source-Changes-HG archive

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

[src/trunk]: src/sys/dev "bits" sounds better than "name" for argument name.



details:   https://anonhg.NetBSD.org/src/rev/32164cc237b9
branches:  trunk
changeset: 825754:32164cc237b9
user:      isaki <isaki%NetBSD.org@localhost>
date:      Sat Jul 29 06:45:35 2017 +0000

description:
"bits" sounds better than "name" for argument name.
I feel expression (name / NBBY) a little strange.

diffstat:

 sys/dev/audio.c |  16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diffs (60 lines):

diff -r 08c20e80e34c -r 32164cc237b9 sys/dev/audio.c
--- a/sys/dev/audio.c   Sat Jul 29 06:36:21 2017 +0000
+++ b/sys/dev/audio.c   Sat Jul 29 06:45:35 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: audio.c,v 1.381 2017/07/29 06:36:21 isaki Exp $        */
+/*     $NetBSD: audio.c,v 1.382 2017/07/29 06:45:35 isaki Exp $        */
 
 /*-
  * Copyright (c) 2016 Nathanial Sloss <nathanialsloss%yahoo.com.au@localhost>
@@ -148,7 +148,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.381 2017/07/29 06:36:21 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.382 2017/07/29 06:45:35 isaki Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -5605,9 +5605,9 @@
        return error;
 }
 
-#define DEF_MIX_FUNC(name, type, bigger_type, MINVAL, MAXVAL)          \
+#define DEF_MIX_FUNC(bits, type, bigger_type, MINVAL, MAXVAL)          \
        static void                                                     \
-       mix_func##name(struct audio_softc *sc, struct audio_ringbuffer *cb, \
+       mix_func##bits(struct audio_softc *sc, struct audio_ringbuffer *cb, \
                  struct virtual_channel *vc)                           \
        {                                                               \
                int blksize, cc, cc1, cc2, m, resid;                    \
@@ -5630,7 +5630,7 @@
                        if (cc > cc2)                                   \
                                cc = cc2;                               \
                                                                        \
-                       for (m = 0; m < (cc / (name / NBBY)); m++) {    \
+                       for (m = 0; m < (cc / (bits / NBBY)); m++) {    \
                                tomix[m] = (bigger_type)tomix[m] *      \
                                    (bigger_type)(vc->sc_swvol) / 255;  \
                                result = orig[m] + tomix[m];            \
@@ -5675,9 +5675,9 @@
        }
 }
 
-#define DEF_RECSWVOL_FUNC(name, type, bigger_type)                     \
+#define DEF_RECSWVOL_FUNC(bits, type, bigger_type)                     \
        static void                                             \
-       recswvol_func##name(struct audio_softc *sc,                     \
+       recswvol_func##bits(struct audio_softc *sc,                     \
            struct audio_ringbuffer *cb, size_t blksize,                \
            struct virtual_channel *vc)                                 \
        {                                                               \
@@ -5693,7 +5693,7 @@
                        if (cc > cc1)                                   \
                                cc = cc1;                               \
                                                                        \
-                       for (m = 0; m < (cc / (name / 8)); m++) {       \
+                       for (m = 0; m < (cc / (bits / 8)); m++) {       \
                                orig[m] = (bigger_type)(orig[m] *       \
                                    (bigger_type)(vc->sc_recswvol) / 256);\
                        }                                               \



Home | Main Index | Thread Index | Old Index