Date: Mon, 30 Sep 2024 05:08:19 GMT From: Zhenlei Huang <zlei@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 09491167a541 - stable/13 - cxgb(4): Stop checking for failures from malloc/buf_ring_alloc(M_WAITOK) Message-ID: <202409300508.48U58JpJ024861@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=09491167a54120caf95822500e440ead964b5bb7 commit 09491167a54120caf95822500e440ead964b5bb7 Author: Zhenlei Huang <zlei@FreeBSD.org> AuthorDate: 2024-09-03 10:25:25 +0000 Commit: Zhenlei Huang <zlei@FreeBSD.org> CommitDate: 2024-09-30 05:05:34 +0000 cxgb(4): Stop checking for failures from malloc/buf_ring_alloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit bb51f7c8a48a4cd5dfa67fefa81f3d5d199da92b) (cherry picked from commit 9216ba1853b76185c85abccbf338f2e4ea71a238) --- sys/dev/cxgb/cxgb_main.c | 4 +--- sys/dev/cxgb/cxgb_sge.c | 7 ++----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/sys/dev/cxgb/cxgb_main.c b/sys/dev/cxgb/cxgb_main.c index ba3a065cf806..8c817d751cdc 100644 --- a/sys/dev/cxgb/cxgb_main.c +++ b/sys/dev/cxgb/cxgb_main.c @@ -2485,9 +2485,7 @@ set_eeprom(struct port_info *pi, const uint8_t *data, int len, int offset) aligned_len = (len + (offset & 3) + 3) & ~3; if (aligned_offset != offset || aligned_len != len) { - buf = malloc(aligned_len, M_DEVBUF, M_WAITOK|M_ZERO); - if (!buf) - return (ENOMEM); + buf = malloc(aligned_len, M_DEVBUF, M_WAITOK | M_ZERO); err = t3_seeprom_read(adapter, aligned_offset, (u32 *)buf); if (!err && aligned_len > 4) err = t3_seeprom_read(adapter, diff --git a/sys/dev/cxgb/cxgb_sge.c b/sys/dev/cxgb/cxgb_sge.c index 9d6d181ce64e..de1c1928f350 100644 --- a/sys/dev/cxgb/cxgb_sge.c +++ b/sys/dev/cxgb/cxgb_sge.c @@ -2422,11 +2422,8 @@ t3_sge_alloc_qset(adapter_t *sc, u_int id, int nports, int irq_vec_idx, q->port = pi; q->adap = sc; - if ((q->txq[TXQ_ETH].txq_mr = buf_ring_alloc(cxgb_txq_buf_ring_size, - M_DEVBUF, M_WAITOK, &q->lock)) == NULL) { - device_printf(sc->dev, "failed to allocate mbuf ring\n"); - goto err; - } + q->txq[TXQ_ETH].txq_mr = buf_ring_alloc(cxgb_txq_buf_ring_size, + M_DEVBUF, M_WAITOK, &q->lock); if ((q->txq[TXQ_ETH].txq_ifq = malloc(sizeof(struct ifaltq), M_DEVBUF, M_NOWAIT | M_ZERO)) == NULL) { device_printf(sc->dev, "failed to allocate ifq\n");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202409300508.48U58JpJ024861>