From nobody Sat Jul 25 21:59:35 2026 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [160.30.148.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8029E382397 for ; Mon, 13 Jul 2026 06:39:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=160.30.148.35 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783924742; cv=none; b=mAGEMpZYTXxcNEULs0smkUZ4lO0xD0U1lCs4+HIyQGPNXBKPnri5iLfmfaeM3rxoQR2KEw1K+Vc9Jx9MCIIrAOsIejcBlY5zVJzE0Qsmv+dko03RE+5eldAoVGtOUIWx/I2LlgM3+aq8Y+HmAbqV/yVY6jrTjMn9hYd+ZKqFXvA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783924742; c=relaxed/simple; bh=cvXnCjj0ige6H3TUyZnd83JxwcE9dRVY941lfwlmmNI=; h=Message-ID:In-Reply-To:References:Date:Mime-Version:From:To:Cc: Subject:Content-Type; b=iRnw7m8ZCN2A4QvSeqY9UDghpoK8KbDHd5M4h6DmpGj2AE6HG9kD847qCHsgj4pRyz1NKr7YxgQUmkHO6SnVkh2x7B2kxOucR7UMS35dvmOUID10f+0aUWAqjo4sP7deFZWxV2F/SBVXMllIyAAO8lTwfqQCu0wttIiqsjG2FJ0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zte.com.cn; spf=pass smtp.mailfrom=zte.com.cn; arc=none smtp.client-ip=160.30.148.35 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zte.com.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zte.com.cn Received: from mse-fl2.zte.com.cn (unknown [10.5.228.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mxhk.zte.com.cn (FangMail) with ESMTPS id 4gzCSz1KsXz8Xrrb; Mon, 13 Jul 2026 14:38:59 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.99.176]) by mse-fl2.zte.com.cn with SMTP id 66D6crWj030739; Mon, 13 Jul 2026 14:38:53 +0800 (+08) (envelope-from xu.xin16@zte.com.cn) Received: from mapi (xaxapp02[null]) by mapi (Zmail) with MAPI id mid32; Mon, 13 Jul 2026 14:38:54 +0800 (CST) X-Zmail-TransId: 2afa6a5487fe820-68812 X-Mailer: Zmail v1.0 Message-ID: <20260713143854774IDQ756lKhFqhw7CX1qaXc@zte.com.cn> In-Reply-To: <20260713143534964Cml5-QLfcPMDtbbq_j7tG@zte.com.cn> References: 20260713143534964Cml5-QLfcPMDtbbq_j7tG@zte.com.cn Date: Mon, 13 Jul 2026 14:38:54 +0800 (CST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 From: To: , , Cc: , , , , , , , , , , , , , Subject: =?UTF-8?B?bW0vbW1fc2xvdC5oOiBjbGVhbiB1cCBtYWNybyBwYXJhbWV0ZXIgbmFtZXMgaW4gbW1fc2xvdF9sb29rdXAoKSBhbmQgbW1fc2xvdF9pbnNlcnQoKQ==?= X-MAIL: mse-fl2.zte.com.cn 66D6crWj030739 X-TLS: YES X-ENVELOPE-SENDER: xu.xin16@zte.com.cn X-SOURCE-IP: 10.5.228.133 unknown Mon, 13 Jul 2026 14:38:59 +0800 X-CLEAN: YES X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 6A548803.000/4gzCSz1KsXz8Xrrb Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: xu xin Clean up the names by replacing _foo with foo, and document why they cannot be static inline. Suggested-by: Lorenzo Stoakes Signed-off-by: xu xin --- mm/mm_slot.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/mm/mm_slot.h b/mm/mm_slot.h index 5de3e91d86b4..710c70166c79 100644 --- a/mm/mm_slot.h +++ b/mm/mm_slot.h @@ -33,12 +33,17 @@ static inline void mm_slot_free(struct kmem_cache *cach= e, void *objp) kmem_cache_free(cache, objp); } -#define mm_slot_lookup(_hashtable, _mm) \ +/* + * Note: mm_slot_lookup and mm_slot_insert cannot be converted to static i= nline + * functions because hash_for_each_possible relys on the actual array argu= ment + * 'hashtable' for sizeof() instead of pointers. + */ +#define mm_slot_lookup(hashtable, mm) \ ({ \ struct mm_slot *tmp_slot, *mm_slot =3D NULL; \ \ - hash_for_each_possible(_hashtable, tmp_slot, hash, (unsigned long)_mm) \ - if (_mm =3D=3D tmp_slot->mm) { \ + hash_for_each_possible(hashtable, tmp_slot, hash, (unsigned long)mm) \ + if (mm =3D=3D tmp_slot->mm) { \ mm_slot =3D tmp_slot; \ break; \ } \ @@ -46,10 +51,10 @@ static inline void mm_slot_free(struct kmem_cache *cach= e, void *objp) mm_slot; \ }) -#define mm_slot_insert(_hashtable, _mm, _mm_slot) \ +#define mm_slot_insert(hashtable, mm, mm_slot) \ ({ \ - _mm_slot->mm =3D _mm; \ - hash_add(_hashtable, &_mm_slot->hash, (unsigned long)_mm); \ + mm_slot->mm =3D mm; \ + hash_add(hashtable, &mm_slot->hash, (unsigned long)mm); \ }) static inline void mm_slot_remove(struct mm_slot *slot) --=20 2.25.1