From d745c852becf3792a2185003947324721209195a Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Mon, 7 Nov 2011 06:44:47 +0000 Subject: Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs. This means that their use is restricted to a single C file. --- sys/arm/arm/vm_machdep.c | 2 +- sys/arm/xscale/pxa/pxa_smi.c | 3 ++- sys/arm/xscale/pxa/pxa_space.c | 2 +- sys/cam/ata/ata_da.c | 2 +- sys/cam/ata/ata_pmp.c | 2 +- sys/cam/cam_periph.c | 2 +- sys/cam/cam_queue.c | 6 +++--- sys/cam/cam_sim.c | 2 +- sys/cam/scsi/scsi_cd.c | 2 +- sys/cam/scsi/scsi_ch.c | 2 +- sys/cam/scsi/scsi_da.c | 2 +- sys/cam/scsi/scsi_low.c | 2 +- sys/cam/scsi/scsi_sa.c | 2 +- sys/cam/scsi/scsi_ses.c | 2 +- sys/cam/scsi/scsi_targ_bh.c | 2 +- sys/cddl/dev/cyclic/cyclic.c | 2 +- sys/cddl/dev/fbt/fbt.c | 2 +- sys/compat/linux/linux_futex.c | 4 ++-- sys/dev/aac/aac.c | 2 +- sys/dev/aac/aac_cam.c | 2 +- sys/dev/acpi_support/acpi_wmi.c | 2 +- sys/dev/acpica/Osd/OsdInterrupt.c | 2 +- sys/dev/acpica/Osd/OsdMemory.c | 2 +- sys/dev/acpica/Osd/OsdSchedule.c | 2 +- sys/dev/acpica/Osd/OsdSynch.c | 2 +- sys/dev/acpica/acpi.c | 2 +- sys/dev/acpica/acpi_cmbat.c | 3 ++- sys/dev/acpica/acpi_pci_link.c | 2 +- sys/dev/acpica/acpi_perf.c | 2 +- sys/dev/acpica/acpi_powerres.c | 2 +- sys/dev/acpica/acpi_video.c | 2 +- sys/dev/ahci/ahci.c | 2 +- sys/dev/amr/amr.c | 2 +- sys/dev/amr/amr_cam.c | 2 +- sys/dev/ath/ah_osdep.c | 2 +- sys/dev/ath/if_ath.c | 2 +- sys/dev/ciss/ciss.c | 3 ++- sys/dev/firewire/fwmem.c | 2 +- sys/dev/firewire/if_fwe.c | 2 +- sys/dev/firewire/if_fwip.c | 2 +- sys/dev/firewire/sbp.c | 2 +- sys/dev/firewire/sbp_targ.c | 2 +- sys/dev/iicbus/ad7417.c | 2 +- sys/dev/iicbus/max6690.c | 2 +- sys/dev/iir/iir.c | 2 +- sys/dev/ipmi/ipmi.c | 2 +- sys/dev/iscsi/initiator/isc_subr.c | 2 +- sys/dev/iscsi/initiator/iscsi.c | 2 +- sys/dev/malo/if_malo.c | 2 +- sys/dev/mps/mps_sas.c | 2 +- sys/dev/mvs/mvs.c | 2 +- sys/dev/mwl/if_mwl.c | 2 +- sys/dev/nmdm/nmdm.c | 2 +- sys/dev/puc/puc.c | 2 +- sys/dev/quicc/quicc_core.c | 2 +- sys/dev/scc/scc_core.c | 2 +- sys/dev/siis/siis.c | 2 +- sys/dev/sound/pci/envy24.c | 2 +- sys/dev/sound/pci/envy24ht.c | 2 +- sys/dev/sound/pci/spicds.c | 2 +- sys/dev/sound/pcm/ac97.c | 2 +- sys/dev/sound/pcm/feeder.c | 2 +- sys/dev/sound/pcm/mixer.c | 2 +- sys/dev/tdfx/tdfx_pci.c | 2 +- sys/dev/twa/tw_osl_freebsd.c | 2 +- sys/dev/twe/twe_freebsd.c | 2 +- sys/dev/uart/uart_core.c | 2 +- sys/dev/xen/balloon/balloon.c | 2 +- sys/dev/xen/blkback/blkback.c | 2 +- sys/dev/xen/blkfront/blkfront.c | 2 +- sys/fs/ntfs/ntfs_subr.c | 10 ++++++---- sys/fs/smbfs/smbfs_node.c | 2 +- sys/fs/udf/udf_vnops.c | 4 ++-- sys/geom/uzip/g_uzip.c | 2 +- sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c | 2 +- sys/ia64/ia64/mca.c | 2 +- sys/ia64/ia64/sapic.c | 2 +- sys/ia64/ia64/sscdisk.c | 2 +- sys/ia64/ia64/unwind.c | 2 +- sys/kern/kern_dtrace.c | 2 +- sys/kern/kern_fail.c | 2 +- sys/kern/kern_jail.c | 2 +- sys/kern/kern_lockf.c | 2 +- sys/kern/kern_rctl.c | 2 +- sys/kern/kern_timeout.c | 2 +- sys/kern/subr_pcpu.c | 2 +- sys/kern/subr_witness.c | 2 +- sys/kern/vfs_mount.c | 2 +- sys/libkern/iconv.c | 2 +- sys/net/if.c | 4 ++-- sys/net/if_arcsubr.c | 2 +- sys/net/if_atmsubr.c | 2 +- sys/net/if_ethersubr.c | 2 +- sys/net/if_fwsubr.c | 2 +- sys/net/if_iso88025subr.c | 2 +- sys/net/if_spppsubr.c | 2 +- sys/net/vnet.c | 7 ++++--- sys/net80211/ieee80211_acl.c | 2 +- sys/net80211/ieee80211_dfs.c | 2 +- sys/net80211/ieee80211_freebsd.c | 2 +- sys/net80211/ieee80211_power.c | 2 +- sys/netgraph/atm/ngatmbase.c | 4 ++-- sys/netgraph/atm/uni/ng_uni.c | 4 ++-- sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c | 2 +- sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c | 2 +- sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c | 4 ++-- sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c | 2 +- sys/netgraph/bluetooth/socket/ng_btsocket_sco.c | 2 +- sys/netgraph/ng_async.c | 2 +- sys/netgraph/ng_base.c | 9 ++++++--- sys/netgraph/ng_bpf.c | 2 +- sys/netgraph/ng_bridge.c | 3 ++- sys/netgraph/ng_deflate.c | 3 ++- sys/netgraph/ng_gif_demux.c | 2 +- sys/netgraph/ng_hub.c | 2 +- sys/netgraph/ng_iface.c | 2 +- sys/netgraph/ng_ksocket.c | 3 ++- sys/netgraph/ng_l2tp.c | 2 +- sys/netgraph/ng_mppc.c | 2 +- sys/netgraph/ng_parse.c | 2 +- sys/netgraph/ng_ppp.c | 2 +- sys/netgraph/ng_pppoe.c | 2 +- sys/netgraph/ng_pred1.c | 2 +- sys/netgraph/ng_sample.c | 2 +- sys/netgraph/ng_socket.c | 4 ++-- sys/netgraph/ng_sppp.c | 2 +- sys/netgraph/ng_tag.c | 2 +- sys/netinet/igmp.c | 2 +- sys/netinet/ipfw/dn_heap.c | 2 +- sys/netinet/ipfw/ip_fw_table.c | 2 +- sys/netinet/libalias/alias_sctp.c | 2 +- sys/netinet6/mld6.c | 2 +- sys/netinet6/send.c | 2 +- sys/netipx/spx_reass.c | 2 +- sys/netsmb/smb_conn.c | 2 +- sys/netsmb/smb_rq.c | 2 +- sys/netsmb/smb_subr.c | 4 ++-- sys/nfs/nfs_lock.c | 5 +++-- sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c | 2 +- sys/ofed/include/linux/linux_idr.c | 2 +- sys/ofed/include/linux/linux_radix.c | 2 +- sys/powerpc/ofw/ofw_real.c | 3 ++- sys/powerpc/ofw/rtas.c | 2 +- sys/powerpc/powermac/dbdma.c | 2 +- sys/powerpc/powermac/fcu.c | 2 +- sys/powerpc/powermac/powermac_thermal.c | 2 +- sys/powerpc/powermac/smu.c | 2 +- sys/powerpc/powermac/smusat.c | 2 +- sys/powerpc/powerpc/intr_machdep.c | 2 +- sys/security/mac_bsdextended/mac_bsdextended.c | 3 ++- sys/security/mac_lomac/mac_lomac.c | 2 +- sys/security/mac_portacl/mac_portacl.c | 2 +- sys/sparc64/sparc64/iommu.c | 2 +- sys/x86/acpica/acpi_apm.c | 2 +- sys/x86/acpica/madt.c | 2 +- 155 files changed, 188 insertions(+), 173 deletions(-) diff --git a/sys/arm/arm/vm_machdep.c b/sys/arm/arm/vm_machdep.c index 3ff111c1fc8c..1f31e3d056f5 100644 --- a/sys/arm/arm/vm_machdep.c +++ b/sys/arm/arm/vm_machdep.c @@ -526,7 +526,7 @@ extern uma_zone_t l2zone; struct mtx smallalloc_mtx; -MALLOC_DEFINE(M_VMSMALLALLOC, "vm_small_alloc", "VM Small alloc data"); +static MALLOC_DEFINE(M_VMSMALLALLOC, "vm_small_alloc", "VM Small alloc data"); vm_offset_t alloc_firstaddr; diff --git a/sys/arm/xscale/pxa/pxa_smi.c b/sys/arm/xscale/pxa/pxa_smi.c index b2b904c01253..f25dac771234 100644 --- a/sys/arm/xscale/pxa/pxa_smi.c +++ b/sys/arm/xscale/pxa/pxa_smi.c @@ -42,7 +42,8 @@ __FBSDID("$FreeBSD$"); #include #include -MALLOC_DEFINE(M_PXASMI, "PXA SMI", "Data for static memory interface devices."); +static MALLOC_DEFINE(M_PXASMI, "PXA SMI", + "Data for static memory interface devices."); struct pxa_smi_softc { struct resource *ps_res[1]; diff --git a/sys/arm/xscale/pxa/pxa_space.c b/sys/arm/xscale/pxa/pxa_space.c index 342e23a4a79f..f728e1d52009 100644 --- a/sys/arm/xscale/pxa/pxa_space.c +++ b/sys/arm/xscale/pxa/pxa_space.c @@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include -MALLOC_DEFINE(M_PXATAG, "PXA bus_space tags", "Bus_space tags for PXA"); +static MALLOC_DEFINE(M_PXATAG, "PXA bus_space tags", "Bus_space tags for PXA"); /* Prototypes for all the bus_space structure functions */ bs_protos(generic); diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c index b1d5ea83eb57..7b1898a46f45 100644 --- a/sys/cam/ata/ata_da.c +++ b/sys/cam/ata/ata_da.c @@ -378,7 +378,7 @@ static struct periph_driver adadriver = PERIPHDRIVER_DECLARE(ada, adadriver); -MALLOC_DEFINE(M_ATADA, "ata_da", "ata_da buffers"); +static MALLOC_DEFINE(M_ATADA, "ata_da", "ata_da buffers"); static int adaopen(struct disk *dp) diff --git a/sys/cam/ata/ata_pmp.c b/sys/cam/ata/ata_pmp.c index 91b918665078..c85098c7e00d 100644 --- a/sys/cam/ata/ata_pmp.c +++ b/sys/cam/ata/ata_pmp.c @@ -147,7 +147,7 @@ static struct periph_driver pmpdriver = PERIPHDRIVER_DECLARE(pmp, pmpdriver); -MALLOC_DEFINE(M_ATPMP, "ata_pmp", "ata_pmp buffers"); +static MALLOC_DEFINE(M_ATPMP, "ata_pmp", "ata_pmp buffers"); static void pmpinit(void) diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c index 80dba392183d..3854b5c03360 100644 --- a/sys/cam/cam_periph.c +++ b/sys/cam/cam_periph.c @@ -87,7 +87,7 @@ static int nperiph_drivers; static int initialized = 0; struct periph_driver **periph_drivers; -MALLOC_DEFINE(M_CAMPERIPH, "CAM periph", "CAM peripheral buffers"); +static MALLOC_DEFINE(M_CAMPERIPH, "CAM periph", "CAM peripheral buffers"); static int periph_selto_delay = 1000; TUNABLE_INT("kern.cam.periph_selto_delay", &periph_selto_delay); diff --git a/sys/cam/cam_queue.c b/sys/cam/cam_queue.c index 328f0b802a75..d6d953dbedb1 100644 --- a/sys/cam/cam_queue.c +++ b/sys/cam/cam_queue.c @@ -40,9 +40,9 @@ __FBSDID("$FreeBSD$"); #include #include -MALLOC_DEFINE(M_CAMQ, "CAM queue", "CAM queue buffers"); -MALLOC_DEFINE(M_CAMDEVQ, "CAM dev queue", "CAM dev queue buffers"); -MALLOC_DEFINE(M_CAMCCBQ, "CAM ccb queue", "CAM ccb queue buffers"); +static MALLOC_DEFINE(M_CAMQ, "CAM queue", "CAM queue buffers"); +static MALLOC_DEFINE(M_CAMDEVQ, "CAM dev queue", "CAM dev queue buffers"); +static MALLOC_DEFINE(M_CAMCCBQ, "CAM ccb queue", "CAM ccb queue buffers"); static __inline int queue_cmp(cam_pinfo **queue_array, int i, int j); diff --git a/sys/cam/cam_sim.c b/sys/cam/cam_sim.c index 59148a9a4267..d6ac740a6d56 100644 --- a/sys/cam/cam_sim.c +++ b/sys/cam/cam_sim.c @@ -43,7 +43,7 @@ __FBSDID("$FreeBSD$"); #define CAM_PATH_ANY (u_int32_t)-1 -MALLOC_DEFINE(M_CAMSIM, "CAM SIM", "CAM SIM buffers"); +static MALLOC_DEFINE(M_CAMSIM, "CAM SIM", "CAM SIM buffers"); struct cam_devq * cam_simq_alloc(u_int32_t max_sim_transactions) diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c index 53d352e14f34..a058cfbb1561 100644 --- a/sys/cam/scsi/scsi_cd.c +++ b/sys/cam/scsi/scsi_cd.c @@ -336,7 +336,7 @@ static struct mtx changerq_mtx; static STAILQ_HEAD(changerlist, cdchanger) changerq; static int num_changers; -MALLOC_DEFINE(M_SCSICD, "scsi_cd", "scsi_cd buffers"); +static MALLOC_DEFINE(M_SCSICD, "scsi_cd", "scsi_cd buffers"); static void cdinit(void) diff --git a/sys/cam/scsi/scsi_ch.c b/sys/cam/scsi/scsi_ch.c index 4d33cd9d32b8..8b04b4ffc140 100644 --- a/sys/cam/scsi/scsi_ch.c +++ b/sys/cam/scsi/scsi_ch.c @@ -218,7 +218,7 @@ static struct cdevsw ch_cdevsw = { .d_name = "ch", }; -MALLOC_DEFINE(M_SCSICH, "scsi_ch", "scsi_ch buffers"); +static MALLOC_DEFINE(M_SCSICH, "scsi_ch", "scsi_ch buffers"); static void chinit(void) diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index ab46cf60a808..10781fa36484 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -642,7 +642,7 @@ static struct periph_driver dadriver = PERIPHDRIVER_DECLARE(da, dadriver); -MALLOC_DEFINE(M_SCSIDA, "scsi_da", "scsi_da buffers"); +static MALLOC_DEFINE(M_SCSIDA, "scsi_da", "scsi_da buffers"); static int daopen(struct disk *dp) diff --git a/sys/cam/scsi/scsi_low.c b/sys/cam/scsi/scsi_low.c index 60253cd22ad5..ec101ffc74eb 100644 --- a/sys/cam/scsi/scsi_low.c +++ b/sys/cam/scsi/scsi_low.c @@ -145,7 +145,7 @@ __FBSDID("$FreeBSD$"); #define SCSI_LOW_DISK_LFLAGS 0x0000ffff #define SCSI_LOW_DISK_TFLAGS 0xffff0000 -MALLOC_DEFINE(M_SCSILOW, "SCSI low", "SCSI low buffers"); +static MALLOC_DEFINE(M_SCSILOW, "SCSI low", "SCSI low buffers"); /************************************************************** * Declarations diff --git a/sys/cam/scsi/scsi_sa.c b/sys/cam/scsi/scsi_sa.c index 9a504b5dd0c9..4999109036bc 100644 --- a/sys/cam/scsi/scsi_sa.c +++ b/sys/cam/scsi/scsi_sa.c @@ -102,7 +102,7 @@ __FBSDID("$FreeBSD$"); * Driver states */ -MALLOC_DEFINE(M_SCSISA, "SCSI sa", "SCSI sequential access buffers"); +static MALLOC_DEFINE(M_SCSISA, "SCSI sa", "SCSI sequential access buffers"); typedef enum { SA_STATE_NORMAL, SA_STATE_ABNORMAL diff --git a/sys/cam/scsi/scsi_ses.c b/sys/cam/scsi/scsi_ses.c index 2275654c141e..3f6848031b30 100644 --- a/sys/cam/scsi/scsi_ses.c +++ b/sys/cam/scsi/scsi_ses.c @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); #include -MALLOC_DEFINE(M_SCSISES, "SCSI SES", "SCSI SES buffers"); +static MALLOC_DEFINE(M_SCSISES, "SCSI SES", "SCSI SES buffers"); /* * Platform Independent Driver Internal Definitions for SES devices. diff --git a/sys/cam/scsi/scsi_targ_bh.c b/sys/cam/scsi/scsi_targ_bh.c index d5887a1c88f2..7f3715761f98 100644 --- a/sys/cam/scsi/scsi_targ_bh.c +++ b/sys/cam/scsi/scsi_targ_bh.c @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include -MALLOC_DEFINE(M_SCSIBH, "SCSI bh", "SCSI blackhole buffers"); +static MALLOC_DEFINE(M_SCSIBH, "SCSI bh", "SCSI blackhole buffers"); typedef enum { TARGBH_STATE_NORMAL, diff --git a/sys/cddl/dev/cyclic/cyclic.c b/sys/cddl/dev/cyclic/cyclic.c index e7b7f50f1917..efb0687a44e3 100644 --- a/sys/cddl/dev/cyclic/cyclic.c +++ b/sys/cddl/dev/cyclic/cyclic.c @@ -339,7 +339,7 @@ static kmem_cache_t *cyclic_id_cache; static cyc_id_t *cyclic_id_head; static cyc_backend_t cyclic_backend; -MALLOC_DEFINE(M_CYCLIC, "cyclic", "Cyclic timer subsystem"); +static MALLOC_DEFINE(M_CYCLIC, "cyclic", "Cyclic timer subsystem"); static __inline hrtime_t cyc_gethrtime(void) diff --git a/sys/cddl/dev/fbt/fbt.c b/sys/cddl/dev/fbt/fbt.c index f3ddc83e1140..be15d6e57f76 100644 --- a/sys/cddl/dev/fbt/fbt.c +++ b/sys/cddl/dev/fbt/fbt.c @@ -61,7 +61,7 @@ #include #include -MALLOC_DEFINE(M_FBT, "fbt", "Function Boundary Tracing"); +static MALLOC_DEFINE(M_FBT, "fbt", "Function Boundary Tracing"); #define FBT_PUSHL_EBP 0x55 #define FBT_MOVL_ESP_EBP0_V0 0x8b diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_futex.c index 736bd28bf121..44d68f4260e2 100644 --- a/sys/compat/linux/linux_futex.c +++ b/sys/compat/linux/linux_futex.c @@ -65,8 +65,8 @@ __KERNEL_RCSID(1, "$NetBSD: linux_futex.c,v 1.7 2006/07/24 19:01:49 manu Exp $") #include #include -MALLOC_DEFINE(M_FUTEX, "futex", "Linux futexes"); -MALLOC_DEFINE(M_FUTEX_WP, "futex wp", "Linux futexes wp"); +static MALLOC_DEFINE(M_FUTEX, "futex", "Linux futexes"); +static MALLOC_DEFINE(M_FUTEX_WP, "futex wp", "Linux futexes wp"); struct futex; diff --git a/sys/dev/aac/aac.c b/sys/dev/aac/aac.c index 45cfa023430c..ace8b13be458 100644 --- a/sys/dev/aac/aac.c +++ b/sys/dev/aac/aac.c @@ -219,7 +219,7 @@ static struct cdevsw aac_cdevsw = { .d_name = "aac", }; -MALLOC_DEFINE(M_AACBUF, "aacbuf", "Buffers for the AAC driver"); +static MALLOC_DEFINE(M_AACBUF, "aacbuf", "Buffers for the AAC driver"); /* sysctl node */ SYSCTL_NODE(_hw, OID_AUTO, aac, CTLFLAG_RD, 0, "AAC driver parameters"); diff --git a/sys/dev/aac/aac_cam.c b/sys/dev/aac/aac_cam.c index b5c3b2662b09..2fafa97602a2 100644 --- a/sys/dev/aac/aac_cam.c +++ b/sys/dev/aac/aac_cam.c @@ -104,7 +104,7 @@ static driver_t aac_pass_driver = { DRIVER_MODULE(aacp, aac, aac_pass_driver, aac_pass_devclass, 0, 0); MODULE_DEPEND(aacp, cam, 1, 1, 1); -MALLOC_DEFINE(M_AACCAM, "aaccam", "AAC CAM info"); +static MALLOC_DEFINE(M_AACCAM, "aaccam", "AAC CAM info"); static void aac_cam_rescan(struct aac_softc *sc, uint32_t channel, uint32_t target_id) diff --git a/sys/dev/acpi_support/acpi_wmi.c b/sys/dev/acpi_support/acpi_wmi.c index 5b95cc926cbd..2acc262af90e 100644 --- a/sys/dev/acpi_support/acpi_wmi.c +++ b/sys/dev/acpi_support/acpi_wmi.c @@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include "acpi_wmi_if.h" -MALLOC_DEFINE(M_ACPIWMI, "acpiwmi", "ACPI-WMI mapping"); +static MALLOC_DEFINE(M_ACPIWMI, "acpiwmi", "ACPI-WMI mapping"); #define _COMPONENT ACPI_OEM ACPI_MODULE_NAME("ACPI_WMI"); diff --git a/sys/dev/acpica/Osd/OsdInterrupt.c b/sys/dev/acpica/Osd/OsdInterrupt.c index 0ca2b55f8c02..3fb1e70685df 100644 --- a/sys/dev/acpica/Osd/OsdInterrupt.c +++ b/sys/dev/acpica/Osd/OsdInterrupt.c @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); #define _COMPONENT ACPI_OS_SERVICES ACPI_MODULE_NAME("INTERRUPT") -MALLOC_DEFINE(M_ACPIINTR, "acpiintr", "ACPI interrupt"); +static MALLOC_DEFINE(M_ACPIINTR, "acpiintr", "ACPI interrupt"); struct acpi_intr { SLIST_ENTRY(acpi_intr) ai_link; diff --git a/sys/dev/acpica/Osd/OsdMemory.c b/sys/dev/acpica/Osd/OsdMemory.c index 4b7eca293c31..615c4b54408a 100644 --- a/sys/dev/acpica/Osd/OsdMemory.c +++ b/sys/dev/acpica/Osd/OsdMemory.c @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include -MALLOC_DEFINE(M_ACPICA, "acpica", "ACPI CA memory pool"); +static MALLOC_DEFINE(M_ACPICA, "acpica", "ACPI CA memory pool"); void * AcpiOsAllocate(ACPI_SIZE Size) diff --git a/sys/dev/acpica/Osd/OsdSchedule.c b/sys/dev/acpica/Osd/OsdSchedule.c index 32d49bcd6f8a..fd1b9310dd9f 100644 --- a/sys/dev/acpica/Osd/OsdSchedule.c +++ b/sys/dev/acpica/Osd/OsdSchedule.c @@ -65,7 +65,7 @@ TUNABLE_INT("debug.acpi.max_tasks", &acpi_max_tasks); static int acpi_max_threads = ACPI_MAX_THREADS; TUNABLE_INT("debug.acpi.max_threads", &acpi_max_threads); -MALLOC_DEFINE(M_ACPITASK, "acpitask", "ACPI deferred task"); +static MALLOC_DEFINE(M_ACPITASK, "acpitask", "ACPI deferred task"); struct acpi_task_ctx { struct task at_task; diff --git a/sys/dev/acpica/Osd/OsdSynch.c b/sys/dev/acpica/Osd/OsdSynch.c index 5e2e777a1393..84e331c18061 100644 --- a/sys/dev/acpica/Osd/OsdSynch.c +++ b/sys/dev/acpica/Osd/OsdSynch.c @@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$"); #define _COMPONENT ACPI_OS_SERVICES ACPI_MODULE_NAME("SYNCH") -MALLOC_DEFINE(M_ACPISEM, "acpisem", "ACPI semaphore"); +static MALLOC_DEFINE(M_ACPISEM, "acpisem", "ACPI semaphore"); /* * Convert milliseconds to ticks. diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 5047e61ed135..bff74fba9333 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -68,7 +68,7 @@ __FBSDID("$FreeBSD$"); #include -MALLOC_DEFINE(M_ACPIDEV, "acpidev", "ACPI devices"); +static MALLOC_DEFINE(M_ACPIDEV, "acpidev", "ACPI devices"); /* Hooks for the ACPI CA debugging infrastructure */ #define _COMPONENT ACPI_BUS diff --git a/sys/dev/acpica/acpi_cmbat.c b/sys/dev/acpica/acpi_cmbat.c index 6c6525d3eb43..ba44da8dd509 100644 --- a/sys/dev/acpica/acpi_cmbat.c +++ b/sys/dev/acpica/acpi_cmbat.c @@ -46,7 +46,8 @@ __FBSDID("$FreeBSD$"); #include #include -MALLOC_DEFINE(M_ACPICMBAT, "acpicmbat", "ACPI control method battery data"); +static MALLOC_DEFINE(M_ACPICMBAT, "acpicmbat", + "ACPI control method battery data"); /* Number of times to retry initialization before giving up. */ #define ACPI_CMBAT_RETRY_MAX 6 diff --git a/sys/dev/acpica/acpi_pci_link.c b/sys/dev/acpica/acpi_pci_link.c index d5d2d82d3ec5..ba03d7276a95 100644 --- a/sys/dev/acpica/acpi_pci_link.c +++ b/sys/dev/acpica/acpi_pci_link.c @@ -120,7 +120,7 @@ struct link_res_request { int link_index; }; -MALLOC_DEFINE(M_PCI_LINK, "pci_link", "ACPI PCI Link structures"); +static MALLOC_DEFINE(M_PCI_LINK, "pci_link", "ACPI PCI Link structures"); static int pci_link_interrupt_weights[NUM_ACPI_INTERRUPTS]; static int pci_link_bios_isa_irqs; diff --git a/sys/dev/acpica/acpi_perf.c b/sys/dev/acpica/acpi_perf.c index 31b1c630d3ea..3f047cce6b85 100644 --- a/sys/dev/acpica/acpi_perf.c +++ b/sys/dev/acpica/acpi_perf.c @@ -135,7 +135,7 @@ static devclass_t acpi_perf_devclass; DRIVER_MODULE(acpi_perf, cpu, acpi_perf_driver, acpi_perf_devclass, 0, 0); MODULE_DEPEND(acpi_perf, acpi, 1, 1, 1); -MALLOC_DEFINE(M_ACPIPERF, "acpi_perf", "ACPI Performance states"); +static MALLOC_DEFINE(M_ACPIPERF, "acpi_perf", "ACPI Performance states"); static void acpi_perf_identify(driver_t *driver, device_t parent) diff --git a/sys/dev/acpica/acpi_powerres.c b/sys/dev/acpica/acpi_powerres.c index 9c43c880ad9b..b661594c104b 100644 --- a/sys/dev/acpica/acpi_powerres.c +++ b/sys/dev/acpica/acpi_powerres.c @@ -55,7 +55,7 @@ __FBSDID("$FreeBSD$"); * on, turned off, etc. */ -MALLOC_DEFINE(M_ACPIPWR, "acpipwr", "ACPI power resources"); +static MALLOC_DEFINE(M_ACPIPWR, "acpipwr", "ACPI power resources"); /* Hooks for the ACPI CA debugging infrastructure */ #define _COMPONENT ACPI_POWERRES diff --git a/sys/dev/acpica/acpi_video.c b/sys/dev/acpica/acpi_video.c index f8133aaa9179..eac2d07204ba 100644 --- a/sys/dev/acpica/acpi_video.c +++ b/sys/dev/acpica/acpi_video.c @@ -183,7 +183,7 @@ static struct acpi_video_output_queue crt_units, tv_units, */ ACPI_SERIAL_DECL(video, "ACPI video"); ACPI_SERIAL_DECL(video_output, "ACPI video output"); -MALLOC_DEFINE(M_ACPIVIDEO, "acpivideo", "ACPI video extension"); +static MALLOC_DEFINE(M_ACPIVIDEO, "acpivideo", "ACPI video extension"); static int acpi_video_modevent(struct module *mod __unused, int evt, void *cookie __unused) diff --git a/sys/dev/ahci/ahci.c b/sys/dev/ahci/ahci.c index 0a20f2c6418b..35447ca7729d 100644 --- a/sys/dev/ahci/ahci.c +++ b/sys/dev/ahci/ahci.c @@ -101,7 +101,7 @@ static void ahci_process_request_sense(device_t dev, union ccb *ccb); static void ahciaction(struct cam_sim *sim, union ccb *ccb); static void ahcipoll(struct cam_sim *sim); -MALLOC_DEFINE(M_AHCI, "AHCI driver", "AHCI driver data buffers"); +static MALLOC_DEFINE(M_AHCI, "AHCI driver", "AHCI driver data buffers"); static struct { uint32_t id; diff --git a/sys/dev/amr/amr.c b/sys/dev/amr/amr.c index 5ccf9b8a1a5b..4cb42e262735 100644 --- a/sys/dev/amr/amr.c +++ b/sys/dev/amr/amr.c @@ -175,7 +175,7 @@ static void amr_init_sysctl(struct amr_softc *sc); static int amr_linux_ioctl_int(struct cdev *dev, u_long cmd, caddr_t addr, int32_t flag, struct thread *td); -MALLOC_DEFINE(M_AMR, "amr", "AMR memory"); +static MALLOC_DEFINE(M_AMR, "amr", "AMR memory"); /******************************************************************************** ******************************************************************************** diff --git a/sys/dev/amr/amr_cam.c b/sys/dev/amr/amr_cam.c index bcd036e4e203..d03ac6d80867 100644 --- a/sys/dev/amr/amr_cam.c +++ b/sys/dev/amr/amr_cam.c @@ -109,7 +109,7 @@ static driver_t amr_pass_driver = { DRIVER_MODULE(amrp, amr, amr_pass_driver, amr_pass_devclass, 0, 0); MODULE_DEPEND(amrp, cam, 1, 1, 1); -MALLOC_DEFINE(M_AMRCAM, "amrcam", "AMR CAM memory"); +static MALLOC_DEFINE(M_AMRCAM, "amrcam", "AMR CAM memory"); /*********************************************************************** * Enqueue/dequeue functions diff --git a/sys/dev/ath/ah_osdep.c b/sys/dev/ath/ah_osdep.c index 54dfb731af95..01f1b87b114f 100644 --- a/sys/dev/ath/ah_osdep.c +++ b/sys/dev/ath/ah_osdep.c @@ -85,7 +85,7 @@ SYSCTL_INT(_hw_ath_hal, OID_AUTO, debug, CTLFLAG_RW, &ath_hal_debug, TUNABLE_INT("hw.ath.hal.debug", &ath_hal_debug); #endif /* AH_DEBUG */ -MALLOC_DEFINE(M_ATH_HAL, "ath_hal", "ath hal data"); +static MALLOC_DEFINE(M_ATH_HAL, "ath_hal", "ath hal data"); void* ath_hal_malloc(size_t size) diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index 0bd0e179c3d2..d2fcff80c52b 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -263,7 +263,7 @@ static int ath_bstuck_threshold = 4; /* max missed beacons */ SYSCTL_INT(_hw_ath, OID_AUTO, bstuck, CTLFLAG_RW, &ath_bstuck_threshold, 0, "max missed beacon xmits before chip reset"); -MALLOC_DEFINE(M_ATHDEV, "athdev", "ath driver dma buffers"); +static MALLOC_DEFINE(M_ATHDEV, "athdev", "ath driver dma buffers"); #define HAL_MODE_HT20 (HAL_MODE_11NG_HT20 | HAL_MODE_11NA_HT20) #define HAL_MODE_HT40 \ diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c index 016d5f3d7997..b530de13d385 100644 --- a/sys/dev/ciss/ciss.c +++ b/sys/dev/ciss/ciss.c @@ -105,7 +105,8 @@ #include #include -MALLOC_DEFINE(CISS_MALLOC_CLASS, "ciss_data", "ciss internal data buffers"); +static MALLOC_DEFINE(CISS_MALLOC_CLASS, "ciss_data", + "ciss internal data buffers"); /* pci interface */ static int ciss_lookup(device_t dev); diff --git a/sys/dev/firewire/fwmem.c b/sys/dev/firewire/fwmem.c index 179968221d81..b38a1494223a 100644 --- a/sys/dev/firewire/fwmem.c +++ b/sys/dev/firewire/fwmem.c @@ -84,7 +84,7 @@ SYSCTL_INT(_hw_firewire_fwmem, OID_AUTO, speed, CTLFLAG_RW, &fwmem_speed, 0, SYSCTL_INT(_debug, OID_AUTO, fwmem_debug, CTLFLAG_RW, &fwmem_debug, 0, "Fwmem driver debug flag"); -MALLOC_DEFINE(M_FWMEM, "fwmem", "fwmem/FireWire"); +static MALLOC_DEFINE(M_FWMEM, "fwmem", "fwmem/FireWire"); #define MAXLEN (512 << fwmem_speed) diff --git a/sys/dev/firewire/if_fwe.c b/sys/dev/firewire/if_fwe.c index 62616cfcf667..24043253eb16 100644 --- a/sys/dev/firewire/if_fwe.c +++ b/sys/dev/firewire/if_fwe.c @@ -86,7 +86,7 @@ static int stream_ch = 1; static int tx_speed = 2; static int rx_queue_len = FWMAXQUEUE; -MALLOC_DEFINE(M_FWE, "if_fwe", "Ethernet over FireWire interface"); +static MALLOC_DEFINE(M_FWE, "if_fwe", "Ethernet over FireWire interface"); SYSCTL_INT(_debug, OID_AUTO, if_fwe_debug, CTLFLAG_RW, &fwedebug, 0, ""); SYSCTL_DECL(_hw_firewire); SYSCTL_NODE(_hw_firewire, OID_AUTO, fwe, CTLFLAG_RD, 0, diff --git a/sys/dev/firewire/if_fwip.c b/sys/dev/firewire/if_fwip.c index 66cdb4aba11d..5a489a51b9d5 100644 --- a/sys/dev/firewire/if_fwip.c +++ b/sys/dev/firewire/if_fwip.c @@ -99,7 +99,7 @@ static int broadcast_channel = 0xc0 | 0x1f; /* tag | channel(XXX) */ static int tx_speed = 2; static int rx_queue_len = FWMAXQUEUE; -MALLOC_DEFINE(M_FWIP, "if_fwip", "IP over FireWire interface"); +static MALLOC_DEFINE(M_FWIP, "if_fwip", "IP over FireWire interface"); SYSCTL_INT(_debug, OID_AUTO, if_fwip_debug, CTLFLAG_RW, &fwipdebug, 0, ""); SYSCTL_DECL(_hw_firewire); SYSCTL_NODE(_hw_firewire, OID_AUTO, fwip, CTLFLAG_RD, 0, diff --git a/sys/dev/firewire/sbp.c b/sys/dev/firewire/sbp.c index 2387bf944991..c36111ad8b60 100644 --- a/sys/dev/firewire/sbp.c +++ b/sys/dev/firewire/sbp.c @@ -276,7 +276,7 @@ static void sbp_mgm_timeout (void *arg); static void sbp_timeout (void *arg); static void sbp_mgm_orb (struct sbp_dev *, int, struct sbp_ocb *); -MALLOC_DEFINE(M_SBP, "sbp", "SBP-II/FireWire"); +static MALLOC_DEFINE(M_SBP, "sbp", "SBP-II/FireWire"); /* cam related functions */ static void sbp_action(struct cam_sim *sim, union ccb *ccb); diff --git a/sys/dev/firewire/sbp_targ.c b/sys/dev/firewire/sbp_targ.c index f04b968b9a18..9be31bc4cc79 100644 --- a/sys/dev/firewire/sbp_targ.c +++ b/sys/dev/firewire/sbp_targ.c @@ -95,7 +95,7 @@ #define F_HOLD (1 << 3) #define F_FREEZED (1 << 4) -MALLOC_DEFINE(M_SBP_TARG, "sbp_targ", "SBP-II/FireWire target mode"); +static MALLOC_DEFINE(M_SBP_TARG, "sbp_targ", "SBP-II/FireWire target mode"); static int debug = 0; diff --git a/sys/dev/iicbus/ad7417.c b/sys/dev/iicbus/ad7417.c index 6ae16be64e33..acd2d8929cb5 100644 --- a/sys/dev/iicbus/ad7417.c +++ b/sys/dev/iicbus/ad7417.c @@ -121,7 +121,7 @@ static driver_t ad7417_driver = { static devclass_t ad7417_devclass; DRIVER_MODULE(ad7417, iicbus, ad7417_driver, ad7417_devclass, 0, 0); -MALLOC_DEFINE(M_AD7417, "ad7417", "Supply-Monitor AD7417"); +static MALLOC_DEFINE(M_AD7417, "ad7417", "Supply-Monitor AD7417"); static int diff --git a/sys/dev/iicbus/max6690.c b/sys/dev/iicbus/max6690.c index 83f3b5047a46..ab312e730635 100644 --- a/sys/dev/iicbus/max6690.c +++ b/sys/dev/iicbus/max6690.c @@ -101,7 +101,7 @@ static driver_t max6690_driver = { static devclass_t max6690_devclass; DRIVER_MODULE(max6690, iicbus, max6690_driver, max6690_devclass, 0, 0); -MALLOC_DEFINE(M_MAX6690, "max6690", "Temp-Monitor MAX6690"); +static MALLOC_DEFINE(M_MAX6690, "max6690", "Temp-Monitor MAX6690"); static int max6690_read(device_t dev, uint32_t addr, uint8_t reg, uint8_t *data) diff --git a/sys/dev/iir/iir.c b/sys/dev/iir/iir.c index 2be7c39e87fc..057194a71b5a 100644 --- a/sys/dev/iir/iir.c +++ b/sys/dev/iir/iir.c @@ -69,7 +69,7 @@ __FBSDID("$FreeBSD$"); #include -MALLOC_DEFINE(M_GDTBUF, "iirbuf", "iir driver buffer"); +static MALLOC_DEFINE(M_GDTBUF, "iirbuf", "iir driver buffer"); struct gdt_softc *gdt_wait_gdt; int gdt_wait_index; diff --git a/sys/dev/ipmi/ipmi.c b/sys/dev/ipmi/ipmi.c index 74a7d03646a5..8def02b30965 100644 --- a/sys/dev/ipmi/ipmi.c +++ b/sys/dev/ipmi/ipmi.c @@ -75,7 +75,7 @@ static struct cdevsw ipmi_cdevsw = { .d_name = "ipmi", }; -MALLOC_DEFINE(M_IPMI, "ipmi", "ipmi"); +static MALLOC_DEFINE(M_IPMI, "ipmi", "ipmi"); static int ipmi_open(struct cdev *cdev, int flags, int fmt, struct thread *td) diff --git a/sys/dev/iscsi/initiator/isc_subr.c b/sys/dev/iscsi/initiator/isc_subr.c index 7a8138b93720..4d75a87d7de7 100644 --- a/sys/dev/iscsi/initiator/isc_subr.c +++ b/sys/dev/iscsi/initiator/isc_subr.c @@ -58,7 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include -MALLOC_DEFINE(M_ISC, "iSC", "iSCSI driver options"); +static MALLOC_DEFINE(M_ISC, "iSC", "iSCSI driver options"); static char * i_strdupin(char *s, size_t maxlen) diff --git a/sys/dev/iscsi/initiator/iscsi.c b/sys/dev/iscsi/initiator/iscsi.c index 292ce8f21fa0..4c06b9852592 100644 --- a/sys/dev/iscsi/initiator/iscsi.c +++ b/sys/dev/iscsi/initiator/iscsi.c @@ -66,7 +66,7 @@ static struct isc_softc *isc; MALLOC_DEFINE(M_ISCSI, "iSCSI", "iSCSI driver"); MALLOC_DEFINE(M_ISCSIBUF, "iSCbuf", "iSCSI buffers"); -MALLOC_DEFINE(M_TMP, "iSCtmp", "iSCSI tmp"); +static MALLOC_DEFINE(M_TMP, "iSCtmp", "iSCSI tmp"); #ifdef ISCSI_INITIATOR_DEBUG int iscsi_debug = ISCSI_INITIATOR_DEBUG; diff --git a/sys/dev/malo/if_malo.c b/sys/dev/malo/if_malo.c index ae6ef8826521..6a7a786fdaa5 100644 --- a/sys/dev/malo/if_malo.c +++ b/sys/dev/malo/if_malo.c @@ -123,7 +123,7 @@ enum { } while (0) #endif -MALLOC_DEFINE(M_MALODEV, "malodev", "malo driver dma buffers"); +static MALLOC_DEFINE(M_MALODEV, "malodev", "malo driver dma buffers"); static struct ieee80211vap *malo_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, int opmode, int flags, diff --git a/sys/dev/mps/mps_sas.c b/sys/dev/mps/mps_sas.c index 28ddca161880..cf4757a1a4ee 100644 --- a/sys/dev/mps/mps_sas.c +++ b/sys/dev/mps/mps_sas.c @@ -119,7 +119,7 @@ struct mpssas_devprobe { #define MPSSAS_DISCOVERY_TIMEOUT 20 #define MPSSAS_MAX_DISCOVERY_TIMEOUTS 10 /* 200 seconds */ -MALLOC_DEFINE(M_MPSSAS, "MPSSAS", "MPS SAS memory"); +static MALLOC_DEFINE(M_MPSSAS, "MPSSAS", "MPS SAS memory"); static __inline int mpssas_set_lun(uint8_t *lun, u_int ccblun); static struct mpssas_target * mpssas_alloc_target(struct mpssas_softc *, diff --git a/sys/dev/mvs/mvs.c b/sys/dev/mvs/mvs.c index 54808c51b585..e128616e7038 100644 --- a/sys/dev/mvs/mvs.c +++ b/sys/dev/mvs/mvs.c @@ -94,7 +94,7 @@ static void mvs_process_request_sense(device_t dev, union ccb *ccb); static void mvsaction(struct cam_sim *sim, union ccb *ccb); static void mvspoll(struct cam_sim *sim); -MALLOC_DEFINE(M_MVS, "MVS driver", "MVS driver data buffers"); +static MALLOC_DEFINE(M_MVS, "MVS driver", "MVS driver data buffers"); #define recovery_type spriv_field0 #define RECOVERY_NONE 0 diff --git a/sys/dev/mwl/if_mwl.c b/sys/dev/mwl/if_mwl.c index 662f201c195e..5af96ba9d3a6 100644 --- a/sys/dev/mwl/if_mwl.c +++ b/sys/dev/mwl/if_mwl.c @@ -262,7 +262,7 @@ static void mwl_printtxbuf(const struct mwl_txbuf *bf, u_int qnum, u_int ix); } while (0) #endif -MALLOC_DEFINE(M_MWLDEV, "mwldev", "mwl driver dma buffers"); +static MALLOC_DEFINE(M_MWLDEV, "mwldev", "mwl driver dma buffers"); /* * Each packet has fixed front matter: a 2-byte length diff --git a/sys/dev/nmdm/nmdm.c b/sys/dev/nmdm/nmdm.c index 2476eb26e287..ceee762d277f 100644 --- a/sys/dev/nmdm/nmdm.c +++ b/sys/dev/nmdm/nmdm.c @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include -MALLOC_DEFINE(M_NMDM, "nullmodem", "nullmodem data structures"); +static MALLOC_DEFINE(M_NMDM, "nullmodem", "nullmodem data structures"); static tsw_inwakeup_t nmdm_outwakeup; static tsw_outwakeup_t nmdm_inwakeup; diff --git a/sys/dev/puc/puc.c b/sys/dev/puc/puc.c index 9bb3ceb16498..7b933061bfa2 100644 --- a/sys/dev/puc/puc.c +++ b/sys/dev/puc/puc.c @@ -68,7 +68,7 @@ struct puc_port { devclass_t puc_devclass; const char puc_driver_name[] = "puc"; -MALLOC_DEFINE(M_PUC, "PUC", "PUC driver"); +static MALLOC_DEFINE(M_PUC, "PUC", "PUC driver"); struct puc_bar * puc_get_bar(struct puc_softc *sc, int rid) diff --git a/sys/dev/quicc/quicc_core.c b/sys/dev/quicc/quicc_core.c index 21cfdb355d93..532bb8e3dfe2 100644 --- a/sys/dev/quicc/quicc_core.c +++ b/sys/dev/quicc/quicc_core.c @@ -61,7 +61,7 @@ __FBSDID("$FreeBSD$"); devclass_t quicc_devclass; char quicc_driver_name[] = "quicc"; -MALLOC_DEFINE(M_QUICC, "QUICC", "QUICC driver"); +static MALLOC_DEFINE(M_QUICC, "QUICC", "QUICC driver"); struct quicc_device { struct rman *qd_rman; diff --git a/sys/dev/scc/scc_core.c b/sys/dev/scc/scc_core.c index 76388ad1ae38..4e12244a9361 100644 --- a/sys/dev/scc/scc_core.c +++ b/sys/dev/scc/scc_core.c @@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$"); devclass_t scc_devclass; char scc_driver_name[] = "scc"; -MALLOC_DEFINE(M_SCC, "SCC", "SCC driver"); +static MALLOC_DEFINE(M_SCC, "SCC", "SCC driver"); static int scc_bfe_intr(void *arg) diff --git a/sys/dev/siis/siis.c b/sys/dev/siis/siis.c index a7b018a43214..97b2489ba2f7 100644 --- a/sys/dev/siis/siis.c +++ b/sys/dev/siis/siis.c @@ -91,7 +91,7 @@ static void siis_process_request_sense(device_t dev, union ccb *ccb); static void siisaction(struct cam_sim *sim, union ccb *ccb); static void siispoll(struct cam_sim *sim); -MALLOC_DEFINE(M_SIIS, "SIIS driver", "SIIS driver data buffers"); +static MALLOC_DEFINE(M_SIIS, "SIIS driver", "SIIS driver data buffers"); static struct { uint32_t id; diff --git a/sys/dev/sound/pci/envy24.c b/sys/dev/sound/pci/envy24.c index 57a8ed64f77e..1c59765e723e 100644 --- a/sys/dev/sound/pci/envy24.c +++ b/sys/dev/sound/pci/envy24.c @@ -41,7 +41,7 @@ SND_DECLARE_FILE("$FreeBSD$"); -MALLOC_DEFINE(M_ENVY24, "envy24", "envy24 audio"); +static MALLOC_DEFINE(M_ENVY24, "envy24", "envy24 audio"); /* -------------------------------------------------------------------- */ diff --git a/sys/dev/sound/pci/envy24ht.c b/sys/dev/sound/pci/envy24ht.c index 0358625115c5..25d2e3faddb9 100644 --- a/sys/dev/sound/pci/envy24ht.c +++ b/sys/dev/sound/pci/envy24ht.c @@ -53,7 +53,7 @@ SND_DECLARE_FILE("$FreeBSD$"); -MALLOC_DEFINE(M_ENVY24HT, "envy24ht", "envy24ht audio"); +static MALLOC_DEFINE(M_ENVY24HT, "envy24ht", "envy24ht audio"); /* -------------------------------------------------------------------- */ diff --git a/sys/dev/sound/pci/spicds.c b/sys/dev/sound/pci/spicds.c index 3a4002c81b37..3e1df4c479bc 100644 --- a/sys/dev/sound/pci/spicds.c +++ b/sys/dev/sound/pci/spicds.c @@ -35,7 +35,7 @@ #include -MALLOC_DEFINE(M_SPICDS, "spicds", "SPI codec"); +static MALLOC_DEFINE(M_SPICDS, "spicds", "SPI codec"); #define SPICDS_NAMELEN 16 struct spicds_info { diff --git a/sys/dev/sound/pcm/ac97.c b/sys/dev/sound/pcm/ac97.c index ad164d613fc5..bc36948c9fe9 100644 --- a/sys/dev/sound/pcm/ac97.c +++ b/sys/dev/sound/pcm/ac97.c @@ -38,7 +38,7 @@ SND_DECLARE_FILE("$FreeBSD$"); -MALLOC_DEFINE(M_AC97, "ac97", "ac97 codec"); +static MALLOC_DEFINE(M_AC97, "ac97", "ac97 codec"); struct ac97mixtable_entry { int reg; /* register index */ diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c index 916b2d9fb1c8..720f6763147b 100644 --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -35,7 +35,7 @@ SND_DECLARE_FILE("$FreeBSD$"); -MALLOC_DEFINE(M_FEEDER, "feeder", "pcm feeder"); +static MALLOC_DEFINE(M_FEEDER, "feeder", "pcm feeder"); #define MAXFEEDERS 256 #undef FEEDER_DEBUG diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index 4c60c50d5c5d..58b9326703b0 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -37,7 +37,7 @@ SND_DECLARE_FILE("$FreeBSD$"); -MALLOC_DEFINE(M_MIXER, "mixer", "mixer"); +static MALLOC_DEFINE(M_MIXER, "mixer", "mixer"); static int mixer_bypass = 1; TUNABLE_INT("hw.snd.vpc_mixer_bypass", &mixer_bypass); diff --git a/sys/dev/tdfx/tdfx_pci.c b/sys/dev/tdfx/tdfx_pci.c index 27308a9bc002..0992e5fbd796 100644 --- a/sys/dev/tdfx/tdfx_pci.c +++ b/sys/dev/tdfx/tdfx_pci.c @@ -89,7 +89,7 @@ static device_method_t tdfx_methods[] = { { 0, 0 } }; -MALLOC_DEFINE(M_TDFX,"tdfx_driver","3DFX Graphics[/2D]/3D Accelerator(s)"); +static MALLOC_DEFINE(M_TDFX,"tdfx_driver","3DFX Graphics[/2D]/3D Accelerators"); /* Char. Dev. file operations structure */ static struct cdevsw tdfx_cdev = { diff --git a/sys/dev/twa/tw_osl_freebsd.c b/sys/dev/twa/tw_osl_freebsd.c index caf18f1f77b4..5651b7fc6e69 100644 --- a/sys/dev/twa/tw_osl_freebsd.c +++ b/sys/dev/twa/tw_osl_freebsd.c @@ -54,7 +54,7 @@ TW_INT32 TW_DEBUG_LEVEL_FOR_OSL = TW_OSL_DEBUG; TW_INT32 TW_OSL_DEBUG_LEVEL_FOR_CL = TW_OSL_DEBUG; #endif /* TW_OSL_DEBUG */ -MALLOC_DEFINE(TW_OSLI_MALLOC_CLASS, "twa_commands", "twa commands"); +static MALLOC_DEFINE(TW_OSLI_MALLOC_CLASS, "twa_commands", "twa commands"); static d_open_t twa_open; diff --git a/sys/dev/twe/twe_freebsd.c b/sys/dev/twe/twe_freebsd.c index 0328599c1293..a7b9c9141318 100644 --- a/sys/dev/twe/twe_freebsd.c +++ b/sys/dev/twe/twe_freebsd.c @@ -872,7 +872,7 @@ twed_detach(device_t dev) /******************************************************************************** * Allocate a command buffer */ -MALLOC_DEFINE(TWE_MALLOC_CLASS, "twe_commands", "twe commands"); +static MALLOC_DEFINE(TWE_MALLOC_CLASS, "twe_commands", "twe commands"); struct twe_request * twe_allocate_request(struct twe_softc *sc, int tag) diff --git a/sys/dev/uart/uart_core.c b/sys/dev/uart/uart_core.c index 9260d063b990..fb1bb6433040 100644 --- a/sys/dev/uart/uart_core.c +++ b/sys/dev/uart/uart_core.c @@ -56,7 +56,7 @@ char uart_driver_name[] = "uart"; SLIST_HEAD(uart_devinfo_list, uart_devinfo) uart_sysdevs = SLIST_HEAD_INITIALIZER(uart_sysdevs); -MALLOC_DEFINE(M_UART, "UART", "UART driver"); +static MALLOC_DEFINE(M_UART, "UART", "UART driver"); void uart_add_sysdev(struct uart_devinfo *di) diff --git a/sys/dev/xen/balloon/balloon.c b/sys/dev/xen/balloon/balloon.c index ca941b619734..123e4d84c72c 100644 --- a/sys/dev/xen/balloon/balloon.c +++ b/sys/dev/xen/balloon/balloon.c @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include -MALLOC_DEFINE(M_BALLOON, "Balloon", "Xen Balloon Driver"); +static MALLOC_DEFINE(M_BALLOON, "Balloon", "Xen Balloon Driver"); struct mtx balloon_mutex; diff --git a/sys/dev/xen/blkback/blkback.c b/sys/dev/xen/blkback/blkback.c index e52c34234b9d..c42bfd9b88d4 100644 --- a/sys/dev/xen/blkback/blkback.c +++ b/sys/dev/xen/blkback/blkback.c @@ -121,7 +121,7 @@ __FBSDID("$FreeBSD$"); /** * Custom malloc type for all driver allocations. */ -MALLOC_DEFINE(M_XENBLOCKBACK, "xbbd", "Xen Block Back Driver Data"); +static MALLOC_DEFINE(M_XENBLOCKBACK, "xbbd", "Xen Block Back Driver Data"); #ifdef XBB_DEBUG #define DPRINTF(fmt, args...) \ diff --git a/sys/dev/xen/blkfront/blkfront.c b/sys/dev/xen/blkfront/blkfront.c index fb530f3f13f3..954cf1f58a15 100644 --- a/sys/dev/xen/blkfront/blkfront.c +++ b/sys/dev/xen/blkfront/blkfront.c @@ -81,7 +81,7 @@ static int blkif_completion(struct xb_command *); static void blkif_free(struct xb_softc *); static void blkif_queue_cb(void *, bus_dma_segment_t *, int, int); -MALLOC_DEFINE(M_XENBLOCKFRONT, "xbd", "Xen Block Front driver data"); +static MALLOC_DEFINE(M_XENBLOCKFRONT, "xbd", "Xen Block Front driver data"); #define GRANT_INVALID_REF 0 diff --git a/sys/fs/ntfs/ntfs_subr.c b/sys/fs/ntfs/ntfs_subr.c index a6c3b85fa242..f5071d7754e8 100644 --- a/sys/fs/ntfs/ntfs_subr.c +++ b/sys/fs/ntfs/ntfs_subr.c @@ -51,10 +51,12 @@ #include #include -MALLOC_DEFINE(M_NTFSNTVATTR, "ntfs_vattr", "NTFS file attribute information"); -MALLOC_DEFINE(M_NTFSRDATA, "ntfsd_resdata", "NTFS resident data"); -MALLOC_DEFINE(M_NTFSRUN, "ntfs_vrun", "NTFS vrun storage"); -MALLOC_DEFINE(M_NTFSDECOMP, "ntfs_decomp", "NTFS decompression temporary"); +static MALLOC_DEFINE(M_NTFSNTVATTR, "ntfs_vattr", + "NTFS file attribute information"); +static MALLOC_DEFINE(M_NTFSRDATA, "ntfsd_resdata", "NTFS resident data"); +static MALLOC_DEFINE(M_NTFSRUN, "ntfs_vrun", "NTFS vrun storage"); +static MALLOC_DEFINE(M_NTFSDECOMP, "ntfs_decomp", + "NTFS decompression temporary"); static int ntfs_ntlookupattr(struct ntfsmount *, const char *, int, int *, char **); static int ntfs_findvattr(struct ntfsmount *, struct ntnode *, struct ntvattr **, struct ntvattr **, u_int32_t, const char *, size_t, cn_t); diff --git a/sys/fs/smbfs/smbfs_node.c b/sys/fs/smbfs/smbfs_node.c index 661579cf2203..9de8eb51d6cb 100644 --- a/sys/fs/smbfs/smbfs_node.c +++ b/sys/fs/smbfs/smbfs_node.c @@ -58,7 +58,7 @@ extern struct vop_vector smbfs_vnodeops; /* XXX -> .h file */ -MALLOC_DEFINE(M_SMBNODE, "smbufs_node", "SMBFS vnode private part"); +static MALLOC_DEFINE(M_SMBNODE, "smbufs_node", "SMBFS vnode private part"); static MALLOC_DEFINE(M_SMBNODENAME, "smbufs_nname", "SMBFS node name"); int smbfs_hashprint(struct mount *mp); diff --git a/sys/fs/udf/udf_vnops.c b/sys/fs/udf/udf_vnops.c index 1c9e0aad4c4c..b8e39b33b158 100644 --- a/sys/fs/udf/udf_vnops.c +++ b/sys/fs/udf/udf_vnops.c @@ -107,8 +107,8 @@ struct vop_vector udf_fifoops = { .vop_vptofh = udf_vptofh, }; -MALLOC_DEFINE(M_UDFFID, "udf_fid", "UDF FileId structure"); -MALLOC_DEFINE(M_UDFDS, "udf_ds", "UDF Dirstream structure"); +static MALLOC_DEFINE(M_UDFFID, "udf_fid", "UDF FileId structure"); +static MALLOC_DEFINE(M_UDFDS, "udf_ds", "UDF Dirstream structure"); #define UDF_INVALID_BMAP -1 diff --git a/sys/geom/uzip/g_uzip.c b/sys/geom/uzip/g_uzip.c index c8b0dfccae4c..f19e14c60a88 100644 --- a/sys/geom/uzip/g_uzip.c +++ b/sys/geom/uzip/g_uzip.c @@ -50,7 +50,7 @@ FEATURE(geom_uzip, "GEOM uzip read-only compressed disks support"); #define DPRINTF(a) #endif -MALLOC_DEFINE(M_GEOM_UZIP, "geom_uzip", "GEOM UZIP data structures"); +static MALLOC_DEFINE(M_GEOM_UZIP, "geom_uzip", "GEOM UZIP data structures"); #define UZIP_CLASS_NAME "UZIP" diff --git a/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c b/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c index e9ccfc902761..413a524971fc 100644 --- a/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c +++ b/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c @@ -71,7 +71,7 @@ #include -MALLOC_DEFINE(M_XFSNODE, "XFS node", "XFS vnode private part"); +static MALLOC_DEFINE(M_XFSNODE, "XFS node", "XFS vnode private part"); static vfs_mount_t _xfs_mount; static vfs_unmount_t _xfs_unmount; diff --git a/sys/ia64/ia64/mca.c b/sys/ia64/ia64/mca.c index 8484d5aebb20..322c6cb6824c 100644 --- a/sys/ia64/ia64/mca.c +++ b/sys/ia64/ia64/mca.c @@ -43,7 +43,7 @@ #include #include -MALLOC_DEFINE(M_MCA, "MCA", "Machine Check Architecture"); +static MALLOC_DEFINE(M_MCA, "MCA", "Machine Check Architecture"); struct mca_info { STAILQ_ENTRY(mca_info) mi_link; diff --git a/sys/ia64/ia64/sapic.c b/sys/ia64/ia64/sapic.c index 5aa14493e779..58c342629a36 100644 --- a/sys/ia64/ia64/sapic.c +++ b/sys/ia64/ia64/sapic.c @@ -99,7 +99,7 @@ struct sapic_rte { uint64_t rte_destination_id :8; }; -MALLOC_DEFINE(M_SAPIC, "sapic", "I/O SAPIC devices"); +static MALLOC_DEFINE(M_SAPIC, "sapic", "I/O SAPIC devices"); struct sapic *ia64_sapics[16]; /* XXX make this resizable */ int ia64_sapic_count; diff --git a/sys/ia64/ia64/sscdisk.c b/sys/ia64/ia64/sscdisk.c index f9abc0abd25e..b38a73a3be9c 100644 --- a/sys/ia64/ia64/sscdisk.c +++ b/sys/ia64/ia64/sscdisk.c @@ -72,7 +72,7 @@ ssc(u_int64_t in0, u_int64_t in1, u_int64_t in2, u_int64_t in3, int which) #define SSC_NSECT 409600 #endif -MALLOC_DEFINE(M_SSC, "ssc_disk", "Simulator Disk"); +static MALLOC_DEFINE(M_SSC, "ssc_disk", "Simulator Disk"); static d_strategy_t sscstrategy; diff --git a/sys/ia64/ia64/unwind.c b/sys/ia64/ia64/unwind.c index 6343ed848e1d..7b4c6d2912ac 100644 --- a/sys/ia64/ia64/unwind.c +++ b/sys/ia64/ia64/unwind.c @@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$"); #include -MALLOC_DEFINE(M_UNWIND, "Unwind", "Unwind information"); +static MALLOC_DEFINE(M_UNWIND, "Unwind", "Unwind information"); struct unw_entry { uint64_t ue_start; /* procedure start */ diff --git a/sys/kern/kern_dtrace.c b/sys/kern/kern_dtrace.c index 2082fed442b6..5582fb967836 100644 --- a/sys/kern/kern_dtrace.c +++ b/sys/kern/kern_dtrace.c @@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$"); FEATURE(kdtrace_hooks, "Kernel DTrace hooks which are required to load DTrace kernel modules"); -MALLOC_DEFINE(M_KDTRACE, "kdtrace", "DTrace hooks"); +static MALLOC_DEFINE(M_KDTRACE, "kdtrace", "DTrace hooks"); /* Return the DTrace process data size compiled in the kernel hooks. */ size_t diff --git a/sys/kern/kern_fail.c b/sys/kern/kern_fail.c index f1924718ef55..85d81e88405b 100644 --- a/sys/kern/kern_fail.c +++ b/sys/kern/kern_fail.c @@ -69,7 +69,7 @@ __FBSDID("$FreeBSD$"); ILOG_DEFINE_FOR_FILE(L_ISI_FAIL_POINT, L_ILOG, fail_point); #endif -MALLOC_DEFINE(M_FAIL_POINT, "Fail Points", "fail points system"); +static MALLOC_DEFINE(M_FAIL_POINT, "Fail Points", "fail points system"); #define fp_free(ptr) free(ptr, M_FAIL_POINT) #define fp_malloc(size, flags) malloc((size), M_FAIL_POINT, (flags)) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 37a2c59946fe..59bae44bfaa9 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -78,7 +78,7 @@ __FBSDID("$FreeBSD$"); #define DEFAULT_HOSTUUID "00000000-0000-0000-0000-000000000000" MALLOC_DEFINE(M_PRISON, "prison", "Prison structures"); -MALLOC_DEFINE(M_PRISON_RACCT, "prison_racct", "Prison racct structures"); +static MALLOC_DEFINE(M_PRISON_RACCT, "prison_racct", "Prison racct structures"); /* Keep struct prison prison0 and some code in kern_jail_set() readable. */ #ifdef INET diff --git a/sys/kern/kern_lockf.c b/sys/kern/kern_lockf.c index ddf6846f8538..6d6dc51b80db 100644 --- a/sys/kern/kern_lockf.c +++ b/sys/kern/kern_lockf.c @@ -90,7 +90,7 @@ static int lockf_debug = 0; /* control debug output */ SYSCTL_INT(_debug, OID_AUTO, lockf_debug, CTLFLAG_RW, &lockf_debug, 0, ""); #endif -MALLOC_DEFINE(M_LOCKF, "lockf", "Byte-range locking structures"); +static MALLOC_DEFINE(M_LOCKF, "lockf", "Byte-range locking structures"); struct owner_edge; struct owner_vertex; diff --git a/sys/kern/kern_rctl.c b/sys/kern/kern_rctl.c index ad3145686390..aaea7d576e70 100644 --- a/sys/kern/kern_rctl.c +++ b/sys/kern/kern_rctl.c @@ -169,7 +169,7 @@ RW_SYSINIT(rctl_lock, &rctl_lock, "RCTL lock"); static int rctl_rule_fully_specified(const struct rctl_rule *rule); static void rctl_rule_to_sbuf(struct sbuf *sb, const struct rctl_rule *rule); -MALLOC_DEFINE(M_RCTL, "rctl", "Resource Limits"); +static MALLOC_DEFINE(M_RCTL, "rctl", "Resource Limits"); static const char * rctl_subject_type_name(int subject) diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c index b820bd913ead..5e1d4f37369f 100644 --- a/sys/kern/kern_timeout.c +++ b/sys/kern/kern_timeout.c @@ -156,7 +156,7 @@ struct callout_cpu cc_cpu; static int timeout_cpu; void (*callout_new_inserted)(int cpu, int ticks) = NULL; -MALLOC_DEFINE(M_CALLOUT, "callout", "Callout datastructures"); +static MALLOC_DEFINE(M_CALLOUT, "callout", "Callout datastructures"); /** * Locked by cc_lock: diff --git a/sys/kern/subr_pcpu.c b/sys/kern/subr_pcpu.c index ba76bb249ecb..505a4dfeff49 100644 --- a/sys/kern/subr_pcpu.c +++ b/sys/kern/subr_pcpu.c @@ -61,7 +61,7 @@ __FBSDID("$FreeBSD$"); #include #include -MALLOC_DEFINE(M_PCPU, "Per-cpu", "Per-cpu resource accouting."); +static MALLOC_DEFINE(M_PCPU, "Per-cpu", "Per-cpu resource accouting."); struct dpcpu_free { uintptr_t df_start; diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c index a4cf5a242dd0..ab0a1b3f336e 100644 --- a/sys/kern/subr_witness.c +++ b/sys/kern/subr_witness.c @@ -184,7 +184,7 @@ __FBSDID("$FreeBSD$"); #define WITNESS_INDEX_ASSERT(i) \ MPASS((i) > 0 && (i) <= w_max_used_index && (i) < WITNESS_COUNT) -MALLOC_DEFINE(M_WITNESS, "Witness", "Witness"); +static MALLOC_DEFINE(M_WITNESS, "Witness", "Witness"); /* * Lock instances. A lock instance is the data associated with a lock while diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index e8b89e58b25a..545a183c1801 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -79,7 +79,7 @@ SYSCTL_INT(_vfs, OID_AUTO, usermount, CTLFLAG_RW, &usermount, 0, "Unprivileged users may mount and unmount file systems"); MALLOC_DEFINE(M_MOUNT, "mount", "vfs mount structure"); -MALLOC_DEFINE(M_VNODE_MARKER, "vnodemarker", "vnode marker"); +static MALLOC_DEFINE(M_VNODE_MARKER, "vnodemarker", "vnode marker"); static uma_zone_t mount_zone; /* List of mounted filesystems. */ diff --git a/sys/libkern/iconv.c b/sys/libkern/iconv.c index 7700937270e2..9b46db674e55 100644 --- a/sys/libkern/iconv.c +++ b/sys/libkern/iconv.c @@ -43,7 +43,7 @@ SYSCTL_DECL(_kern_iconv); SYSCTL_NODE(_kern, OID_AUTO, iconv, CTLFLAG_RW, NULL, "kernel iconv interface"); MALLOC_DEFINE(M_ICONV, "iconv", "ICONV structures"); -MALLOC_DEFINE(M_ICONVDATA, "iconv_data", "ICONV data"); +static MALLOC_DEFINE(M_ICONVDATA, "iconv_data", "ICONV data"); MODULE_VERSION(libiconv, 2); diff --git a/sys/net/if.c b/sys/net/if.c index 2b7a24a3ce47..322759a85734 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -118,7 +118,7 @@ SYSCTL_UINT(_net, OID_AUTO, ifdescr_maxlen, CTLFLAG_RW, &ifdescr_maxlen, 0, "administrative maximum length for interface description"); -MALLOC_DEFINE(M_IFDESCR, "ifdescr", "ifnet descriptions"); +static MALLOC_DEFINE(M_IFDESCR, "ifdescr", "ifnet descriptions"); /* global sx for non-critical path ifdescr */ static struct sx ifdescr_sx; @@ -215,7 +215,7 @@ struct sx ifnet_sxlock; static if_com_alloc_t *if_com_alloc[256]; static if_com_free_t *if_com_free[256]; -MALLOC_DEFINE(M_IFNET, "ifnet", "interface internals"); +static MALLOC_DEFINE(M_IFNET, "ifnet", "interface internals"); MALLOC_DEFINE(M_IFADDR, "ifaddr", "interface address"); MALLOC_DEFINE(M_IFMADDR, "ether_multi", "link-level multicast address"); diff --git a/sys/net/if_arcsubr.c b/sys/net/if_arcsubr.c index 2a58d5afd934..03f3a1c305bc 100644 --- a/sys/net/if_arcsubr.c +++ b/sys/net/if_arcsubr.c @@ -837,7 +837,7 @@ arc_resolvemulti(struct ifnet *ifp, struct sockaddr **llsa, } } -MALLOC_DEFINE(M_ARCCOM, "arccom", "ARCNET interface internals"); +static MALLOC_DEFINE(M_ARCCOM, "arccom", "ARCNET interface internals"); static void* arc_alloc(u_char type, struct ifnet *ifp) diff --git a/sys/net/if_atmsubr.c b/sys/net/if_atmsubr.c index fb63fd5d6d64..bb691e1fb97e 100644 --- a/sys/net/if_atmsubr.c +++ b/sys/net/if_atmsubr.c @@ -98,7 +98,7 @@ void (*atm_harp_event_p)(struct ifnet *, uint32_t, void *); SYSCTL_NODE(_hw, OID_AUTO, atm, CTLFLAG_RW, 0, "ATM hardware"); -MALLOC_DEFINE(M_IFATM, "ifatm", "atm interface internals"); +static MALLOC_DEFINE(M_IFATM, "ifatm", "atm interface internals"); #ifndef ETHERTYPE_IPV6 #define ETHERTYPE_IPV6 0x86dd diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 1d16ae6c660e..9eae68389156 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -134,7 +134,7 @@ static void ether_reassign(struct ifnet *, struct vnet *, char *); #endif /* XXX: should be in an arp support file, not here */ -MALLOC_DEFINE(M_ARPCOM, "arpcom", "802.* interface internals"); +static MALLOC_DEFINE(M_ARPCOM, "arpcom", "802.* interface internals"); #define ETHER_IS_BROADCAST(addr) \ (bcmp(etherbroadcastaddr, (addr), ETHER_ADDR_LEN) == 0) diff --git a/sys/net/if_fwsubr.c b/sys/net/if_fwsubr.c index 7c57feb372ff..5414d792de04 100644 --- a/sys/net/if_fwsubr.c +++ b/sys/net/if_fwsubr.c @@ -63,7 +63,7 @@ #include -MALLOC_DEFINE(M_FWCOM, "fw_com", "firewire interface internals"); +static MALLOC_DEFINE(M_FWCOM, "fw_com", "firewire interface internals"); struct fw_hwaddr firewire_broadcastaddr = { 0xffffffff, diff --git a/sys/net/if_iso88025subr.c b/sys/net/if_iso88025subr.c index 7961df090750..91d67fdd5323 100644 --- a/sys/net/if_iso88025subr.c +++ b/sys/net/if_iso88025subr.c @@ -781,7 +781,7 @@ iso88025_resolvemulti (ifp, llsa, sa) return (0); } -MALLOC_DEFINE(M_ISO88025, "arpcom", "802.5 interface internals"); +static MALLOC_DEFINE(M_ISO88025, "arpcom", "802.5 interface internals"); static void* iso88025_alloc(u_char type, struct ifnet *ifp) diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c index 363d9aa143f0..7c9c2309026e 100644 --- a/sys/net/if_spppsubr.c +++ b/sys/net/if_spppsubr.c @@ -174,7 +174,7 @@ #define STATE_ACK_SENT 8 #define STATE_OPENED 9 -MALLOC_DEFINE(M_SPPP, "sppp", "synchronous PPP interface internals"); +static MALLOC_DEFINE(M_SPPP, "sppp", "synchronous PPP interface internals"); struct ppp_header { u_char address; diff --git a/sys/net/vnet.c b/sys/net/vnet.c index b9eebd9c40f9..e8864aac0cd5 100644 --- a/sys/net/vnet.c +++ b/sys/net/vnet.c @@ -81,7 +81,7 @@ __FBSDID("$FreeBSD$"); FEATURE(vimage, "VIMAGE kernel virtualization"); -MALLOC_DEFINE(M_VNET, "vnet", "network stack control block"); +static MALLOC_DEFINE(M_VNET, "vnet", "network stack control block"); /* * The virtual network stack list has two read-write locks, one sleepable and @@ -161,7 +161,7 @@ struct vnet *vnet0; */ #define VNET_BYTES (VNET_STOP - VNET_START) -MALLOC_DEFINE(M_VNET_DATA, "vnet_data", "VNET data"); +static MALLOC_DEFINE(M_VNET_DATA, "vnet_data", "VNET data"); /* * VNET_MODMIN is the minimum number of bytes we will reserve for the sum of @@ -203,7 +203,8 @@ struct vnet_data_free { TAILQ_ENTRY(vnet_data_free) vnd_link; }; -MALLOC_DEFINE(M_VNET_DATA_FREE, "vnet_data_free", "VNET resource accounting"); +static MALLOC_DEFINE(M_VNET_DATA_FREE, "vnet_data_free", + "VNET resource accounting"); static TAILQ_HEAD(, vnet_data_free) vnet_data_free_head = TAILQ_HEAD_INITIALIZER(vnet_data_free_head); static struct sx vnet_data_free_lock; diff --git a/sys/net80211/ieee80211_acl.c b/sys/net80211/ieee80211_acl.c index da505e3b9d1e..d39c42802946 100644 --- a/sys/net80211/ieee80211_acl.c +++ b/sys/net80211/ieee80211_acl.c @@ -87,7 +87,7 @@ struct aclstate { #define ACL_HASH(addr) \ (((const uint8_t *)(addr))[IEEE80211_ADDR_LEN - 1] % ACL_HASHSIZE) -MALLOC_DEFINE(M_80211_ACL, "acl", "802.11 station acl"); +static MALLOC_DEFINE(M_80211_ACL, "acl", "802.11 station acl"); static int acl_free_all(struct ieee80211vap *); diff --git a/sys/net80211/ieee80211_dfs.c b/sys/net80211/ieee80211_dfs.c index 19e552d31cfe..d44420c6f0f2 100644 --- a/sys/net80211/ieee80211_dfs.c +++ b/sys/net80211/ieee80211_dfs.c @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); #include -MALLOC_DEFINE(M_80211_DFS, "80211dfs", "802.11 DFS state"); +static MALLOC_DEFINE(M_80211_DFS, "80211dfs", "802.11 DFS state"); static int ieee80211_nol_timeout = 30*60; /* 30 minutes */ SYSCTL_INT(_net_wlan, OID_AUTO, nol_timeout, CTLFLAG_RW, diff --git a/sys/net80211/ieee80211_freebsd.c b/sys/net80211/ieee80211_freebsd.c index dfe9e0bc3638..10ef1f634804 100644 --- a/sys/net80211/ieee80211_freebsd.c +++ b/sys/net80211/ieee80211_freebsd.c @@ -63,7 +63,7 @@ SYSCTL_INT(_net_wlan, OID_AUTO, debug, CTLFLAG_RW, &ieee80211_debug, 0, "debugging printfs"); #endif -MALLOC_DEFINE(M_80211_COM, "80211com", "802.11 com state"); +static MALLOC_DEFINE(M_80211_COM, "80211com", "802.11 com state"); /* * Allocate/free com structure in conjunction with ifnet; diff --git a/sys/net80211/ieee80211_power.c b/sys/net80211/ieee80211_power.c index 201eea0ab9bd..11eb141eacef 100644 --- a/sys/net80211/ieee80211_power.c +++ b/sys/net80211/ieee80211_power.c @@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$"); static void ieee80211_update_ps(struct ieee80211vap *, int); static int ieee80211_set_tim(struct ieee80211_node *, int); -MALLOC_DEFINE(M_80211_POWER, "80211power", "802.11 power save state"); +static MALLOC_DEFINE(M_80211_POWER, "80211power", "802.11 power save state"); void ieee80211_power_attach(struct ieee80211com *ic) diff --git a/sys/netgraph/atm/ngatmbase.c b/sys/netgraph/atm/ngatmbase.c index ecb23e63d6a4..c5b0ced97840 100644 --- a/sys/netgraph/atm/ngatmbase.c +++ b/sys/netgraph/atm/ngatmbase.c @@ -61,8 +61,8 @@ DECLARE_MODULE(ngatmbase, ngatm_data, SI_SUB_EXEC, SI_ORDER_ANY); /* * UNI Stack message handling functions */ -MALLOC_DEFINE(M_UNIMSG, "unimsg", "uni message buffers"); -MALLOC_DEFINE(M_UNIMSGHDR, "unimsghdr", "uni message headers"); +static MALLOC_DEFINE(M_UNIMSG, "unimsg", "uni message buffers"); +static MALLOC_DEFINE(M_UNIMSGHDR, "unimsghdr", "uni message headers"); #define EXTRA 128 diff --git a/sys/netgraph/atm/uni/ng_uni.c b/sys/netgraph/atm/uni/ng_uni.c index 2fc95994d887..980b81ab1505 100644 --- a/sys/netgraph/atm/uni/ng_uni.c +++ b/sys/netgraph/atm/uni/ng_uni.c @@ -60,8 +60,8 @@ __FBSDID("$FreeBSD$"); #include #include -MALLOC_DEFINE(M_NG_UNI, "netgraph_uni_node", "netgraph uni node"); -MALLOC_DEFINE(M_UNI, "netgraph_uni_data", "uni protocol data"); +static MALLOC_DEFINE(M_NG_UNI, "netgraph_uni_node", "netgraph uni node"); +static MALLOC_DEFINE(M_UNI, "netgraph_uni_data", "uni protocol data"); MODULE_DEPEND(ng_uni, ngatmbase, 1, 1, 1); diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c b/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c index d8c32b12aafc..cf4718a617e1 100644 --- a/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c +++ b/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c @@ -61,7 +61,7 @@ /* MALLOC define */ #ifdef NG_SEPARATE_MALLOC -MALLOC_DEFINE(M_NETGRAPH_BTSOCKET_HCI_RAW, "netgraph_btsocks_hci_raw", +static MALLOC_DEFINE(M_NETGRAPH_BTSOCKET_HCI_RAW, "netgraph_btsocks_hci_raw", "Netgraph Bluetooth raw HCI sockets"); #else #define M_NETGRAPH_BTSOCKET_HCI_RAW M_NETGRAPH diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c index efca538993c4..3625ba191bc5 100644 --- a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c +++ b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c @@ -63,7 +63,7 @@ /* MALLOC define */ #ifdef NG_SEPARATE_MALLOC -MALLOC_DEFINE(M_NETGRAPH_BTSOCKET_L2CAP, "netgraph_btsocks_l2cap", +static MALLOC_DEFINE(M_NETGRAPH_BTSOCKET_L2CAP, "netgraph_btsocks_l2cap", "Netgraph Bluetooth L2CAP sockets"); #else #define M_NETGRAPH_BTSOCKET_L2CAP M_NETGRAPH diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c index 72339f603bc2..90157de29359 100644 --- a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c +++ b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c @@ -60,8 +60,8 @@ /* MALLOC define */ #ifdef NG_SEPARATE_MALLOC -MALLOC_DEFINE(M_NETGRAPH_BTSOCKET_L2CAP_RAW, "netgraph_btsocks_l2cap_raw", - "Netgraph Bluetooth raw L2CAP sockets"); +static MALLOC_DEFINE(M_NETGRAPH_BTSOCKET_L2CAP_RAW, + "netgraph_btsocks_l2cap_raw", "Netgraph Bluetooth raw L2CAP sockets"); #else #define M_NETGRAPH_BTSOCKET_L2CAP_RAW M_NETGRAPH #endif /* NG_SEPARATE_MALLOC */ diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c b/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c index e90cab2449f6..7970859a2daf 100644 --- a/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c +++ b/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c @@ -66,7 +66,7 @@ /* MALLOC define */ #ifdef NG_SEPARATE_MALLOC -MALLOC_DEFINE(M_NETGRAPH_BTSOCKET_RFCOMM, "netgraph_btsocks_rfcomm", +static MALLOC_DEFINE(M_NETGRAPH_BTSOCKET_RFCOMM, "netgraph_btsocks_rfcomm", "Netgraph Bluetooth RFCOMM sockets"); #else #define M_NETGRAPH_BTSOCKET_RFCOMM M_NETGRAPH diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c b/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c index 85b68dcb3f6f..0887f52d92ee 100644 --- a/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c +++ b/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c @@ -63,7 +63,7 @@ /* MALLOC define */ #ifdef NG_SEPARATE_MALLOC -MALLOC_DEFINE(M_NETGRAPH_BTSOCKET_SCO, "netgraph_btsocks_sco", +static MALLOC_DEFINE(M_NETGRAPH_BTSOCKET_SCO, "netgraph_btsocks_sco", "Netgraph Bluetooth SCO sockets"); #else #define M_NETGRAPH_BTSOCKET_SCO M_NETGRAPH diff --git a/sys/netgraph/ng_async.c b/sys/netgraph/ng_async.c index 283ba1555a43..217590b73950 100644 --- a/sys/netgraph/ng_async.c +++ b/sys/netgraph/ng_async.c @@ -61,7 +61,7 @@ #include #ifdef NG_SEPARATE_MALLOC -MALLOC_DEFINE(M_NETGRAPH_ASYNC, "netgraph_async", "netgraph async node "); +static MALLOC_DEFINE(M_NETGRAPH_ASYNC, "netgraph_async", "netgraph async node"); #else #define M_NETGRAPH_ASYNC M_NETGRAPH #endif diff --git a/sys/netgraph/ng_base.c b/sys/netgraph/ng_base.c index 6b59d9782e1b..2f8e99fa40db 100644 --- a/sys/netgraph/ng_base.c +++ b/sys/netgraph/ng_base.c @@ -232,10 +232,13 @@ void ng_unname(node_p node); /* Our own netgraph malloc type */ MALLOC_DEFINE(M_NETGRAPH, "netgraph", "netgraph structures and ctrl messages"); -MALLOC_DEFINE(M_NETGRAPH_HOOK, "netgraph_hook", "netgraph hook structures"); -MALLOC_DEFINE(M_NETGRAPH_NODE, "netgraph_node", "netgraph node structures"); -MALLOC_DEFINE(M_NETGRAPH_ITEM, "netgraph_item", "netgraph item structures"); MALLOC_DEFINE(M_NETGRAPH_MSG, "netgraph_msg", "netgraph name storage"); +static MALLOC_DEFINE(M_NETGRAPH_HOOK, "netgraph_hook", + "netgraph hook structures"); +static MALLOC_DEFINE(M_NETGRAPH_NODE, "netgraph_node", + "netgraph node structures"); +static MALLOC_DEFINE(M_NETGRAPH_ITEM, "netgraph_item", + "netgraph item structures"); /* Should not be visible outside this file */ diff --git a/sys/netgraph/ng_bpf.c b/sys/netgraph/ng_bpf.c index 50a6bf7b539d..49db81e60954 100644 --- a/sys/netgraph/ng_bpf.c +++ b/sys/netgraph/ng_bpf.c @@ -74,7 +74,7 @@ #include #ifdef NG_SEPARATE_MALLOC -MALLOC_DEFINE(M_NETGRAPH_BPF, "netgraph_bpf", "netgraph bpf node "); +static MALLOC_DEFINE(M_NETGRAPH_BPF, "netgraph_bpf", "netgraph bpf node"); #else #define M_NETGRAPH_BPF M_NETGRAPH #endif diff --git a/sys/netgraph/ng_bridge.c b/sys/netgraph/ng_bridge.c index e9631b8e950e..738441d835c1 100644 --- a/sys/netgraph/ng_bridge.c +++ b/sys/netgraph/ng_bridge.c @@ -84,7 +84,8 @@ #include #ifdef NG_SEPARATE_MALLOC -MALLOC_DEFINE(M_NETGRAPH_BRIDGE, "netgraph_bridge", "netgraph bridge node"); +static MALLOC_DEFINE(M_NETGRAPH_BRIDGE, "netgraph_bridge", + "netgraph bridge node"); #else #define M_NETGRAPH_BRIDGE M_NETGRAPH #endif diff --git a/sys/netgraph/ng_deflate.c b/sys/netgraph/ng_deflate.c index f3ce1c0444da..5fa6363e8313 100644 --- a/sys/netgraph/ng_deflate.c +++ b/sys/netgraph/ng_deflate.c @@ -49,7 +49,8 @@ #include "opt_netgraph.h" -MALLOC_DEFINE(M_NETGRAPH_DEFLATE, "netgraph_deflate", "netgraph deflate node "); +static MALLOC_DEFINE(M_NETGRAPH_DEFLATE, "netgraph_deflate", + "netgraph deflate node"); /* DEFLATE header length */ #define DEFLATE_HDRLEN 2 diff --git a/sys/netgraph/ng_gif_demux.c b/sys/netgraph/ng_gif_demux.c index 857f10f90f2d..646e37dd5d49 100644 --- a/sys/netgraph/ng_gif_demux.c +++ b/sys/netgraph/ng_gif_demux.c @@ -89,7 +89,7 @@ #include #ifdef NG_SEPARATE_MALLOC -MALLOC_DEFINE(M_NETGRAPH_GIF_DEMUX, "netgraph_gif_demux", +static MALLOC_DEFINE(M_NETGRAPH_GIF_DEMUX, "netgraph_gif_demux", "netgraph gif demux node"); #else #define M_NETGRAPH_GIF_DEMUX M_NETGRAPH diff --git a/sys/netgraph/ng_hub.c b/sys/netgraph/ng_hub.c index f013aac22df6..2a8c2d2a6923 100644 --- a/sys/netgraph/ng_hub.c +++ b/sys/netgraph/ng_hub.c @@ -37,7 +37,7 @@ #include #ifdef NG_SEPARATE_MALLOC -MALLOC_DEFINE(M_NETGRAPH_HUB, "netgraph_hub", "netgraph hub node"); +static MALLOC_DEFINE(M_NETGRAPH_HUB, "netgraph_hub", "netgraph hub node"); #else #define M_NETGRAPH_HUB M_NETGRAPH #endif diff --git a/sys/netgraph/ng_iface.c b/sys/netgraph/ng_iface.c index e7740989d2d7..3ce0261287cc 100644 --- a/sys/netgraph/ng_iface.c +++ b/sys/netgraph/ng_iface.c @@ -87,7 +87,7 @@ #include #ifdef NG_SEPARATE_MALLOC -MALLOC_DEFINE(M_NETGRAPH_IFACE, "netgraph_iface", "netgraph iface node "); +static MALLOC_DEFINE(M_NETGRAPH_IFACE, "netgraph_iface", "netgraph iface node"); #else #define M_NETGRAPH_IFACE M_NETGRAPH #endif diff --git a/sys/netgraph/ng_ksocket.c b/sys/netgraph/ng_ksocket.c index 6caade06098f..20121baec750 100644 --- a/sys/netgraph/ng_ksocket.c +++ b/sys/netgraph/ng_ksocket.c @@ -69,7 +69,8 @@ #include #ifdef NG_SEPARATE_MALLOC -MALLOC_DEFINE(M_NETGRAPH_KSOCKET, "netgraph_ksock", "netgraph ksock node "); +static MALLOC_DEFINE(M_NETGRAPH_KSOCKET, "netgraph_ksock", + "netgraph ksock node"); #else #define M_NETGRAPH_KSOCKET M_NETGRAPH #endif diff --git a/sys/netgraph/ng_l2tp.c b/sys/netgraph/ng_l2tp.c index 201fc456564f..3b91b84d04f4 100644 --- a/sys/netgraph/ng_l2tp.c +++ b/sys/netgraph/ng_l2tp.c @@ -62,7 +62,7 @@ #include #ifdef NG_SEPARATE_MALLOC -MALLOC_DEFINE(M_NETGRAPH_L2TP, "netgraph_l2tp", "netgraph l2tp node"); +static MALLOC_DEFINE(M_NETGRAPH_L2TP, "netgraph_l2tp", "netgraph l2tp node"); #else #define M_NETGRAPH_L2TP M_NETGRAPH #endif diff --git a/sys/netgraph/ng_mppc.c b/sys/netgraph/ng_mppc.c index cb6531619d31..6754be79c08e 100644 --- a/sys/netgraph/ng_mppc.c +++ b/sys/netgraph/ng_mppc.c @@ -74,7 +74,7 @@ #endif #ifdef NG_SEPARATE_MALLOC -MALLOC_DEFINE(M_NETGRAPH_MPPC, "netgraph_mppc", "netgraph mppc node "); +static MALLOC_DEFINE(M_NETGRAPH_MPPC, "netgraph_mppc", "netgraph mppc node"); #else #define M_NETGRAPH_MPPC M_NETGRAPH #endif diff --git a/sys/netgraph/ng_parse.c b/sys/netgraph/ng_parse.c index fbbefc62d989..e8cbc9ab28ac 100644 --- a/sys/netgraph/ng_parse.c +++ b/sys/netgraph/ng_parse.c @@ -62,7 +62,7 @@ #include #ifdef NG_SEPARATE_MALLOC -MALLOC_DEFINE(M_NETGRAPH_PARSE, "netgraph_parse", "netgraph parse info"); +static MALLOC_DEFINE(M_NETGRAPH_PARSE, "netgraph_parse", "netgraph parse info"); #else #define M_NETGRAPH_PARSE M_NETGRAPH #endif diff --git a/sys/netgraph/ng_ppp.c b/sys/netgraph/ng_ppp.c index a0a3c38e509b..b26163af9d73 100644 --- a/sys/netgraph/ng_ppp.c +++ b/sys/netgraph/ng_ppp.c @@ -108,7 +108,7 @@ #include #ifdef NG_SEPARATE_MALLOC -MALLOC_DEFINE(M_NETGRAPH_PPP, "netgraph_ppp", "netgraph ppp node"); +static MALLOC_DEFINE(M_NETGRAPH_PPP, "netgraph_ppp", "netgraph ppp node"); #else #define M_NETGRAPH_PPP M_NETGRAPH #endif diff --git a/sys/netgraph/ng_pppoe.c b/sys/netgraph/ng_pppoe.c index 4d5e24ed6612..3b953b3201fe 100644 --- a/sys/netgraph/ng_pppoe.c +++ b/sys/netgraph/ng_pppoe.c @@ -58,7 +58,7 @@ #include #ifdef NG_SEPARATE_MALLOC -MALLOC_DEFINE(M_NETGRAPH_PPPOE, "netgraph_pppoe", "netgraph pppoe node"); +static MALLOC_DEFINE(M_NETGRAPH_PPPOE, "netgraph_pppoe", "netgraph pppoe node"); #else #define M_NETGRAPH_PPPOE M_NETGRAPH #endif diff --git a/sys/netgraph/ng_pred1.c b/sys/netgraph/ng_pred1.c index 5f01e88f73fe..52efe633e1b7 100644 --- a/sys/netgraph/ng_pred1.c +++ b/sys/netgraph/ng_pred1.c @@ -46,7 +46,7 @@ #include "opt_netgraph.h" -MALLOC_DEFINE(M_NETGRAPH_PRED1, "netgraph_pred1", "netgraph pred1 node "); +static MALLOC_DEFINE(M_NETGRAPH_PRED1, "netgraph_pred1", "netgraph pred1 node"); /* PRED1 header length */ #define PRED1_HDRLEN 2 diff --git a/sys/netgraph/ng_sample.c b/sys/netgraph/ng_sample.c index 3d644dbe19d5..f0e4d5040e8b 100644 --- a/sys/netgraph/ng_sample.c +++ b/sys/netgraph/ng_sample.c @@ -58,7 +58,7 @@ /* If you do complicated mallocs you may want to do this */ /* and use it for your mallocs */ #ifdef NG_SEPARATE_MALLOC -MALLOC_DEFINE(M_NETGRAPH_XXX, "netgraph_xxx", "netgraph xxx node "); +static MALLOC_DEFINE(M_NETGRAPH_XXX, "netgraph_xxx", "netgraph xxx node"); #else #define M_NETGRAPH_XXX M_NETGRAPH #endif diff --git a/sys/netgraph/ng_socket.c b/sys/netgraph/ng_socket.c index 8c819c01429d..b1c1f6f04037 100644 --- a/sys/netgraph/ng_socket.c +++ b/sys/netgraph/ng_socket.c @@ -76,8 +76,8 @@ #include #ifdef NG_SEPARATE_MALLOC -MALLOC_DEFINE(M_NETGRAPH_PATH, "netgraph_path", "netgraph path info "); -MALLOC_DEFINE(M_NETGRAPH_SOCK, "netgraph_sock", "netgraph socket info "); +static MALLOC_DEFINE(M_NETGRAPH_PATH, "netgraph_path", "netgraph path info"); +static MALLOC_DEFINE(M_NETGRAPH_SOCK, "netgraph_sock", "netgraph socket info"); #else #define M_NETGRAPH_PATH M_NETGRAPH #define M_NETGRAPH_SOCK M_NETGRAPH diff --git a/sys/netgraph/ng_sppp.c b/sys/netgraph/ng_sppp.c index ad9614658f76..4ad89ec6fc9e 100644 --- a/sys/netgraph/ng_sppp.c +++ b/sys/netgraph/ng_sppp.c @@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$"); #include #ifdef NG_SEPARATE_MALLOC -MALLOC_DEFINE(M_NETGRAPH_SPPP, "netgraph_sppp", "netgraph sppp node "); +static MALLOC_DEFINE(M_NETGRAPH_SPPP, "netgraph_sppp", "netgraph sppp node"); #else #define M_NETGRAPH_SPPP M_NETGRAPH #endif diff --git a/sys/netgraph/ng_tag.c b/sys/netgraph/ng_tag.c index b183285e93e5..150a0f28118e 100644 --- a/sys/netgraph/ng_tag.c +++ b/sys/netgraph/ng_tag.c @@ -69,7 +69,7 @@ #include #ifdef NG_SEPARATE_MALLOC -MALLOC_DEFINE(M_NETGRAPH_TAG, "netgraph_tag", "netgraph tag node "); +static MALLOC_DEFINE(M_NETGRAPH_TAG, "netgraph_tag", "netgraph tag node"); #else #define M_NETGRAPH_TAG M_NETGRAPH #endif diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c index b02d30beb638..b62416b49a9b 100644 --- a/sys/netinet/igmp.c +++ b/sys/netinet/igmp.c @@ -185,7 +185,7 @@ static const struct netisr_handler igmp_nh = { struct mtx igmp_mtx; struct mbuf *m_raopt; /* Router Alert option */ -MALLOC_DEFINE(M_IGMP, "igmp", "igmp state"); +static MALLOC_DEFINE(M_IGMP, "igmp", "igmp state"); /* * VIMAGE-wide globals. diff --git a/sys/netinet/ipfw/dn_heap.c b/sys/netinet/ipfw/dn_heap.c index 425d3540caf4..3bdfd9def288 100644 --- a/sys/netinet/ipfw/dn_heap.c +++ b/sys/netinet/ipfw/dn_heap.c @@ -59,7 +59,7 @@ static void my_free(void *p) { free(p); } #define free(p, t) my_free(p) #endif /* !_KERNEL */ -MALLOC_DEFINE(M_DN_HEAP, "dummynet", "dummynet heap"); +static MALLOC_DEFINE(M_DN_HEAP, "dummynet", "dummynet heap"); /* * Heap management functions. diff --git a/sys/netinet/ipfw/ip_fw_table.c b/sys/netinet/ipfw/ip_fw_table.c index 6a1c8e0a3f3d..117a2053a011 100644 --- a/sys/netinet/ipfw/ip_fw_table.c +++ b/sys/netinet/ipfw/ip_fw_table.c @@ -68,7 +68,7 @@ __FBSDID("$FreeBSD$"); #include #endif -MALLOC_DEFINE(M_IPFW_TBL, "ipfw_tbl", "IpFw tables"); +static MALLOC_DEFINE(M_IPFW_TBL, "ipfw_tbl", "IpFw tables"); struct table_entry { struct radix_node rn[2]; diff --git a/sys/netinet/libalias/alias_sctp.c b/sys/netinet/libalias/alias_sctp.c index bb0f9cc8476a..42af5ec69bed 100644 --- a/sys/netinet/libalias/alias_sctp.c +++ b/sys/netinet/libalias/alias_sctp.c @@ -181,7 +181,7 @@ void SctpShowAliasStats(struct libalias *la); #ifdef _KERNEL -MALLOC_DEFINE(M_SCTPNAT, "sctpnat", "sctp nat dbs"); +static MALLOC_DEFINE(M_SCTPNAT, "sctpnat", "sctp nat dbs"); /* Use kernel allocator. */ #ifdef _SYS_MALLOC_H_ #define sn_malloc(x) malloc(x, M_SCTPNAT, M_NOWAIT|M_ZERO) diff --git a/sys/netinet6/mld6.c b/sys/netinet6/mld6.c index a56f83d2f743..bcef28cb6b2b 100644 --- a/sys/netinet6/mld6.c +++ b/sys/netinet6/mld6.c @@ -193,7 +193,7 @@ static int sysctl_mld_ifinfo(SYSCTL_HANDLER_ARGS); * to a vnet in ifp->if_vnet. */ static struct mtx mld_mtx; -MALLOC_DEFINE(M_MLD, "mld", "mld state"); +static MALLOC_DEFINE(M_MLD, "mld", "mld state"); #define MLD_EMBEDSCOPE(pin6, zoneid) \ if (IN6_IS_SCOPE_LINKLOCAL(pin6) || \ diff --git a/sys/netinet6/send.c b/sys/netinet6/send.c index 71d88d07a8a8..5624366533d4 100644 --- a/sys/netinet6/send.c +++ b/sys/netinet6/send.c @@ -55,7 +55,7 @@ __FBSDID("$FreeBSD$"); #include #include -MALLOC_DEFINE(M_SEND, "send", "Secure Neighbour Discovery"); +static MALLOC_DEFINE(M_SEND, "send", "Secure Neighbour Discovery"); /* * The socket used to communicate with the SeND daemon. diff --git a/sys/netipx/spx_reass.c b/sys/netipx/spx_reass.c index 4344b29ef2a5..fea031fdc493 100644 --- a/sys/netipx/spx_reass.c +++ b/sys/netipx/spx_reass.c @@ -93,7 +93,7 @@ __FBSDID("$FreeBSD$"); static int spx_use_delack = 0; static int spxrexmtthresh = 3; -MALLOC_DEFINE(M_SPXREASSQ, "spxreassq", "SPX reassembly queue entry"); +static MALLOC_DEFINE(M_SPXREASSQ, "spxreassq", "SPX reassembly queue entry"); /* * Flesh pending queued segments on SPX close. diff --git a/sys/netsmb/smb_conn.c b/sys/netsmb/smb_conn.c index c14cb8b0c2b2..2095eb19ef55 100644 --- a/sys/netsmb/smb_conn.c +++ b/sys/netsmb/smb_conn.c @@ -54,7 +54,7 @@ static int smb_vcnext = 1; /* next unique id for VC */ SYSCTL_NODE(_net, OID_AUTO, smb, CTLFLAG_RW, NULL, "SMB protocol"); -MALLOC_DEFINE(M_SMBCONN, "smb_conn", "SMB connection"); +static MALLOC_DEFINE(M_SMBCONN, "smb_conn", "SMB connection"); static void smb_co_init(struct smb_connobj *cp, int level, char *ilockname, char *lockname); diff --git a/sys/netsmb/smb_rq.c b/sys/netsmb/smb_rq.c index 4f5c5e63e42b..566a25211558 100644 --- a/sys/netsmb/smb_rq.c +++ b/sys/netsmb/smb_rq.c @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include -MALLOC_DEFINE(M_SMBRQ, "SMBRQ", "SMB request"); +static MALLOC_DEFINE(M_SMBRQ, "SMBRQ", "SMB request"); MODULE_DEPEND(netsmb, libmchain, 1, 1, 1); diff --git a/sys/netsmb/smb_subr.c b/sys/netsmb/smb_subr.c index ade9e17dcb7b..c92f865fee86 100644 --- a/sys/netsmb/smb_subr.c +++ b/sys/netsmb/smb_subr.c @@ -46,8 +46,8 @@ __FBSDID("$FreeBSD$"); #include #include -MALLOC_DEFINE(M_SMBDATA, "SMBDATA", "Misc netsmb data"); -MALLOC_DEFINE(M_SMBSTR, "SMBSTR", "netsmb string data"); +static MALLOC_DEFINE(M_SMBDATA, "SMBDATA", "Misc netsmb data"); +static MALLOC_DEFINE(M_SMBSTR, "SMBSTR", "netsmb string data"); MALLOC_DEFINE(M_SMBTEMP, "SMBTEMP", "Temp netsmb data"); smb_unichar smb_unieol = 0; diff --git a/sys/nfs/nfs_lock.c b/sys/nfs/nfs_lock.c index 0aca8e98f269..7d11672edde4 100644 --- a/sys/nfs/nfs_lock.c +++ b/sys/nfs/nfs_lock.c @@ -65,8 +65,9 @@ extern void (*nlminfo_release_p)(struct proc *p); vop_advlock_t *nfs_advlock_p = nfs_dolock; vop_reclaim_t *nfs_reclaim_p = NULL; -MALLOC_DEFINE(M_NFSLOCK, "nfsclient_lock", "NFS lock request"); -MALLOC_DEFINE(M_NLMINFO, "nfsclient_nlminfo", "NFS lock process structure"); +static MALLOC_DEFINE(M_NFSLOCK, "nfsclient_lock", "NFS lock request"); +static MALLOC_DEFINE(M_NLMINFO, "nfsclient_nlminfo", + "NFS lock process structure"); static int nfslockdans(struct thread *td, struct lockd_ans *ansp); static void nlminfo_release(struct proc *p); diff --git a/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c b/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c index fe747af77a85..24a60b41a788 100644 --- a/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c +++ b/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c @@ -85,7 +85,7 @@ RW_SYSINIT(sdplockinit, &sdp_lock, "SDP lock"); #define SDP_LIST_RLOCK_ASSERT() rw_assert(&sdp_lock, RW_RLOCKED) #define SDP_LIST_LOCK_ASSERT() rw_assert(&sdp_lock, RW_LOCKED) -MALLOC_DEFINE(M_SDP, "sdp", "Socket Direct Protocol"); +static MALLOC_DEFINE(M_SDP, "sdp", "Socket Direct Protocol"); static void sdp_stop_keepalive_timer(struct socket *so); diff --git a/sys/ofed/include/linux/linux_idr.c b/sys/ofed/include/linux/linux_idr.c index 5cfaff5728c0..b6f5d01888d6 100644 --- a/sys/ofed/include/linux/linux_idr.c +++ b/sys/ofed/include/linux/linux_idr.c @@ -49,7 +49,7 @@ * however it should be fairly fast. It is basically a radix tree with * a builtin bitmap for allocation. */ -MALLOC_DEFINE(M_IDR, "idr", "Linux IDR compat"); +static MALLOC_DEFINE(M_IDR, "idr", "Linux IDR compat"); static inline int idr_max(struct idr *idr) diff --git a/sys/ofed/include/linux/linux_radix.c b/sys/ofed/include/linux/linux_radix.c index e642eaeb71bc..4503f5544a7a 100644 --- a/sys/ofed/include/linux/linux_radix.c +++ b/sys/ofed/include/linux/linux_radix.c @@ -37,7 +37,7 @@ #include #include -MALLOC_DEFINE(M_RADIX, "radix", "Linux radix compat"); +static MALLOC_DEFINE(M_RADIX, "radix", "Linux radix compat"); static inline int radix_max(struct radix_tree_root *root) diff --git a/sys/powerpc/ofw/ofw_real.c b/sys/powerpc/ofw/ofw_real.c index 1fc2ed10e615..d2659432529b 100644 --- a/sys/powerpc/ofw/ofw_real.c +++ b/sys/powerpc/ofw/ofw_real.c @@ -158,7 +158,8 @@ static ofw_def_t ofw_32bit = { }; OFW_DEF(ofw_32bit); -MALLOC_DEFINE(M_OFWREAL, "ofwreal", "Open Firmware Real Mode Bounce Page"); +static MALLOC_DEFINE(M_OFWREAL, "ofwreal", + "Open Firmware Real Mode Bounce Page"); static int (*openfirmware)(void *); diff --git a/sys/powerpc/ofw/rtas.c b/sys/powerpc/ofw/rtas.c index 66ce12fc0d24..c6d89691a5d0 100644 --- a/sys/powerpc/ofw/rtas.c +++ b/sys/powerpc/ofw/rtas.c @@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$"); #include -MALLOC_DEFINE(M_RTAS, "rtas", "Run Time Abstraction Service"); +static MALLOC_DEFINE(M_RTAS, "rtas", "Run Time Abstraction Service"); static vm_offset_t rtas_bounce_phys; static caddr_t rtas_bounce_virt; diff --git a/sys/powerpc/powermac/dbdma.c b/sys/powerpc/powermac/dbdma.c index 117260687a36..6712c1a79ff4 100644 --- a/sys/powerpc/powermac/dbdma.c +++ b/sys/powerpc/powermac/dbdma.c @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); #include "dbdmavar.h" -MALLOC_DEFINE(M_DBDMA, "dbdma", "DBDMA Command List"); +static MALLOC_DEFINE(M_DBDMA, "dbdma", "DBDMA Command List"); static uint32_t dbdma_read_reg(dbdma_channel_t *, u_int); static void dbdma_write_reg(dbdma_channel_t *, u_int, uint32_t); diff --git a/sys/powerpc/powermac/fcu.c b/sys/powerpc/powermac/fcu.c index cf5b4662a604..109833dbd796 100644 --- a/sys/powerpc/powermac/fcu.c +++ b/sys/powerpc/powermac/fcu.c @@ -131,7 +131,7 @@ static driver_t fcu_driver = { static devclass_t fcu_devclass; DRIVER_MODULE(fcu, iicbus, fcu_driver, fcu_devclass, 0, 0); -MALLOC_DEFINE(M_FCU, "fcu", "FCU Sensor Information"); +static MALLOC_DEFINE(M_FCU, "fcu", "FCU Sensor Information"); static int fcu_write(device_t dev, uint32_t addr, uint8_t reg, uint8_t *buff, diff --git a/sys/powerpc/powermac/powermac_thermal.c b/sys/powerpc/powermac/powermac_thermal.c index 9c1f59d62221..db0611a4d3cb 100644 --- a/sys/powerpc/powermac/powermac_thermal.c +++ b/sys/powerpc/powermac/powermac_thermal.c @@ -58,7 +58,7 @@ SYSINIT(pmac_therm_setup, SI_SUB_KTHREAD_IDLE, SI_ORDER_ANY, kproc_start, &pmac_therm_kp); SYSCTL_INT(_machdep, OID_AUTO, manage_fans, CTLFLAG_RW | CTLFLAG_TUN, &enable_pmac_thermal, 1, "Enable automatic fan management"); -MALLOC_DEFINE(M_PMACTHERM, "pmactherm", "Powermac Thermal Management"); +static MALLOC_DEFINE(M_PMACTHERM, "pmactherm", "Powermac Thermal Management"); struct pmac_fan_le { struct pmac_fan *fan; diff --git a/sys/powerpc/powermac/smu.c b/sys/powerpc/powermac/smu.c index ede97a13e448..b1b29e140207 100644 --- a/sys/powerpc/powermac/smu.c +++ b/sys/powerpc/powermac/smu.c @@ -197,7 +197,7 @@ static driver_t smu_driver = { static devclass_t smu_devclass; DRIVER_MODULE(smu, nexus, smu_driver, smu_devclass, 0, 0); -MALLOC_DEFINE(M_SMU, "smu", "SMU Sensor Information"); +static MALLOC_DEFINE(M_SMU, "smu", "SMU Sensor Information"); #define SMU_MAILBOX 0x8000860c #define SMU_FANMGT_INTERVAL 1000 /* ms */ diff --git a/sys/powerpc/powermac/smusat.c b/sys/powerpc/powermac/smusat.c index fcaa9ed4a4ab..974e98c54144 100644 --- a/sys/powerpc/powermac/smusat.c +++ b/sys/powerpc/powermac/smusat.c @@ -63,7 +63,7 @@ static int smusat_attach(device_t); static int smusat_sensor_sysctl(SYSCTL_HANDLER_ARGS); static int smusat_sensor_read(struct smu_sensor *sens); -MALLOC_DEFINE(M_SMUSAT, "smusat", "SMU Sattelite Sensors"); +static MALLOC_DEFINE(M_SMUSAT, "smusat", "SMU Sattelite Sensors"); static device_method_t smusat_methods[] = { /* Device interface */ diff --git a/sys/powerpc/powerpc/intr_machdep.c b/sys/powerpc/powerpc/intr_machdep.c index 1e6342cb754a..abfe90507792 100644 --- a/sys/powerpc/powerpc/intr_machdep.c +++ b/sys/powerpc/powerpc/intr_machdep.c @@ -89,7 +89,7 @@ #define MAX_STRAY_LOG 5 -MALLOC_DEFINE(M_INTR, "intr", "interrupt handler data"); +static MALLOC_DEFINE(M_INTR, "intr", "interrupt handler data"); struct powerpc_intr { struct intr_event *event; diff --git a/sys/security/mac_bsdextended/mac_bsdextended.c b/sys/security/mac_bsdextended/mac_bsdextended.c index c37d02adfb7f..a643c690debb 100644 --- a/sys/security/mac_bsdextended/mac_bsdextended.c +++ b/sys/security/mac_bsdextended/mac_bsdextended.c @@ -80,7 +80,8 @@ SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, enabled, CTLFLAG_RW, &ugidfw_enabled, 0, "Enforce extended BSD policy"); TUNABLE_INT("security.mac.bsdextended.enabled", &ugidfw_enabled); -MALLOC_DEFINE(M_MACBSDEXTENDED, "mac_bsdextended", "BSD Extended MAC rule"); +static MALLOC_DEFINE(M_MACBSDEXTENDED, "mac_bsdextended", + "BSD Extended MAC rule"); #define MAC_BSDEXTENDED_MAXRULES 250 static struct mac_bsdextended_rule *rules[MAC_BSDEXTENDED_MAXRULES]; diff --git a/sys/security/mac_lomac/mac_lomac.c b/sys/security/mac_lomac/mac_lomac.c index 5cdfc6767f32..d9f6cae6c830 100644 --- a/sys/security/mac_lomac/mac_lomac.c +++ b/sys/security/mac_lomac/mac_lomac.c @@ -137,7 +137,7 @@ static int lomac_slot; mac_label_get((l), lomac_slot)) #define PSLOT_SET(l, val) mac_label_set((l), lomac_slot, (uintptr_t)(val)) -MALLOC_DEFINE(M_LOMAC, "mac_lomac_label", "MAC/LOMAC labels"); +static MALLOC_DEFINE(M_LOMAC, "mac_lomac_label", "MAC/LOMAC labels"); static struct mac_lomac * lomac_alloc(int flag) diff --git a/sys/security/mac_portacl/mac_portacl.c b/sys/security/mac_portacl/mac_portacl.c index dbadff844437..c5d48279917e 100644 --- a/sys/security/mac_portacl/mac_portacl.c +++ b/sys/security/mac_portacl/mac_portacl.c @@ -109,7 +109,7 @@ SYSCTL_INT(_security_mac_portacl, OID_AUTO, port_high, CTLFLAG_RW, &portacl_port_high, 0, "Highest port to enforce for"); TUNABLE_INT("security.mac.portacl.port_high", &portacl_port_high); -MALLOC_DEFINE(M_PORTACL, "portacl_rule", "Rules for mac_portacl"); +static MALLOC_DEFINE(M_PORTACL, "portacl_rule", "Rules for mac_portacl"); #define MAC_RULE_STRING_LEN 1024 diff --git a/sys/sparc64/sparc64/iommu.c b/sys/sparc64/sparc64/iommu.c index d151ce73f1a9..ace74ec22db6 100644 --- a/sys/sparc64/sparc64/iommu.c +++ b/sys/sparc64/sparc64/iommu.c @@ -118,7 +118,7 @@ __FBSDID("$FreeBSD$"); /* Threshold for using the streaming buffer */ #define IOMMU_STREAM_THRESH 128 -MALLOC_DEFINE(M_IOMMU, "dvmamem", "IOMMU DVMA Buffers"); +static MALLOC_DEFINE(M_IOMMU, "dvmamem", "IOMMU DVMA Buffers"); static int iommu_strbuf_flush_sync(struct iommu_state *); #ifdef IOMMU_DIAG diff --git a/sys/x86/acpica/acpi_apm.c b/sys/x86/acpica/acpi_apm.c index 776b1be602a1..e24e5e16293b 100644 --- a/sys/x86/acpica/acpi_apm.c +++ b/sys/x86/acpica/acpi_apm.c @@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$"); static int apm_active; static struct clonedevs *apm_clones; -MALLOC_DEFINE(M_APMDEV, "apmdev", "APM device emulation"); +static MALLOC_DEFINE(M_APMDEV, "apmdev", "APM device emulation"); static d_open_t apmopen; static d_close_t apmclose; diff --git a/sys/x86/acpica/madt.c b/sys/x86/acpica/madt.c index 13bbb554920e..f464f594a362 100644 --- a/sys/x86/acpica/madt.c +++ b/sys/x86/acpica/madt.c @@ -65,7 +65,7 @@ static ACPI_TABLE_MADT *madt; static vm_paddr_t madt_physaddr; static vm_offset_t madt_length; -MALLOC_DEFINE(M_MADT, "madt_table", "ACPI MADT Table Items"); +static MALLOC_DEFINE(M_MADT, "madt_table", "ACPI MADT Table Items"); static enum intr_polarity interrupt_polarity(UINT16 IntiFlags, UINT8 Source); static enum intr_trigger interrupt_trigger(UINT16 IntiFlags, UINT8 Source); -- cgit v1.2.3