Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic fix non-literal format strings (Paul Goyette)



details:   https://anonhg.NetBSD.org/src/rev/e29754972932
branches:  trunk
changeset: 768547:e29754972932
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Aug 19 08:25:07 2011 +0000

description:
fix non-literal format strings (Paul Goyette)

diffstat:

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

diffs (72 lines):

diff -r 30d9e5529e76 -r e29754972932 sys/dev/ic/spdmem.c
--- a/sys/dev/ic/spdmem.c       Fri Aug 19 05:36:47 2011 +0000
+++ b/sys/dev/ic/spdmem.c       Fri Aug 19 08:25:07 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: spdmem.c,v 1.3 2011/08/01 03:49:52 pgoyette Exp $ */
+/* $NetBSD: spdmem.c,v 1.4 2011/08/19 08:25:07 christos Exp $ */
 
 /*
  * Copyright (c) 2007 Nicolas Joly
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spdmem.c,v 1.3 2011/08/01 03:49:52 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spdmem.c,v 1.4 2011/08/19 08:25:07 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -124,7 +124,7 @@
 };
 
 /* Format string for timing info */
-static const char* latency="tAA-tRCD-tRP-tRAS: %d-%d-%d-%d\n";
+#define        LATENCY "tAA-tRCD-tRP-tRAS: %d-%d-%d-%d\n";
 
 /* sysctl stuff */
 static int hw_node = CTL_EOL;
@@ -554,7 +554,7 @@
                if (s->sm_sdr.sdr_tCAS & (1 << i))
                        tAA = i;
        tAA++;
-       aprint_verbose_dev(self, latency, tAA, s->sm_sdr.sdr_tRCD,
+       aprint_verbose_dev(self, LATENCY, tAA, s->sm_sdr.sdr_tRCD,
            s->sm_sdr.sdr_tRP, s->sm_sdr.sdr_tRAS);
 
        decode_voltage_refresh(self, s);
@@ -596,7 +596,7 @@
 #define __DDR_ROUND(scale, field)      \
                ((scale * s->sm_ddr.field + cycle_time - 1) / cycle_time)
 
-       aprint_verbose_dev(self, latency, tAA, __DDR_ROUND(250, ddr_tRCD),
+       aprint_verbose_dev(self, LATENCY, tAA, __DDR_ROUND(250, ddr_tRCD),
                __DDR_ROUND(250, ddr_tRP), __DDR_ROUND(1000, ddr_tRAS));
 
 #undef __DDR_ROUND
@@ -640,7 +640,7 @@
 #define __DDR2_ROUND(scale, field)     \
                ((scale * s->sm_ddr2.field + cycle_time - 1) / cycle_time)
 
-       aprint_verbose_dev(self, latency, tAA, __DDR2_ROUND(250, ddr2_tRCD),
+       aprint_verbose_dev(self, LATENCY, tAA, __DDR2_ROUND(250, ddr2_tRCD),
                __DDR2_ROUND(250, ddr2_tRP), __DDR2_ROUND(1000, ddr2_tRAS));
 
 #undef __DDR_ROUND
@@ -691,7 +691,7 @@
 
 #define        __DDR3_CYCLES(field) (s->sm_ddr3.field / s->sm_ddr3.ddr3_tCKmin)
 
-       aprint_verbose_dev(self, latency, __DDR3_CYCLES(ddr3_tAAmin),
+       aprint_verbose_dev(self, LATENCY, __DDR3_CYCLES(ddr3_tAAmin),
                __DDR3_CYCLES(ddr3_tRCDmin), __DDR3_CYCLES(ddr3_tRPmin), 
                (s->sm_ddr3.ddr3_tRAS_msb * 256 + s->sm_ddr3.ddr3_tRAS_lsb) /
                    s->sm_ddr3.ddr3_tCKmin);
@@ -725,7 +725,7 @@
 
 #define        __FBDIMM_CYCLES(field) (s->sm_fbd.field / s->sm_fbd.fbdimm_tCKmin)
 
-       aprint_verbose_dev(self, latency, __FBDIMM_CYCLES(fbdimm_tAAmin),
+       aprint_verbose_dev(self, LATENCY, __FBDIMM_CYCLES(fbdimm_tAAmin),
                __FBDIMM_CYCLES(fbdimm_tRCDmin), __FBDIMM_CYCLES(fbdimm_tRPmin), 
                (s->sm_fbd.fbdimm_tRAS_msb * 256 +
                        s->sm_fbd.fbdimm_tRAS_lsb) /



Home | Main Index | Thread Index | Old Index