Module Name: src Committed By: skrll Date: Mon Oct 21 06:47:10 UTC 2024
Modified Files: src/sys/arch/mips/mips: bus_dma.c Log Message: Use KASSERT instead if #ifdef DIAGNOSTIC + panic To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/arch/mips/mips/bus_dma.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/mips/mips/bus_dma.c diff -u src/sys/arch/mips/mips/bus_dma.c:1.48 src/sys/arch/mips/mips/bus_dma.c:1.49 --- src/sys/arch/mips/mips/bus_dma.c:1.48 Tue Jun 4 20:43:58 2024 +++ src/sys/arch/mips/mips/bus_dma.c Mon Oct 21 06:47:10 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.48 2024/06/04 20:43:58 riastradh Exp $ */ +/* $NetBSD: bus_dma.c,v 1.49 2024/10/21 06:47:10 skrll Exp $ */ /*- * Copyright (c) 1997, 1998, 2001, 2020 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.48 2024/06/04 20:43:58 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.49 2024/10/21 06:47:10 skrll Exp $"); #define _MIPS_BUS_DMA_PRIVATE @@ -541,10 +541,7 @@ _bus_dmamap_load_mbuf(bus_dma_tag_t t, b map->dm_nsegs = 0; KASSERT(map->dm_maxsegsz <= map->_dm_maxmaxsegsz); -#ifdef DIAGNOSTIC - if ((m0->m_flags & M_PKTHDR) == 0) - panic("_bus_dmamap_load_mbuf: no packet header"); -#endif + KASSERT(m0->m_flags & M_PKTHDR); if (m0->m_pkthdr.len > map->_dm_size) return EINVAL;