Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Don't use MFI_PD_LIST_SIZE. Same as OpenBSD. No f...
details: https://anonhg.NetBSD.org/src/rev/7a2200b0d917
branches: trunk
changeset: 366052:7a2200b0d917
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Thu May 12 11:56:29 2022 +0000
description:
Don't use MFI_PD_LIST_SIZE. Same as OpenBSD. No functional change.
diffstat:
sys/dev/ic/mfi.c | 12 ++++++------
sys/dev/ic/mfireg.h | 3 +--
2 files changed, 7 insertions(+), 8 deletions(-)
diffs (61 lines):
diff -r 78e531a18947 -r 7a2200b0d917 sys/dev/ic/mfi.c
--- a/sys/dev/ic/mfi.c Thu May 12 00:28:01 2022 +0000
+++ b/sys/dev/ic/mfi.c Thu May 12 11:56:29 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mfi.c,v 1.75 2022/05/10 14:13:37 msaitoh Exp $ */
+/* $NetBSD: mfi.c,v 1.76 2022/05/12 11:56:29 msaitoh Exp $ */
/* $OpenBSD: mfi.c,v 1.66 2006/11/28 23:59:45 dlg Exp $ */
/*
@@ -73,7 +73,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.75 2022/05/10 14:13:37 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.76 2022/05/12 11:56:29 msaitoh Exp $");
#include "bio.h"
@@ -2316,10 +2316,10 @@
if (bb->bb_channel == 0)
return EINVAL;
- pd = malloc(MFI_PD_LIST_SIZE, M_DEVBUF, M_WAITOK);
+ pd = malloc(sizeof(*pd), M_DEVBUF, M_WAITOK);
if (mfi_mgmt_internal(sc, MR_DCMD_PD_GET_LIST, MFI_DATA_IN,
- MFI_PD_LIST_SIZE, pd, NULL, false))
+ sizeof(*pd), pd, NULL, false))
goto done;
for (i = 0, found = 0; i < pd->mpl_no_pd; i++)
@@ -2371,10 +2371,10 @@
DNPRINTF(MFI_D_IOCTL, "%s: mfi_ioctl_setstate %x\n", DEVNAME(sc),
bs->bs_status);
- pd = malloc(MFI_PD_LIST_SIZE, M_DEVBUF, M_WAITOK);
+ pd = malloc(sizeof(*pd), M_DEVBUF, M_WAITOK);
if (mfi_mgmt_internal(sc, MR_DCMD_PD_GET_LIST, MFI_DATA_IN,
- MFI_PD_LIST_SIZE, pd, NULL, false))
+ sizeof(*pd), pd, NULL, false))
goto done;
for (i = 0, found = 0; i < pd->mpl_no_pd; i++)
diff -r 78e531a18947 -r 7a2200b0d917 sys/dev/ic/mfireg.h
--- a/sys/dev/ic/mfireg.h Thu May 12 00:28:01 2022 +0000
+++ b/sys/dev/ic/mfireg.h Thu May 12 11:56:29 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mfireg.h,v 1.18 2022/05/11 15:30:33 msaitoh Exp $ */
+/* $NetBSD: mfireg.h,v 1.19 2022/05/12 11:56:29 msaitoh Exp $ */
/* $OpenBSD: mfireg.h,v 1.24 2006/06/19 19:05:45 marco Exp $ */
/*
* Copyright (c) 2006 Marco Peereboom <marco%peereboom.us@localhost>
@@ -1083,7 +1083,6 @@
uint32_t mpl_no_pd;
struct mfi_pd_address mpl_address[MFI_MAX_PD];
} __packed;
-#define MFI_PD_LIST_SIZE (sizeof(struct mfi_pd_list))
struct mfi_pd {
uint16_t mfp_id;
Home |
Main Index |
Thread Index |
Old Index