prop_data_data_nocopy -> prop_data_value

This commit is contained in:
msaitoh 2020-07-02 09:02:04 +00:00
parent 08fb4e9235
commit 4af81626f6
7 changed files with 23 additions and 23 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_bge.c,v 1.345 2020/02/07 00:04:28 thorpej Exp $ */
/* $NetBSD: if_bge.c,v 1.346 2020/07/02 09:07:10 msaitoh Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.345 2020/02/07 00:04:28 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.346 2020/07/02 09:07:10 msaitoh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -6359,7 +6359,7 @@ bge_get_eaddr_fw(struct bge_softc *sc, uint8_t ether_addr[])
if (ea != NULL) {
KASSERT(prop_object_type(ea) == PROP_TYPE_DATA);
KASSERT(prop_data_size(ea) == ETHER_ADDR_LEN);
memcpy(ether_addr, prop_data_data_nocopy(ea), ETHER_ADDR_LEN);
memcpy(ether_addr, prop_data_value(ea), ETHER_ADDR_LEN);
return 0;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_cas.c,v 1.42 2020/03/08 03:16:20 thorpej Exp $ */
/* $NetBSD: if_cas.c,v 1.43 2020/07/02 09:02:04 msaitoh Exp $ */
/* $OpenBSD: if_cas.c,v 1.29 2009/11/29 16:19:38 kettenis Exp $ */
/*
@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_cas.c,v 1.42 2020/03/08 03:16:20 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_cas.c,v 1.43 2020/07/02 09:02:04 msaitoh Exp $");
#ifndef _MODULE
#include "opt_inet.h"
@ -441,7 +441,7 @@ cas_attach(device_t parent, device_t self, void *aux)
if ((data = prop_dictionary_get(device_properties(sc->sc_dev),
"mac-address")) != NULL)
memcpy(enaddr, prop_data_data_nocopy(data), ETHER_ADDR_LEN);
memcpy(enaddr, prop_data_value(data), ETHER_ADDR_LEN);
if (cas_pci_readvpd(sc, pa, (data == NULL) ? enaddr : 0) != 0) {
aprint_error_dev(sc->sc_dev, "no Ethernet address found\n");
memset(enaddr, 0, sizeof(enaddr));

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_gem_pci.c,v 1.51 2020/05/30 16:35:02 thorpej Exp $ */
/* $NetBSD: if_gem_pci.c,v 1.52 2020/07/02 09:02:04 msaitoh Exp $ */
/*
*
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_gem_pci.c,v 1.51 2020/05/30 16:35:02 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_gem_pci.c,v 1.52 2020/07/02 09:02:04 msaitoh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -235,11 +235,11 @@ gem_pci_attach(device_t parent, device_t self, void *aux)
if ((data = prop_dictionary_get(device_properties(sc->sc_dev),
"mac-address")) != NULL) {
memcpy(enaddr, prop_data_data_nocopy(data), ETHER_ADDR_LEN);
memcpy(enaddr, prop_data_value(data), ETHER_ADDR_LEN);
got_addr = 1;
if ((data = prop_dictionary_get(device_properties(sc->sc_dev),
"shared-pins")) != NULL) {
memcpy(buf, prop_data_data_nocopy(data),
memcpy(buf, prop_data_value(data),
prop_data_size(data));
if (isserdes(buf)) {
sc->sc_flags |= GEM_SERDES;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_hme_pci.c,v 1.38 2018/12/09 11:14:02 jdolecek Exp $ */
/* $NetBSD: if_hme_pci.c,v 1.39 2020/07/02 09:02:04 msaitoh Exp $ */
/*
* Copyright (c) 2000 Matthew R. Green
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_hme_pci.c,v 1.38 2018/12/09 11:14:02 jdolecek Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_hme_pci.c,v 1.39 2020/07/02 09:02:04 msaitoh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -215,7 +215,7 @@ hmeattach_pci(device_t parent, device_t self, void *aux)
eaddrprop = prop_dictionary_get(device_properties(self), "mac-address");
if (eaddrprop != NULL && prop_data_size(eaddrprop) == ETHER_ADDR_LEN) {
memcpy(&sc->sc_enaddr, prop_data_data_nocopy(eaddrprop),
memcpy(&sc->sc_enaddr, prop_data_value(eaddrprop),
ETHER_ADDR_LEN);
goto got_eaddr;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_sk.c,v 1.105 2020/02/24 12:20:30 rin Exp $ */
/* $NetBSD: if_sk.c,v 1.106 2020/07/02 09:07:10 msaitoh Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@ -115,7 +115,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_sk.c,v 1.105 2020/02/24 12:20:30 rin Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_sk.c,v 1.106 2020/07/02 09:07:10 msaitoh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -1247,7 +1247,7 @@ sk_attach(device_t parent, device_t self, void *aux)
*/
KASSERT(prop_object_type(data) == PROP_TYPE_DATA);
KASSERT(prop_data_size(data) == ETHER_ADDR_LEN);
memcpy(sc_if->sk_enaddr, prop_data_data_nocopy(data),
memcpy(sc_if->sk_enaddr, prop_data_value(data),
ETHER_ADDR_LEN);
} else
for (i = 0; i < ETHER_ADDR_LEN; i++)

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_stge.c,v 1.86 2020/03/15 22:20:31 thorpej Exp $ */
/* $NetBSD: if_stge.c,v 1.87 2020/07/02 09:02:04 msaitoh Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.86 2020/03/15 22:20:31 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_stge.c,v 1.87 2020/07/02 09:02:04 msaitoh Exp $");
#include <sys/param.h>
@ -600,7 +600,7 @@ stge_attach(device_t parent, device_t self, void *aux)
*/
KASSERT(prop_object_type(data) == PROP_TYPE_DATA);
KASSERT(prop_data_size(data) == ETHER_ADDR_LEN);
(void)memcpy(enaddr, prop_data_data_nocopy(data),
(void)memcpy(enaddr, prop_data_value(data),
ETHER_ADDR_LEN);
} else {
uint16_t myaddr[ETHER_ADDR_LEN / 2];

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_tlp_pci.c,v 1.127 2019/11/10 21:16:36 chs Exp $ */
/* $NetBSD: if_tlp_pci.c,v 1.128 2020/07/02 09:07:10 msaitoh Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2002 The NetBSD Foundation, Inc.
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_tlp_pci.c,v 1.127 2019/11/10 21:16:36 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_tlp_pci.c,v 1.128 2020/07/02 09:07:10 msaitoh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -647,7 +647,7 @@ tlp_pci_attach(device_t parent, device_t self, void *aux)
KASSERT(prop_object_type(ea) == PROP_TYPE_DATA);
KASSERT(prop_data_size(ea) == ETHER_ADDR_LEN);
memcpy(enaddr, prop_data_data_nocopy(ea),
memcpy(enaddr, prop_data_value(ea),
ETHER_ADDR_LEN);
sc->sc_srom_addrbits = 6;
@ -935,7 +935,7 @@ tlp_pci_attach(device_t parent, device_t self, void *aux)
if (eaddrprop != NULL
&& prop_data_size(eaddrprop) == ETHER_ADDR_LEN)
memcpy(enaddr,
prop_data_data_nocopy(eaddrprop),
prop_data_value(eaddrprop),
ETHER_ADDR_LEN);
else
memcpy(enaddr, &sc->sc_srom[20],