summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorjdolecek <jdolecek@NetBSD.org>2018-10-14 17:37:40 +0000
committerjdolecek <jdolecek@NetBSD.org>2018-10-14 17:37:40 +0000
commit1df1fda95b3fbbe5d2a49a1fcd1bfefbaeba6508 (patch)
treed3b8a07267c11ccace1f91a11ac42924d928e87e /sys/dev
parent27499c264f7ca51323ac65fa859a9287025ca4d4 (diff)
remove M_CANFAIL flag for malloc(9) - it was completely ignored, so had
actually no effect
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ata/TODO.ncq2
-rw-r--r--sys/dev/pci/mpii.c14
-rw-r--r--sys/dev/sdmmc/sbt.c6
-rw-r--r--sys/dev/sdmmc/sdmmc_io.c9
4 files changed, 14 insertions, 17 deletions
diff --git a/sys/dev/ata/TODO.ncq b/sys/dev/ata/TODO.ncq
index dfd4a18a411..c6583b7551e 100644
--- a/sys/dev/ata/TODO.ncq
+++ b/sys/dev/ata/TODO.ncq
@@ -36,5 +36,3 @@ mvsata - move pci-specific code to the pci attach code
mvsata(4) 64-bit DMA
- at least with AHA1430SA does not really work, crash in mvsata_intr() on boot
-
-malloc(M_CANFAIL) actually doesn't do anything
diff --git a/sys/dev/pci/mpii.c b/sys/dev/pci/mpii.c
index 02b874b4c0b..c16f1918235 100644
--- a/sys/dev/pci/mpii.c
+++ b/sys/dev/pci/mpii.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mpii.c,v 1.11 2018/01/15 12:58:06 maya Exp $ */
+/* $NetBSD: mpii.c,v 1.12 2018/10/14 17:37:40 jdolecek Exp $ */
/* OpenBSD: mpii.c,v 1.51 2012/04/11 13:29:14 naddy Exp */
/*
* Copyright (c) 2010 Mike Belopuhov <mkb@crypt.org.ru>
@@ -20,7 +20,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.11 2018/01/15 12:58:06 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.12 2018/10/14 17:37:40 jdolecek Exp $");
#include "bio.h"
@@ -4905,7 +4905,7 @@ mpii_ioctl_cache(struct scsi_link *link, u_long cmd, struct dk_cache *dc)
return (EINVAL);
pagelen = hdr.page_length * 4;
- vpg = malloc(pagelen, M_TEMP, M_WAITOK | M_CANFAIL | M_ZERO);
+ vpg = malloc(pagelen, M_TEMP, M_WAITOK | M_ZERO);
if (vpg == NULL)
return (ENOMEM);
@@ -5131,7 +5131,7 @@ mpii_ioctl_vol(struct mpii_softc *sc, struct bioc_vol *bv)
}
pagelen = hdr.page_length * 4;
- vpg = malloc(pagelen, M_TEMP, M_WAITOK | M_CANFAIL | M_ZERO);
+ vpg = malloc(pagelen, M_TEMP, M_WAITOK | M_ZERO);
if (vpg == NULL) {
printf("%s: unable to allocate space for raid "
"volume page 0\n", DEVNAME(sc));
@@ -5236,7 +5236,7 @@ mpii_ioctl_disk(struct mpii_softc *sc, struct bioc_disk *bd)
}
pagelen = hdr.page_length * 4;
- vpg = malloc(pagelen, M_TEMP, M_WAITOK | M_CANFAIL | M_ZERO);
+ vpg = malloc(pagelen, M_TEMP, M_WAITOK | M_ZERO);
if (vpg == NULL) {
printf("%s: unable to allocate space for raid "
"volume page 0\n", DEVNAME(sc));
@@ -5293,7 +5293,7 @@ mpii_bio_hs(struct mpii_softc *sc, struct bioc_disk *bd, int nvdsk,
}
pagelen = le16toh(ehdr.ext_page_length) * 4;
- cpg = malloc(pagelen, M_TEMP, M_WAITOK | M_CANFAIL | M_ZERO);
+ cpg = malloc(pagelen, M_TEMP, M_WAITOK | M_ZERO);
if (cpg == NULL) {
printf("%s: unable to allocate space for raid config page 0\n",
DEVNAME(sc));
@@ -5348,7 +5348,7 @@ mpii_bio_disk(struct mpii_softc *sc, struct bioc_disk *bd, u_int8_t dn)
DNPRINTF(MPII_D_IOCTL, "%s: mpii_bio_disk %d\n", DEVNAME(sc),
bd->bd_diskid);
- ppg = malloc(sizeof(*ppg), M_TEMP, M_WAITOK | M_CANFAIL | M_ZERO);
+ ppg = malloc(sizeof(*ppg), M_TEMP, M_WAITOK | M_ZERO);
if (ppg == NULL) {
printf("%s: unable to allocate space for raid physical disk "
"page 0\n", DEVNAME(sc));
diff --git a/sys/dev/sdmmc/sbt.c b/sys/dev/sdmmc/sbt.c
index d20f39eb5cb..0879d7c79e6 100644
--- a/sys/dev/sdmmc/sbt.c
+++ b/sys/dev/sdmmc/sbt.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sbt.c,v 1.6 2018/04/18 14:56:35 maxv Exp $ */
+/* $NetBSD: sbt.c,v 1.7 2018/10/14 17:37:40 jdolecek Exp $ */
/* $OpenBSD: sbt.c,v 1.9 2007/06/19 07:59:57 uwe Exp $ */
/*
@@ -20,7 +20,7 @@
/* Driver for Type-A/B SDIO Bluetooth cards */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sbt.c,v 1.6 2018/04/18 14:56:35 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sbt.c,v 1.7 2018/10/14 17:37:40 jdolecek Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -182,7 +182,7 @@ sbt_attach(device_t parent, device_t self, void *aux)
/* It may be Type-B, but we use it only in Type-A mode. */
printf("%s: SDIO Bluetooth Type-A\n", DEVNAME(sc));
- sc->sc_buf = malloc(SBT_PKT_BUFSIZ, M_DEVBUF, M_NOWAIT | M_CANFAIL);
+ sc->sc_buf = malloc(SBT_PKT_BUFSIZ, M_DEVBUF, M_NOWAIT);
if (sc->sc_buf == NULL) {
aprint_error("%s: can't allocate cmd buffer\n", DEVNAME(sc));
return;
diff --git a/sys/dev/sdmmc/sdmmc_io.c b/sys/dev/sdmmc/sdmmc_io.c
index 9f57eda6d12..160d9b09ff4 100644
--- a/sys/dev/sdmmc/sdmmc_io.c
+++ b/sys/dev/sdmmc/sdmmc_io.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sdmmc_io.c,v 1.13 2017/10/23 13:47:17 jmcneill Exp $ */
+/* $NetBSD: sdmmc_io.c,v 1.14 2018/10/14 17:37:40 jdolecek Exp $ */
/* $OpenBSD: sdmmc_io.c,v 1.10 2007/09/17 01:33:33 krw Exp $ */
/*
@@ -20,7 +20,7 @@
/* Routines for SD I/O cards. */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sdmmc_io.c,v 1.13 2017/10/23 13:47:17 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdmmc_io.c,v 1.14 2018/10/14 17:37:40 jdolecek Exp $");
#ifdef _KERNEL_OPT
#include "opt_sdmmc.h"
@@ -636,12 +636,11 @@ sdmmc_intr_establish(device_t dev, int (*fun)(void *), void *arg,
if (sc->sc_sct->card_enable_intr == NULL)
return NULL;
- ih = malloc(sizeof *ih, M_DEVBUF, M_WAITOK|M_CANFAIL|M_ZERO);
+ ih = malloc(sizeof *ih, M_DEVBUF, M_WAITOK|M_ZERO);
if (ih == NULL)
return NULL;
- ih->ih_name = malloc(strlen(name) + 1, M_DEVBUF,
- M_WAITOK|M_CANFAIL|M_ZERO);
+ ih->ih_name = malloc(strlen(name) + 1, M_DEVBUF, M_WAITOK|M_ZERO);
if (ih->ih_name == NULL) {
free(ih, M_DEVBUF);
return NULL;