Use prop_data_value (not prop_data_data_nocopy)

This commit is contained in:
skrll 2020-06-28 12:43:00 +00:00
parent 46d55c55e7
commit 047b7c3fb5
2 changed files with 6 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: omap3_dss.c,v 1.1 2019/10/31 17:08:54 jmcneill Exp $ */
/* $NetBSD: omap3_dss.c,v 1.2 2020/06/28 12:43:00 skrll Exp $ */
/*
* Copyright (c) 2010 Michael Lorenz
@ -33,7 +33,7 @@
#include "opt_wsdisplay_compat.h"
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: omap3_dss.c,v 1.1 2019/10/31 17:08:54 jmcneill Exp $");
__KERNEL_RCSID(0, "$NetBSD: omap3_dss.c,v 1.2 2020/06/28 12:43:00 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -262,8 +262,7 @@ omapfb_attach(device_t parent, device_t self, void *aux)
sc->sc_edid_size = uimin(prop_data_size(edid_data), 1024);
memset(sc->sc_edid_data, 0, sizeof(sc->sc_edid_data));
memcpy(sc->sc_edid_data, prop_data_data_nocopy(edid_data),
sc->sc_edid_size);
memcpy(sc->sc_edid_data, prop_data_value(edid_data), sc->sc_edid_size);
edid_parse(sc->sc_edid_data, &ei);
edid_print(&ei);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_cemac.c,v 1.22 2020/01/29 05:54:29 thorpej Exp $ */
/* $NetBSD: if_cemac.c,v 1.23 2020/06/28 12:43:00 skrll Exp $ */
/*
* Copyright (c) 2015 Genetec Corporation. All rights reserved.
@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_cemac.c,v 1.22 2020/01/29 05:54:29 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_cemac.c,v 1.23 2020/06/28 12:43:00 skrll Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -210,7 +210,7 @@ cemac_attach_common(device_t self, bus_space_tag_t iot,
if (enaddr != NULL) {
KASSERT(prop_object_type(enaddr) == PROP_TYPE_DATA);
KASSERT(prop_data_size(enaddr) == ETHER_ADDR_LEN);
memcpy(sc->sc_enaddr, prop_data_data_nocopy(enaddr),
memcpy(sc->sc_enaddr, prop_data_value(enaddr),
ETHER_ADDR_LEN);
} else {
static const uint8_t hardcoded[ETHER_ADDR_LEN] = {