Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/marvell ensure spibus_attach_args is zero'ed



details:   https://anonhg.NetBSD.org/src/rev/7c45405bbbfe
branches:  trunk
changeset: 964714:7c45405bbbfe
user:      tnn <tnn%NetBSD.org@localhost>
date:      Tue Aug 13 17:03:10 2019 +0000

description:
ensure spibus_attach_args is zero'ed

diffstat:

 sys/arch/arm/at91/at91spi.c         |  7 ++++---
 sys/arch/arm/broadcom/bcm2835_spi.c |  5 +++--
 sys/arch/arm/imx/imxspi.c           |  5 +++--
 sys/arch/arm/rockchip/rk_spi.c      |  5 +++--
 sys/arch/arm/sunxi/sun4i_spi.c      |  5 +++--
 sys/arch/arm/sunxi/sun6i_spi.c      |  5 +++--
 sys/arch/mips/alchemy/dev/auspi.c   |  5 +++--
 sys/arch/mips/atheros/dev/arspi.c   |  5 +++--
 sys/dev/marvell/mvspi.c             |  1 +
 9 files changed, 26 insertions(+), 17 deletions(-)

diffs (221 lines):

diff -r 7ef34cd93b93 -r 7c45405bbbfe sys/arch/arm/at91/at91spi.c
--- a/sys/arch/arm/at91/at91spi.c       Tue Aug 13 16:46:49 2019 +0000
+++ b/sys/arch/arm/at91/at91spi.c       Tue Aug 13 17:03:10 2019 +0000
@@ -1,5 +1,5 @@
-/*     $Id: at91spi.c,v 1.3 2011/07/01 19:31:17 dyoung Exp $   */
-/*     $NetBSD: at91spi.c,v 1.3 2011/07/01 19:31:17 dyoung Exp $       */
+/*     $Id: at91spi.c,v 1.4 2019/08/13 17:03:10 tnn Exp $      */
+/*     $NetBSD: at91spi.c,v 1.4 2019/08/13 17:03:10 tnn Exp $  */
 
 /*-
  * Copyright (c) 2007 Embedtronics Oy. All rights reserved.
@@ -46,7 +46,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: at91spi.c,v 1.3 2011/07/01 19:31:17 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: at91spi.c,v 1.4 2019/08/13 17:03:10 tnn Exp $");
 
 #include "locators.h"
 
@@ -155,6 +155,7 @@
                aprint_error("%s: no slaves!\n", device_xname(sc->sc_dev));
        }
 
+       memset(&sba, 0, sizeof(sba));
        sba.sba_controller = &sc->sc_spi;
 
        /* initialize the queue */
diff -r 7ef34cd93b93 -r 7c45405bbbfe sys/arch/arm/broadcom/bcm2835_spi.c
--- a/sys/arch/arm/broadcom/bcm2835_spi.c       Tue Aug 13 16:46:49 2019 +0000
+++ b/sys/arch/arm/broadcom/bcm2835_spi.c       Tue Aug 13 17:03:10 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bcm2835_spi.c,v 1.5 2017/12/10 21:38:26 skrll Exp $    */
+/*     $NetBSD: bcm2835_spi.c,v 1.6 2019/08/13 17:03:10 tnn Exp $      */
 
 /*
  * Copyright (c) 2012 Jonathan A. Kollasch
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_spi.c,v 1.5 2017/12/10 21:38:26 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_spi.c,v 1.6 2019/08/13 17:03:10 tnn Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -135,6 +135,7 @@
        sc->sc_spi.sct_transfer = bcmspi_transfer;
        sc->sc_spi.sct_nslaves = 3;
 
+       memset(&sba, 0, sizeof(sba));
        sba.sba_controller = &sc->sc_spi;
 
        (void) config_found_ia(self, "spibus", &sba, spibus_print);
diff -r 7ef34cd93b93 -r 7c45405bbbfe sys/arch/arm/imx/imxspi.c
--- a/sys/arch/arm/imx/imxspi.c Tue Aug 13 16:46:49 2019 +0000
+++ b/sys/arch/arm/imx/imxspi.c Tue Aug 13 17:03:10 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: imxspi.c,v 1.3 2017/08/07 09:24:43 hkenken Exp $       */
+/*     $NetBSD: imxspi.c,v 1.4 2019/08/13 17:03:10 tnn Exp $   */
 
 /*-
  * Copyright (c) 2014  Genetec Corporation.  All rights reserved.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: imxspi.c,v 1.3 2017/08/07 09:24:43 hkenken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imxspi.c,v 1.4 2019/08/13 17:03:10 tnn Exp $");
 
 #include "opt_imx.h"
 #include "opt_imxspi.h"
@@ -114,6 +114,7 @@
        if (!sc->sc_spi.sct_nslaves)
                aprint_error_dev(sc->sc_dev, "no slaves!\n");
 
+       memset(&sba, 0, sizeof(sba));
        sba.sba_controller = &sc->sc_spi;
 
        /* initialize the queue */
diff -r 7ef34cd93b93 -r 7c45405bbbfe sys/arch/arm/rockchip/rk_spi.c
--- a/sys/arch/arm/rockchip/rk_spi.c    Tue Aug 13 16:46:49 2019 +0000
+++ b/sys/arch/arm/rockchip/rk_spi.c    Tue Aug 13 17:03:10 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rk_spi.c,v 1.1 2019/08/05 15:22:59 tnn Exp $   */
+/*     $NetBSD: rk_spi.c,v 1.2 2019/08/13 17:03:10 tnn Exp $   */
 
 /*
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rk_spi.c,v 1.1 2019/08/05 15:22:59 tnn Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rk_spi.c,v 1.2 2019/08/13 17:03:10 tnn Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -253,6 +253,7 @@
        sc->sc_spi.sct_transfer = rk_spi_transfer;
        sc->sc_spi.sct_nslaves = 2;
 
+       memset(&sba, 0, sizeof(sba));
        sba.sba_controller = &sc->sc_spi;
 
        (void) config_found_ia(self, "spibus", &sba, spibus_print);
diff -r 7ef34cd93b93 -r 7c45405bbbfe sys/arch/arm/sunxi/sun4i_spi.c
--- a/sys/arch/arm/sunxi/sun4i_spi.c    Tue Aug 13 16:46:49 2019 +0000
+++ b/sys/arch/arm/sunxi/sun4i_spi.c    Tue Aug 13 17:03:10 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sun4i_spi.c,v 1.3 2019/08/04 22:26:40 tnn Exp $        */
+/*     $NetBSD: sun4i_spi.c,v 1.4 2019/08/13 17:03:10 tnn Exp $        */
 
 /*
  * Copyright (c) 2019 Tobias Nygren
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sun4i_spi.c,v 1.3 2019/08/04 22:26:40 tnn Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sun4i_spi.c,v 1.4 2019/08/13 17:03:10 tnn Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -151,6 +151,7 @@
        sc->sc_spi.sct_configure = sun4ispi_configure;
        sc->sc_spi.sct_transfer = sun4ispi_transfer;
        (void) of_getprop_uint32(phandle, "num-cs", &sc->sc_spi.sct_nslaves);
+       memset(&sba, 0, sizeof(sba));
        sba.sba_controller = &sc->sc_spi;
 
        (void) config_found_ia(self, "spibus", &sba, spibus_print);
diff -r 7ef34cd93b93 -r 7c45405bbbfe sys/arch/arm/sunxi/sun6i_spi.c
--- a/sys/arch/arm/sunxi/sun6i_spi.c    Tue Aug 13 16:46:49 2019 +0000
+++ b/sys/arch/arm/sunxi/sun6i_spi.c    Tue Aug 13 17:03:10 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sun6i_spi.c,v 1.4 2019/08/04 22:26:40 tnn Exp $        */
+/*     $NetBSD: sun6i_spi.c,v 1.5 2019/08/13 17:03:10 tnn Exp $        */
 
 /*
  * Copyright (c) 2019 Tobias Nygren
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sun6i_spi.c,v 1.4 2019/08/04 22:26:40 tnn Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sun6i_spi.c,v 1.5 2019/08/13 17:03:10 tnn Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -184,6 +184,7 @@
        sc->sc_spi.sct_transfer = sun6ispi_transfer;
        sc->sc_spi.sct_nslaves = 4;
 
+       memset(&sba, 0, sizeof(sba));
        sba.sba_controller = &sc->sc_spi;
 
        (void) config_found_ia(self, "spibus", &sba, spibus_print);
diff -r 7ef34cd93b93 -r 7c45405bbbfe sys/arch/mips/alchemy/dev/auspi.c
--- a/sys/arch/mips/alchemy/dev/auspi.c Tue Aug 13 16:46:49 2019 +0000
+++ b/sys/arch/mips/alchemy/dev/auspi.c Tue Aug 13 17:03:10 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: auspi.c,v 1.8 2012/01/04 02:36:26 kiyohara Exp $ */
+/* $NetBSD: auspi.c,v 1.9 2019/08/13 17:03:10 tnn Exp $ */
 
 /*-
  * Copyright (c) 2006 Urbana-Champaign Independent Media Center.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: auspi.c,v 1.8 2012/01/04 02:36:26 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: auspi.c,v 1.9 2019/08/13 17:03:10 tnn Exp $");
 
 #include "locators.h"
 
@@ -147,6 +147,7 @@
        /* fix this! */
        sc->sc_spi.sct_nslaves = sc->sc_md.am_nslaves;
 
+       memset(&sba, 0, sizeof(sba));
        sba.sba_controller = &sc->sc_spi;
 
        /* enable SPI mode */
diff -r 7ef34cd93b93 -r 7c45405bbbfe sys/arch/mips/atheros/dev/arspi.c
--- a/sys/arch/mips/atheros/dev/arspi.c Tue Aug 13 16:46:49 2019 +0000
+++ b/sys/arch/mips/atheros/dev/arspi.c Tue Aug 13 17:03:10 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: arspi.c,v 1.11 2018/09/03 16:29:25 riastradh Exp $ */
+/* $NetBSD: arspi.c,v 1.12 2019/08/13 17:03:11 tnn Exp $ */
 
 /*-
  * Copyright (c) 2006 Urbana-Champaign Independent Media Center.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: arspi.c,v 1.11 2018/09/03 16:29:25 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arspi.c,v 1.12 2019/08/13 17:03:11 tnn Exp $");
 
 #include "locators.h"
 
@@ -191,6 +191,7 @@
        /*
         * Initialize and attach bus attach.
         */
+       memset(&sba, 0, sizeof(sba));
        sba.sba_controller = &sc->sc_spi;
        (void) config_found_ia(self, "spibus", &sba, spibus_print);
 }
diff -r 7ef34cd93b93 -r 7c45405bbbfe sys/dev/marvell/mvspi.c
--- a/sys/dev/marvell/mvspi.c   Tue Aug 13 16:46:49 2019 +0000
+++ b/sys/dev/marvell/mvspi.c   Tue Aug 13 17:03:10 2019 +0000
@@ -148,6 +148,7 @@
        /*
         * Initialize and attach bus attach.
         */
+       memset(&sba, 0, sizeof(sba));
        sba.sba_controller = &sc->sc_spi;
        (void) config_found_ia(self, "spibus", &sba, spibus_print);
 }



Home | Main Index | Thread Index | Old Index