From nobody Tue Sep 03 10:27:41 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 4Wyhdn4SD1z5Mkm8; Tue, 03 Sep 2024 10:27:41 +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 4Wyhdn2RvJz4tSG; Tue, 3 Sep 2024 10:27:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725359261; 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=KdSGyUtfQ7uPC0Div044p4o7SSJsbld0ZiH5rOFkvnA=; b=QhkzwK48iRaC4EidziSc1O4Kw3MqOPfhdPy0NdxBHp8+AXPgwGt1zwSooCQ7XScWqaLW7C tlrE4sDlzlWMkXvcQtb4V2Yyc5skFUTF9vyrSXCbgBh5K4nd0Q5+nwvbpxL/FiMa1WkABv Bdv+RqF5i/pHubQD0U48voz/oA8KzskH+j5PozFC0fuZPxCgdqF2wy6NzOnu5HgnChdtPr JeDLykjB9PI6cvahKcd3LmtxqLDodahiD0ojF/+mpZoyvjJwOXRpFKZ6g/AwVMhbgFfTb9 3wy8Iw1m0NkY2YHv2/156aPcriYvpC4HaRnjOLTO3kop899zBC7WEdo0qaJEbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725359261; a=rsa-sha256; cv=none; b=bF9y4ixhak5nUGqyov/wuaGlpf/qABIHkg5ailqMGqA65v58y5ZQSAtM3G0E6AvHGjDkax C/w2ue3xa23pg15/MBq2Tur1GaOzqw/36AZF14Qer6hEu0PZY6A4LScFgzE2K95QQsSVvJ MaOnOWAQ/cjivxo9cMfz5BLdu1spYhFi6YW4ZZy4LobetIcVIgb+Yf4Dl14lE90+JEb/Qs uQyIX3bpWhG9eWOsxyvz0IHyyDjIQ0rdUmHlQvvR6c/vKYPDZ6toyxD90usJ0CrN8k5R2/ qx3GZR5ZbujQ/1e7zJDYfi4vjr8XvITrDfGam29fw71XQDjvdS2pc3Blal3NQw== 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=1725359261; 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=KdSGyUtfQ7uPC0Div044p4o7SSJsbld0ZiH5rOFkvnA=; b=mYp84xTkAs1kTMoJubw7yzaR8yBeeXs4ZcheA65jSXUXSpmQ4DFGvC97B12dtZKuw/HAo8 MdZZAqqg5epABc7JKrvYpjidqZpnfHBmpw2wCIVffrnWawVf2TAYKBjghVwhPY4e9C6Htb K1Tzg4QmnqnuJoPDOoCLNNNc0TVY3oKXsFGWmV+qKK10PTDLsk05ro8iNwTb61wZbIaCt/ pmgS/C5v/P8qJAs8jaTcy30KGlWnFhHw6HmcujUync4z81GlPYL7pDKSVnc8zqW5+rxEnK PNhvlDIgRLo6nuJkUmL3gvCkMuYqsGNXMnmBKFry8ouf2zKoW64hwEWhFZqpbg== 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 4Wyhdn21NwzcbJ; Tue, 3 Sep 2024 10:27:41 +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 483ARfKN011316; Tue, 3 Sep 2024 10:27:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 483ARffk011313; Tue, 3 Sep 2024 10:27:41 GMT (envelope-from git) Date: Tue, 3 Sep 2024 10:27:41 GMT Message-Id: <202409031027.483ARffk011313@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: 36ef39831fe0 - main - dpaa2: Stop checking for failures from malloc/taskqueue_create(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: 36ef39831fe0e89f0b1672340a44c4ac1183158e Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=36ef39831fe0e89f0b1672340a44c4ac1183158e commit 36ef39831fe0e89f0b1672340a44c4ac1183158e Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:37 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-03 10:25:37 +0000 dpaa2: Stop checking for failures from malloc/taskqueue_create(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45853 --- sys/dev/dpaa2/dpaa2_channel.c | 7 ------- sys/dev/dpaa2/dpaa2_mc.c | 2 -- sys/dev/dpaa2/dpaa2_ni.c | 15 --------------- 3 files changed, 24 deletions(-) diff --git a/sys/dev/dpaa2/dpaa2_channel.c b/sys/dev/dpaa2/dpaa2_channel.c index 87b76923a16d..654c6f2baf70 100644 --- a/sys/dev/dpaa2/dpaa2_channel.c +++ b/sys/dev/dpaa2/dpaa2_channel.c @@ -146,12 +146,6 @@ dpaa2_chan_setup(device_t dev, device_t iodev, device_t condev, device_t bpdev, } ch = malloc(sizeof(struct dpaa2_channel), M_DPAA2_CH, M_WAITOK | M_ZERO); - if (ch == NULL) { - device_printf(dev, "%s: malloc() failed\n", __func__); - error = ENOMEM; - goto fail_malloc; - } - ch->ni_dev = dev; ch->io_dev = iodev; ch->con_dev = condev; @@ -281,7 +275,6 @@ fail_dma_setup: /* taskqueue_drain(ch->cleanup_tq, &ch->cleanup_task); */ /* } */ /* taskqueue_free(ch->cleanup_tq); */ -fail_malloc: (void)DPAA2_CMD_CON_DISABLE(dev, child, DPAA2_CMD_TK(&cmd, contk)); fail_con_enable: (void)DPAA2_CMD_CON_CLOSE(dev, child, DPAA2_CMD_TK(&cmd, contk)); diff --git a/sys/dev/dpaa2/dpaa2_mc.c b/sys/dev/dpaa2/dpaa2_mc.c index 66867a18068c..da8f8a077d6b 100644 --- a/sys/dev/dpaa2/dpaa2_mc.c +++ b/sys/dev/dpaa2/dpaa2_mc.c @@ -462,8 +462,6 @@ dpaa2_mc_manage_dev(device_t mcdev, device_t dpaa2_dev, uint32_t flags) return (EINVAL); di = malloc(sizeof(*di), M_DPAA2_MC, M_WAITOK | M_ZERO); - if (!di) - return (ENOMEM); di->dpaa2_dev = dpaa2_dev; di->flags = flags; di->owners = 0; diff --git a/sys/dev/dpaa2/dpaa2_ni.c b/sys/dev/dpaa2/dpaa2_ni.c index a21351a20b49..6ed656849709 100644 --- a/sys/dev/dpaa2/dpaa2_ni.c +++ b/sys/dev/dpaa2/dpaa2_ni.c @@ -588,11 +588,6 @@ dpaa2_ni_attach(device_t dev) /* Create a taskqueue thread to release new buffers to the pool. */ sc->bp_taskq = taskqueue_create(tq_name, M_WAITOK, taskqueue_thread_enqueue, &sc->bp_taskq); - if (sc->bp_taskq == NULL) { - device_printf(dev, "%s: failed to allocate task queue: %s\n", - __func__, tq_name); - goto close_ni; - } taskqueue_start_threads(&sc->bp_taskq, 1, PI_NET, "%s", tq_name); /* sc->cleanup_taskq = taskqueue_create("dpaa2_ch cleanup", M_WAITOK, */ @@ -1339,21 +1334,11 @@ dpaa2_ni_setup_tx_flow(device_t dev, struct dpaa2_ni_fq *fq) for (uint64_t j = 0; j < DPAA2_NI_BUFS_PER_TX; j++) { buf = malloc(sizeof(struct dpaa2_buf), M_DPAA2_TXB, M_WAITOK); - if (buf == NULL) { - device_printf(dev, "%s: malloc() failed (buf)\n", - __func__); - return (ENOMEM); - } /* Keep DMA tag and Tx ring linked to the buffer */ DPAA2_BUF_INIT_TAGOPT(buf, ch->tx_dmat, tx); buf->sgt = malloc(sizeof(struct dpaa2_buf), M_DPAA2_TXB, M_WAITOK); - if (buf->sgt == NULL) { - device_printf(dev, "%s: malloc() failed (sgt)\n", - __func__); - return (ENOMEM); - } /* Link SGT to DMA tag and back to its Tx buffer */ DPAA2_BUF_INIT_TAGOPT(buf->sgt, ch->sgt_dmat, buf);