From nobody Tue Sep 2 15:23:47 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cGTzR42Mhz66sXl; Tue, 02 Sep 2025 15:23:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cGTzR1wlGz3sd2; Tue, 02 Sep 2025 15:23:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1756826627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a/LTgOBQ92l2DTnp1YDYVWDv+JRR+R3K1BITmB3Yvsw=; b=rNujlzAUpiPO4vopO2HwCZfwZDMG1MzD+jJuAIgVJLlwQxFQU442Zq3besgct2d4a3z5Y/ CqqL0tXQx332RJfXZ00/Hp6FA+dP78/4Fy3bOwZmOx3iuZZwfnzmmJqQSVqDDxuvILbkHh memG+cjhI0CKcfirOuhmMf4OCY1etGMfAqV1TITRBN9+LQDaIldxUrNi9ddQc+e1eqFARU LTeEst3buvPBrbZe8ziuYuVXuD7f/Ecc06F0ZxppiOq23dHOUFYQYAAKy0Y7CsJbDHlhB1 /NKxgGpSvGJ51QGeqlAjq49y2d7Udf0IJCPxfuYikmb1AbQfwiMDLNdCN8uooA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1756826627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a/LTgOBQ92l2DTnp1YDYVWDv+JRR+R3K1BITmB3Yvsw=; b=BF2n2q6zQ9iU5M0ev9SpjWQGGDW7vvafW0b3aOPNrymSOsOZcNfmI1sC+fdxRMDB4ifKcd JO5bArY5tDDhBKi1OlPTDB74LoaeL4T7FPGuDWey+JNHHTBBpY3EIH29U36ayWLPqpb38J T5A0Ilfo1eWY9VBS9d1IFU1shPi/9X7Oa5mNlUz/YGXcSlZNJxTXDIZDAevWRBJS9GGe/0 j8BBFEn4TcVDlTG1dAJy8PmCkBZkxhZMYVe8VRJzTuLPlI1dJZtpDy+z0oWIHXIH0LsHPn Ekdys4M/80tEu0VHGXw9eS40N3qgAxtggjmTu6eNuPNT758fNN9DkuONDkpcnw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1756826627; a=rsa-sha256; cv=none; b=TgUqgvCiuye/5hQ1fqHkWqAbMnSXgvHrWuI9itZgGtLC7xC3p5oSTbBqS+p07iRSQ44QaJ ycqgZ2horGPbCTvQ5tZByDiVuqV8jRU0j3hT2y0Uqj3xTtS/GB6ZgxcrzZo1cD0zFxIHJd D2Avog/uCM73WY+yK0vbzaIAuyfQXORI0Ap3Xsvm45uxxsPkys/nB7NJHNkqHb8+Gm+bE4 Z3om6vvAF4UdBg8UnfXs/y2Z6QiOyYAHJkj3ah7IlfO/cS4KAbWXczooV8yZTDCZGbbH6g KJw2x0Yyra3A9HWy59yS4J+/CXRSpYTdE5Gyb5uRcSB/TW3njZMeMp8EGFgDAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cGTzR14JhzsSF; Tue, 02 Sep 2025 15:23:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 582FNlLu074615; Tue, 2 Sep 2025 15:23:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 582FNlp6074612; Tue, 2 Sep 2025 15:23:47 GMT (envelope-from git) Date: Tue, 2 Sep 2025 15:23:47 GMT Message-Id: <202509021523.582FNlp6074612@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: dd747d7bcb80 - main - Revert "stand: Use calloc instead of malloc for initialization of filesystem devsw" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dd747d7bcb808eb18385a527163054c874aa3c27 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=dd747d7bcb808eb18385a527163054c874aa3c27 commit dd747d7bcb808eb18385a527163054c874aa3c27 Author: Warner Losh AuthorDate: 2025-09-02 15:21:45 +0000 Commit: Warner Losh CommitDate: 2025-09-02 15:23:02 +0000 Revert "stand: Use calloc instead of malloc for initialization of filesystem devsw" This reverts commit dfafdbdfc3e9db8b878283bcbef35f5d8d37dae8. There's no author, and also problems with it. I'll redo it. Sponsored by: Netflix --- stand/common/disk.c | 2 +- stand/kboot/kboot/hostdisk.c | 2 +- stand/libofw/devicename.c | 2 +- stand/libsa/dev.c | 2 +- stand/libsa/zfs/zfs.c | 2 +- stand/uboot/devicename.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/stand/common/disk.c b/stand/common/disk.c index 1baf91efaa49..c1650f0fa1ec 100644 --- a/stand/common/disk.c +++ b/stand/common/disk.c @@ -468,7 +468,7 @@ disk_parsedev(struct devdesc **idev, const char *devspec, const char **path) if (*cp != '\0' && *cp != ':') return (EINVAL); - dev = calloc(sizeof(*dev), 1); + dev = malloc(sizeof(*dev)); if (dev == NULL) return (ENOMEM); dev->dd.d_unit = unit; diff --git a/stand/kboot/kboot/hostdisk.c b/stand/kboot/kboot/hostdisk.c index fc98bf534519..a9117d4c1c9d 100644 --- a/stand/kboot/kboot/hostdisk.c +++ b/stand/kboot/kboot/hostdisk.c @@ -465,7 +465,7 @@ hostdisk_parsedev(struct devdesc **idev, const char *devspec, const char **path) return (EINVAL); } free(fn); - dev = calloc(sizeof(*dev), 1); + dev = malloc(sizeof(*dev)); if (dev == NULL) return (ENOMEM); dev->d_unit = 0; diff --git a/stand/libofw/devicename.c b/stand/libofw/devicename.c index 46a9717fdda5..f6419632c6bc 100644 --- a/stand/libofw/devicename.c +++ b/stand/libofw/devicename.c @@ -98,7 +98,7 @@ ofw_common_parsedev(struct devdesc **dev, const char *devspec, const char **path if (ofw_path_to_handle(devspec, ofwtype, &rem_path) == -1) return (ENOENT); - idev = calloc(sizeof(struct ofw_devdesc), 1); + idev = malloc(sizeof(struct ofw_devdesc)); if (idev == NULL) { printf("ofw_parsedev: malloc failed\n"); return (ENOMEM); diff --git a/stand/libsa/dev.c b/stand/libsa/dev.c index 4f6932e96c48..1edc843d508c 100644 --- a/stand/libsa/dev.c +++ b/stand/libsa/dev.c @@ -72,7 +72,7 @@ default_parsedev(struct devdesc **dev, const char *devspec, int unit, err; char *cp; - idev = calloc(sizeof(struct devdesc), 1); + idev = malloc(sizeof(struct devdesc)); if (idev == NULL) return (ENOMEM); diff --git a/stand/libsa/zfs/zfs.c b/stand/libsa/zfs/zfs.c index 2f7c1caaa4b5..70a102f6425d 100644 --- a/stand/libsa/zfs/zfs.c +++ b/stand/libsa/zfs/zfs.c @@ -1643,7 +1643,7 @@ zfs_parsedev(struct devdesc **idev, const char *devspec, const char **path) spa = spa_find_by_name(poolname); if (!spa) return (ENXIO); - dev = calloc(sizeof(*dev), 1); + dev = malloc(sizeof(*dev)); if (dev == NULL) return (ENOMEM); dev->pool_guid = spa->spa_guid; diff --git a/stand/uboot/devicename.c b/stand/uboot/devicename.c index 23670d7593a2..4ee9c7fd72c4 100644 --- a/stand/uboot/devicename.c +++ b/stand/uboot/devicename.c @@ -102,7 +102,7 @@ uboot_parsedev(struct uboot_devdesc **dev, const char *devspec, } if (dv == NULL) return(ENOENT); - idev = calloc(sizeof(struct uboot_devdesc), 1); + idev = malloc(sizeof(struct uboot_devdesc)); err = 0; np = (devspec + strlen(dv->dv_name));