From nobody Mon Sep 30 04:45:48 2024 X-Original-To: dev-commits-src-branches@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 4XH7ms1sXsz5XkJL; Mon, 30 Sep 2024 04:45:49 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XH7mr68vCz4FkN; Mon, 30 Sep 2024 04:45:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671548; 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=evoAirIiEmAPDDhBvLpLB8MA2JZp7aF55SUT8VFbmb8=; b=LF/EiVJNgmsT9UB48uFsjd+Ezj9Lx/R8/yF9tyolTns/4Hg7Vg52Hs4zos3lH+07malxeC Zd2ohyzCl87R5CVQo0j/3UpvLj/SELNcNZJGNFds84/sysrwruNviz/rnPsIQ/H7oPva7y cmYuNe26sWLhN4QKJx1H69nZPu2lx/DcfVuHRoOc3LlFrXUalbGgcn2jr8Ujc5CtxzRgBL 6Lw+a4B0z42xCUYhKkaNbybOrritcEi86999QoWg5TMORrtsFZCvHJv23CqsDJxTHHECpj 1nfGdsDZhEvdjVPkmb/m3v5Y58l16ugJU47yWXVmedSgJVIBwt963TaMIaxFng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727671548; 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=evoAirIiEmAPDDhBvLpLB8MA2JZp7aF55SUT8VFbmb8=; b=M47obyoq0NqcDdgY63dDmLxzHDWaQ8hSr6J1OHlAR1vOy2MyWQw5Q4gEYQDWOejv6wlIDI 1nP7X3hKqRmy10hwNbA+R0Zs4DtWknWiDWnJ2ZRbhE3DZu2VgLvS2DTxIQ7SlCpMhF5ylE h2GCCBUZ6VLK8PFNuJpWx3c9PjRBKUhyHB+biXIVt1h2pHh5EjY5aqrLoXtpoKgWjk4eDA vRQo9eu+FfSKrCF1tcpfHFDzP1n8RCR2WT086u9k+YU5mcQQmdlxJj2RyAFRpRdr+Z3m/g myYbarBIrunTXyXjHBuZYvJzGhmntsUN7PN2px2qfma65hefg27kVqRC3pkrWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727671548; a=rsa-sha256; cv=none; b=eYDfcXl1p+oLnlQg6BtruIRT1traIOiHh3fyjmnMFH+gAJdfAu9lv5BUmXuds1ILUyhPSs DXHvzWZCtvBPxvo3zlsPpqRKGxISZN8OQxtYIesJGM16lcA1i7LsxFOqh8yJmu/7MczQmj TilwtRoyE88H7J0sxKjyoaNO2t8mkl5wU5mG7gVapBXpn559+RaxgdGOqfQU1i0+ROqEQS sdAxXbgSRSU+aODhNPCyrN6F+YPF1IPG//i51aJkjKEb2HKOdtFJJooGUjlm5Uj0R93H4L sm53nMTt3bFWvyOjBVQb8NAAfGyWICvOaSeOzhxW5kn48Uc8apUcSWiPn4VzZg== 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 4XH7mr5fpfzfbl; Mon, 30 Sep 2024 04:45:48 +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 48U4jmRa087997; Mon, 30 Sep 2024 04:45:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48U4jmeu087994; Mon, 30 Sep 2024 04:45:48 GMT (envelope-from git) Date: Mon, 30 Sep 2024 04:45:48 GMT Message-Id: <202409300445.48U4jmeu087994@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: a1075ea2a314 - stable/14 - qat(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a1075ea2a31428daac5e7308630ec68a8d4dbf6d Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=a1075ea2a31428daac5e7308630ec68a8d4dbf6d commit a1075ea2a31428daac5e7308630ec68a8d4dbf6d Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:32 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-30 04:44:26 +0000 qat(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 866dc4bd81398b478daefe4b7447b92422b4a06c) --- sys/dev/qat/qat_common/adf_freebsd_dev_processes.c | 8 -------- sys/dev/qat/qat_common/adf_freebsd_uio.c | 8 -------- sys/dev/qat/qat_common/adf_freebsd_uio_cleanup.c | 3 --- sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c | 5 ----- 4 files changed, 24 deletions(-) diff --git a/sys/dev/qat/qat_common/adf_freebsd_dev_processes.c b/sys/dev/qat/qat_common/adf_freebsd_dev_processes.c index b8a17344bdea..a70f25d57dcb 100644 --- a/sys/dev/qat/qat_common/adf_freebsd_dev_processes.c +++ b/sys/dev/qat/qat_common/adf_freebsd_dev_processes.c @@ -146,8 +146,6 @@ adf_processes_open(struct cdev *dev, int oflags, int devtype, struct thread *td) return ENXIO; } prv_data = malloc(sizeof(*prv_data), M_QAT, M_WAITOK | M_ZERO); - if (!prv_data) - return ENOMEM; INIT_LIST_HEAD(&prv_data->list); error = devfs_set_cdevpriv(prv_data, adf_processes_release); if (error) { @@ -573,14 +571,8 @@ adf_state_open(struct cdev *dev, int oflags, int devtype, struct thread *td) int ret = 0; prv_data = malloc(sizeof(*prv_data), M_QAT, M_WAITOK | M_ZERO); - if (!prv_data) - return -ENOMEM; entry_proc_events = malloc(sizeof(struct entry_proc_events), M_QAT, M_WAITOK | M_ZERO); - if (!entry_proc_events) { - free(prv_data, M_QAT); - return -ENOMEM; - } mtx_lock(&mtx); prv_data->cdev = dev; prv_data->cdev->si_drv1 = prv_data; diff --git a/sys/dev/qat/qat_common/adf_freebsd_uio.c b/sys/dev/qat/qat_common/adf_freebsd_uio.c index c109fc79b0f4..64efde72b4b8 100644 --- a/sys/dev/qat/qat_common/adf_freebsd_uio.c +++ b/sys/dev/qat/qat_common/adf_freebsd_uio.c @@ -199,10 +199,6 @@ adf_alloc_bundle(struct adf_accel_dev *accel_dev, int bundle_nr) accel = accel_dev->accel; handle = malloc(sizeof(*handle), M_QAT, M_WAITOK | M_ZERO); - if (!handle) { - printf("ERROR in adf_alloc_bundle %d\n", __LINE__); - return ENOMEM; - } handle->accel = accel; handle->bundle = bundle_nr; @@ -294,10 +290,6 @@ adf_uio_mmap_single(struct cdev *dev, /* Adding pid to bundle list */ instance_rings = malloc(sizeof(*instance_rings), M_QAT, M_WAITOK | M_ZERO); - if (!instance_rings) { - printf("QAT: Memory allocation error - line: %d\n", __LINE__); - return -ENOMEM; - } instance_rings->user_pid = curproc->p_pid; instance_rings->ring_mask = 0; mutex_lock(&bundle->list_lock); diff --git a/sys/dev/qat/qat_common/adf_freebsd_uio_cleanup.c b/sys/dev/qat/qat_common/adf_freebsd_uio_cleanup.c index 6fb4cf0bf2f7..954e31c683ce 100644 --- a/sys/dev/qat/qat_common/adf_freebsd_uio_cleanup.c +++ b/sys/dev/qat/qat_common/adf_freebsd_uio_cleanup.c @@ -123,9 +123,6 @@ get_orphan_bundle(int bank, orphan_bundle = malloc(sizeof(*orphan_bundle), M_QAT, M_WAITOK | M_ZERO); - if (!orphan_bundle) - return ENOMEM; - csr_base = accel->bar->virt_addr; orphan_bundle->csr_base = csr_base; orphan_bundle->bank = bank; diff --git a/sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c b/sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c index 05a99ae43ab7..9b66ae4b2370 100644 --- a/sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c +++ b/sys/dev/qat/qat_hw/qat_4xxxvf/adf_drv.c @@ -117,11 +117,6 @@ adf_attach(device_t dev) } /* Allocate and configure device configuration structure */ hw_data = malloc(sizeof(*hw_data), M_QAT_4XXXVF, M_WAITOK | M_ZERO); - if (!hw_data) { - ret = -ENOMEM; - goto out_err; - } - accel_dev->hw_device = hw_data; adf_init_hw_data_4xxxiov(accel_dev->hw_device); accel_pci_dev->revid = pci_get_revid(dev);