Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Remove unused ext_flags field in struct _m_ext_storage.
details: https://anonhg.NetBSD.org/src/rev/d586c9f00028
branches: trunk
changeset: 361389:d586c9f00028
user: maxv <maxv%NetBSD.org@localhost>
date: Fri Apr 27 16:32:03 2018 +0000
description:
Remove unused ext_flags field in struct _m_ext_storage.
Also, simplify MEXTMALLOC, mbtypes[] doesn't exist anymore, but the code
still compiled correctly because "malloc" is a macro and the argument
was dropped.
diffstat:
sys/kern/uipc_mbuf.c | 5 ++---
sys/sys/mbuf.h | 8 ++------
2 files changed, 4 insertions(+), 9 deletions(-)
diffs (67 lines):
diff -r 68683658c94b -r d586c9f00028 sys/kern/uipc_mbuf.c
--- a/sys/kern/uipc_mbuf.c Fri Apr 27 16:18:40 2018 +0000
+++ b/sys/kern/uipc_mbuf.c Fri Apr 27 16:32:03 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_mbuf.c,v 1.207 2018/04/27 16:18:40 maxv Exp $ */
+/* $NetBSD: uipc_mbuf.c,v 1.208 2018/04/27 16:32:03 maxv Exp $ */
/*
* Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.207 2018/04/27 16:18:40 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.208 2018/04/27 16:32:03 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_mbuftrace.h"
@@ -588,7 +588,6 @@
m->m_data = m->m_ext.ext_buf;
m->m_flags = (m->m_flags & ~M_EXTCOPYFLAGS) |
M_EXT|M_EXT_CLUSTER|M_EXT_RW;
- m->m_ext.ext_flags = 0;
m->m_ext.ext_size = MCLBYTES;
m->m_ext.ext_free = NULL;
m->m_ext.ext_arg = NULL;
diff -r 68683658c94b -r d586c9f00028 sys/sys/mbuf.h
--- a/sys/sys/mbuf.h Fri Apr 27 16:18:40 2018 +0000
+++ b/sys/sys/mbuf.h Fri Apr 27 16:32:03 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mbuf.h,v 1.196 2018/04/27 09:22:28 maxv Exp $ */
+/* $NetBSD: mbuf.h,v 1.197 2018/04/27 16:32:03 maxv Exp $ */
/*
* Copyright (c) 1996, 1997, 1999, 2001, 2007 The NetBSD Foundation, Inc.
@@ -259,7 +259,6 @@
*/
struct _m_ext_storage {
unsigned int ext_refcnt;
- int ext_flags;
char *ext_buf; /* start of buffer */
void (*ext_free) /* free routine if not the usual */
(struct mbuf *, void *, size_t, void *);
@@ -511,14 +510,12 @@
#define MEXTMALLOC(m, size, how) \
do { \
- (m)->m_ext_storage.ext_buf = (char *) \
- malloc((size), mbtypes[(m)->m_type], (how)); \
+ (m)->m_ext_storage.ext_buf = malloc((size), 0, (how)); \
if ((m)->m_ext_storage.ext_buf != NULL) { \
MCLINITREFERENCE(m); \
(m)->m_data = (m)->m_ext.ext_buf; \
(m)->m_flags = ((m)->m_flags & ~M_EXTCOPYFLAGS) | \
M_EXT|M_EXT_RW; \
- (m)->m_ext.ext_flags = 0; \
(m)->m_ext.ext_size = (size); \
(m)->m_ext.ext_free = NULL; \
(m)->m_ext.ext_arg = NULL; \
@@ -531,7 +528,6 @@
MCLINITREFERENCE(m); \
(m)->m_data = (m)->m_ext.ext_buf = (char *)(buf); \
(m)->m_flags = ((m)->m_flags & ~M_EXTCOPYFLAGS) | M_EXT; \
- (m)->m_ext.ext_flags = 0; \
(m)->m_ext.ext_size = (size); \
(m)->m_ext.ext_free = (free); \
(m)->m_ext.ext_arg = (arg); \
Home |
Main Index |
Thread Index |
Old Index