From nobody Tue Sep 03 10:27:27 2024 X-Original-To: dev-commits-src-all@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 4WyhdX2YhJz5MkhT; Tue, 03 Sep 2024 10:27:28 +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 4WyhdW5zdFz4t8P; Tue, 3 Sep 2024 10:27:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725359247; 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=Lo2Eyw6gDTtNEGQ2oipgxL/KJneIufdg5olvRjBkpB8=; b=Q8CQbTS7N4bJepKyPCpRcYDczXz0wI9cRlwQ6PbJ/6VIV+xDIBuXmfPuJUy1TFw2btyTsb 4ktXq2aBL5FGF8YV9Qa+S4oIsL35lIBlaZB0jSqhenAc7OtA+Jrs9BjNkNvpt8HN4KRBjJ sD7GiwVboJ07SiyrmtWq4ce8n8nkT6sxgFTsTQSpv/4/7CIPOcOCPbIW1vtZFBT92VODeJ JzEMa2drP8xDbS1MLThOAnjZx6u8gWIGgmgWT4MdJc4IFJXYPjlIjWl132TIdnlJ+afaGu RqUD31KgBsWboJHYtkGbxx1DUY3kvpZHIo4xSiru8RDUBjJjz5/KNIOr7aGkng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725359247; a=rsa-sha256; cv=none; b=P8gMlu+hx4CYUeClmPl8/teKjWV+nsr6PH0TRwMvTzUzMPcUcyu3TB/LASi8izgpryK3k/ /7harwcgemF0V8FYyJhAoCQS25sOsGlnqiyAYwrHAziq7hS2NzVIpHe+0fzhHtnqsCwrQn n/8BwERWjObsqCC3v5N0YOa8vArEHcVvRI9Hlfhbru5ucacl38q8SYEeRwrc5rj2ZYKMch 7UJLingBnx3q55mAJ04kZ8Ip7p+STNO+3tvexTWX8I4SzqETmYrUzLQf8fkqckgfsJYZfV K6eQFKYcj60OZV2dZZikM5oFVpe6bngBMflOeH44s0eUzjTbAfqwCGKtb4Na4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725359247; 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=Lo2Eyw6gDTtNEGQ2oipgxL/KJneIufdg5olvRjBkpB8=; b=Msg5b5cAsZu+13g5mttORjtwi+In0mH9xfck3+IATjZ9l1UNzdQMZTPCOWFqEptR9sLVSh c39b+LF9QE+LHoFtRfcJP7R5tvUo7IdN3r5pFy+Bhwg16UULk2qGzNf2F8svuZsO9160SM 8BvX3D58R1I/raVo7wSu5cg3rHfQU55RoqNXvL/ngwuHzyuy6bXuvktOgeLhcfZ0aAHHDC nSEw3JneejMwaSUYUDaLEoPZwHfRttNDP8vyq431sUNPT6tY30j33Kmw9V/VAqrepf0L1p C1NCLsluBmEPguMjnXF9gm/OKnmRaaTxBG1IgMQ1CNnYA78K6NUyAbLyDcIePw== 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 4WyhdW5WHwzcxs; Tue, 3 Sep 2024 10:27:27 +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 483ARRBS010705; Tue, 3 Sep 2024 10:27:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 483ARRbC010702; Tue, 3 Sep 2024 10:27:27 GMT (envelope-from git) Date: Tue, 3 Sep 2024 10:27:27 GMT Message-Id: <202409031027.483ARRbC010702@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 866dc4bd8139 - main - qat(4): Stop checking for failures from malloc(M_WAITOK) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 866dc4bd81398b478daefe4b7447b92422b4a06c Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=866dc4bd81398b478daefe4b7447b92422b4a06c commit 866dc4bd81398b478daefe4b7447b92422b4a06c Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:32 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-03 10:25:32 +0000 qat(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 --- 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);