Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Jan 2024 22:39:47 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: b1f42294456d - stable/13 - sys: Style fix for M_EXT | M_EXTPG
Message-ID:  <202401182239.40IMdlF3009273@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=b1f42294456d7d3cb3724e1a9a79c0a89a51c24a

commit b1f42294456d7d3cb3724e1a9a79c0a89a51c24a
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2023-12-28 19:17:59 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2024-01-18 22:35:37 +0000

    sys: Style fix for M_EXT | M_EXTPG
    
    Add a space around the | operator in places testing for either M_EXT
    or M_EXTPG.
    
    Reviewed by:    imp, glebius
    Sponsored by:   Chelsio Communications
    Differential Revision:  https://reviews.freebsd.org/D43216
    
    (cherry picked from commit f7d5900aa063c6e9d19e6372ba981fc76aa326a2)
---
 sys/kern/uipc_mbuf.c          | 18 +++++++++---------
 sys/netinet/tcp_output.c      |  2 +-
 sys/netinet/tcp_pcap.c        |  2 +-
 sys/netinet/tcp_stacks/rack.c |  2 +-
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c
index 3c77b3eaf229..6d22e8e918a4 100644
--- a/sys/kern/uipc_mbuf.c
+++ b/sys/kern/uipc_mbuf.c
@@ -202,10 +202,10 @@ mb_dupcl(struct mbuf *n, struct mbuf *m)
 {
 	volatile u_int *refcnt;
 
-	KASSERT(m->m_flags & (M_EXT|M_EXTPG),
-	    ("%s: M_EXT|M_EXTPG not set on %p", __func__, m));
-	KASSERT(!(n->m_flags & (M_EXT|M_EXTPG)),
-	    ("%s: M_EXT|M_EXTPG set on %p", __func__, n));
+	KASSERT(m->m_flags & (M_EXT | M_EXTPG),
+	    ("%s: M_EXT | M_EXTPG not set on %p", __func__, m));
+	KASSERT(!(n->m_flags & (M_EXT | M_EXTPG)),
+	    ("%s: M_EXT | M_EXTPG set on %p", __func__, n));
 
 	/*
 	 * Cache access optimization.
@@ -535,7 +535,7 @@ m_copym(struct mbuf *m, int off0, int len, int wait)
 			copyhdr = 0;
 		}
 		n->m_len = min(len, m->m_len - off);
-		if (m->m_flags & (M_EXT|M_EXTPG)) {
+		if (m->m_flags & (M_EXT | M_EXTPG)) {
 			n->m_data = m->m_data + off;
 			mb_dupcl(n, m);
 		} else
@@ -577,7 +577,7 @@ m_copypacket(struct mbuf *m, int how)
 	if (!m_dup_pkthdr(n, m, how))
 		goto nospace;
 	n->m_len = m->m_len;
-	if (m->m_flags & (M_EXT|M_EXTPG)) {
+	if (m->m_flags & (M_EXT | M_EXTPG)) {
 		n->m_data = m->m_data;
 		mb_dupcl(n, m);
 	} else {
@@ -595,7 +595,7 @@ m_copypacket(struct mbuf *m, int how)
 		n = n->m_next;
 
 		n->m_len = m->m_len;
-		if (m->m_flags & (M_EXT|M_EXTPG)) {
+		if (m->m_flags & (M_EXT | M_EXTPG)) {
 			n->m_data = m->m_data;
 			mb_dupcl(n, m);
 		} else {
@@ -1036,7 +1036,7 @@ m_split(struct mbuf *m0, int len0, int wait)
 			n->m_pkthdr.rcvif = m0->m_pkthdr.rcvif;
 		n->m_pkthdr.len = m0->m_pkthdr.len - len0;
 		m0->m_pkthdr.len = len0;
-		if (m->m_flags & (M_EXT|M_EXTPG))
+		if (m->m_flags & (M_EXT | M_EXTPG))
 			goto extpacket;
 		if (remain > MHLEN) {
 			/* m can't be the lead packet */
@@ -1062,7 +1062,7 @@ m_split(struct mbuf *m0, int len0, int wait)
 		M_ALIGN(n, remain);
 	}
 extpacket:
-	if (m->m_flags & (M_EXT|M_EXTPG)) {
+	if (m->m_flags & (M_EXT | M_EXTPG)) {
 		n->m_data = m->m_data + len;
 		mb_dupcl(n, m);
 	} else {
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index 834bce35f5ba..ba559500552b 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -2103,7 +2103,7 @@ tcp_m_copym(struct mbuf *m, int32_t off0, int32_t *plen,
 		}
 		n->m_len = mlen;
 		len_cp += n->m_len;
-		if (m->m_flags & (M_EXT|M_EXTPG)) {
+		if (m->m_flags & (M_EXT | M_EXTPG)) {
 			n->m_data = m->m_data + off;
 			mb_dupcl(n, m);
 		} else
diff --git a/sys/netinet/tcp_pcap.c b/sys/netinet/tcp_pcap.c
index 1fdb039e00e3..05d0de6493b3 100644
--- a/sys/netinet/tcp_pcap.c
+++ b/sys/netinet/tcp_pcap.c
@@ -366,7 +366,7 @@ tcp_pcap_add(struct tcphdr *th, struct mbuf *m, struct mbufq *queue)
 	 * In cases where that isn't possible, settle for what we can
 	 * get.
 	 */
-	if ((m->m_flags & (M_EXT|M_EXTPG)) &&
+	if ((m->m_flags & (M_EXT | M_EXTPG)) &&
 	    tcp_pcap_take_cluster_reference()) {
 		n->m_data = m->m_data;
 		n->m_len = m->m_len;
diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c
index c3a24f4c19b6..3e3900844989 100644
--- a/sys/netinet/tcp_stacks/rack.c
+++ b/sys/netinet/tcp_stacks/rack.c
@@ -15102,7 +15102,7 @@ rack_fo_base_copym(struct mbuf *the_m, uint32_t the_off, int32_t *plen,
 		n->m_len = mlen;
 		soff += mlen;
 		len_cp += n->m_len;
-		if (m->m_flags & (M_EXT|M_EXTPG)) {
+		if (m->m_flags & (M_EXT | M_EXTPG)) {
 			n->m_data = m->m_data + off;
 			mb_dupcl(n, m);
 		} else {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202401182239.40IMdlF3009273>