From nobody Tue Sep 03 10:27:28 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 4WyhdY2Cnrz5MkjY; Tue, 03 Sep 2024 10:27:29 +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 4WyhdX71lgz4tFG; Tue, 3 Sep 2024 10:27:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725359249; 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=1yhe4ayfJfp/x+wB593vOt5mSwzGDnnKT1LUZTbU02E=; b=iG9otWBPEFsOD9JBQYADDa64+fa422CnXB8nj5wEWEdyvhF83HN9fg7JK+teKs/iYX8mYV siOH+TYncUVBw3cgS1bHMmqhdW+44ryls7dCWshxhoR2uQgU7YJv64Q3kHknXfP5BQOmPy d3+C5rEZuojSkwrLeAmiSWDYmU42CzSIR2FCvzGAggFwDOEDasdxH5Xiti6oRFxoTz91mC +pGuzaqQmuhZ/roKDLdLZMCu+/mYDG0yO5kbsRyo5jey7Lp56ufkqPG8A9HITGrO4fGWLY u9yQSLCSkmwEg/z2KZ5e8AECHKVrQknWoJf8npgrVkRs+4jq9UDkuOT0HiSuAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725359249; a=rsa-sha256; cv=none; b=u4gUVfSu+Zwx7NS5AZv7sg8cL/B3AeWX+yeZTLTJPB9nDV9HNpG3vrHhAnf6FIYYqPrYDT idO7HsJ0NKmZucIo9aApKJFb1U5/SNJcE+KtWkRkB/hfosqrqgmidTaG7QcEurent/MwG4 Z0GQHWG9wyF+nc6Q7LPPdW6hmellFLbaIcRhb+kgdK0rbMWX1HAF3deI/sJR7qCRKQT0CA dpQGo4zpNQ5GaPDkQN71gBByw0QTChjnpzRdFWsV8rdDhmPILLhEYwBNSggwLkaSLEY5Na PoJCmmNKAUYpla5sH4Rw/ree8v5KvZu0TVadsU3nxwyjNLj3J6EcSBJtSEiCLg== 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=1725359249; 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=1yhe4ayfJfp/x+wB593vOt5mSwzGDnnKT1LUZTbU02E=; b=nxR+eFUoi2LyJn32Dys8mMDQPcnHpiTvkA5YmeLA6Om20XYFYT5kCQUKjRI1ZCZOyT+EOF mgkcCOT5JAqRkrFQUchypU4wVfO5F3K7fI9LyFNNQZCEFb2X3HyvPZMgOxikjdE6VUUDiK DJXFi5KOPextSNFYK5kmHx35QWDI+Va16KZUvBRpf5dvVKzL66vxoXuE8LRUcaNgog6bjN 24FR1rD2IXKZ3RHVkvX/gLmQaxmq50fnHvTPcVEIcJJmWCiybd9vMJoCLnneAbRY+IKdAo lYyITB4NCrHo3qYne0s7D9c+nrFxjdQeOFQMMxkxc5kMF9Fl495nntjCdEzZoQ== 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 4WyhdX6WfrzcbD; Tue, 3 Sep 2024 10:27:28 +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 483ARSYv010760; Tue, 3 Sep 2024 10:27:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 483ARS8K010757; Tue, 3 Sep 2024 10:27:28 GMT (envelope-from git) Date: Tue, 3 Sep 2024 10:27:28 GMT Message-Id: <202409031027.483ARS8K010757@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: 761339c5544a - main - sume(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: 761339c5544a360df9d3bab70675fea246eb6a83 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=761339c5544a360df9d3bab70675fea246eb6a83 commit 761339c5544a360df9d3bab70675fea246eb6a83 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:33 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-03 10:25:33 +0000 sume(4): Stop checking for failures from malloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 --- sys/dev/sume/if_sume.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/sys/dev/sume/if_sume.c b/sys/dev/sume/if_sume.c index 319853ac3c7a..7b2a27135e43 100644 --- a/sys/dev/sume/if_sume.c +++ b/sys/dev/sume/if_sume.c @@ -1195,16 +1195,11 @@ sume_probe_riffa_buffer(const struct sume_adapter *adapter, { struct riffa_chnl_dir **rp; bus_addr_t hw_addr; - int error, ch; + int ch; device_t dev = adapter->dev; - error = ENOMEM; *p = malloc(SUME_RIFFA_CHANNELS * sizeof(struct riffa_chnl_dir *), M_SUME, M_ZERO | M_WAITOK); - if (*p == NULL) { - device_printf(dev, "malloc(%s) failed.\n", dir); - return (error); - } rp = *p; /* Allocate the chnl_dir structs themselves. */ @@ -1212,11 +1207,6 @@ sume_probe_riffa_buffer(const struct sume_adapter *adapter, /* One direction. */ rp[ch] = malloc(sizeof(struct riffa_chnl_dir), M_SUME, M_ZERO | M_WAITOK); - if (rp[ch] == NULL) { - device_printf(dev, "malloc(%s[%d]) riffa_chnl_dir " - "failed.\n", dir, ch); - return (error); - } int err = bus_dma_tag_create(bus_get_dma_tag(dev), 4, 0,