Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ata use PR_ZERO
details: https://anonhg.NetBSD.org/src/rev/3b6fcee3acda
branches: trunk
changeset: 451492:3b6fcee3acda
user: christos <christos%NetBSD.org@localhost>
date: Sat May 25 16:30:18 2019 +0000
description:
use PR_ZERO
diffstat:
sys/dev/ata/ata.c | 17 ++++-------------
1 files changed, 4 insertions(+), 13 deletions(-)
diffs (38 lines):
diff -r 63e23c8082d4 -r 3b6fcee3acda sys/dev/ata/ata.c
--- a/sys/dev/ata/ata.c Sat May 25 15:18:52 2019 +0000
+++ b/sys/dev/ata/ata.c Sat May 25 16:30:18 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ata.c,v 1.148 2019/04/06 00:35:25 uwe Exp $ */
+/* $NetBSD: ata.c,v 1.149 2019/05/25 16:30:18 christos Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved.
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.148 2019/04/06 00:35:25 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.149 2019/05/25 16:30:18 christos Exp $");
#include "opt_ata.h"
@@ -1278,17 +1278,8 @@
struct ata_xfer *
ata_get_xfer(struct ata_channel *chp, bool waitok)
{
- struct ata_xfer *xfer;
-
- xfer = pool_get(&ata_xfer_pool, waitok ? PR_WAITOK : PR_NOWAIT);
- KASSERT(!waitok || xfer != NULL);
-
- if (xfer != NULL) {
- /* zero everything */
- memset(xfer, 0, sizeof(*xfer));
- }
-
- return xfer;
+ return pool_get(&ata_xfer_pool,
+ PR_ZERO | (waitok ? PR_WAITOK : PR_NOWAIT));
}
/*
Home |
Main Index |
Thread Index |
Old Index