Message ID | 20240208021423.15704-1-richard.weiyang@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-57384-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp2636783dyb; Wed, 7 Feb 2024 18:15:29 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWCFsigHLsW2lZQRakBxi2dR9V/o7AMapWt5+Ub1mtbX2SzoV23a2pkoWi74vxiQp3MMX+DXBJM2E3u0ayx9KQaSkufUA== X-Google-Smtp-Source: AGHT+IE1dL/21mfgja6P3ajQOZ6P35eOtxIPTNU7M34O4JxCGfKWJSocbIwat/U76/EwRRAWcMAT X-Received: by 2002:a05:6a20:8698:b0:19c:93c2:7ef3 with SMTP id k24-20020a056a20869800b0019c93c27ef3mr4908062pze.46.1707358529269; Wed, 07 Feb 2024 18:15:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707358529; cv=pass; d=google.com; s=arc-20160816; b=vdHI7birNWU/AsgcNPdwYKw28adbGXUoAzYM/ZQRKFGAymgUktl3yct4mcZsTpnmSK 2ij22y2m5fJ20Gau4/Ns/51opjtDXIhjTdjUCs1G6dm6aSjSA+ETbw7Yqr3HiTLvZ9XF Q1Hs+8aww2tk0VwOV6KtI0Cji2psNhw9qt1zhMuZq/VXI5mguLbibXU5vU3DYQjonY9N kObzNF9lb6WjYHEyLSV2jvIBVe2K4QKIXpxB0nORgqqrFLgklV2clzR7COQQ1XeaDNPt HUHmMo9PQIB7ciTX4eYY9kUbCifxiYt0g5QaINCcyP8P9cF9bIQmazERHmuQwQNH8Yp+ Si4A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:message-id:date :subject:cc:to:from:dkim-signature; bh=uqBzT3onXCur0xX254jJErRIXH3jmw1EamFLcd9YzN4=; fh=AfzDN2aG2IhsE6zZIOwqE+DLFFP8+mBuljC7TZk1kHw=; b=lAGKxgvvokGw2EVR2i2MYjSVjQV/yVU8u1jmYxPGmBy8NMDkMh6F8Al+Q/QA5vVSLJ Z4+sLdHG/BJqxRbdS3YgZEJJV7HI5H66ELlf2Ntw23xf2Ww4uAqtV3kLrKcDmdYq4s9a tFGGZDhC+pDMc+7fJQtkybEqQMSYSjQMrw6aQVsJWoRHdV/jCM/1b3cXqYA7mFqJyzkd O63QXWHbV/VXU2GJ7zAySbvIrJ6eGOgCGSLvXuqDK9o+eLlx95lAW62h+li2ZUZXooHo BUkReYbhFHnAPiIZzTgmLjf6bU6V4zOumdIez9L+BgnpDnhTffgVcBAdsZuhqBJBUSRS wn2Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Tb7BB+XA; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-57384-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57384-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com X-Forwarded-Encrypted: i=2; AJvYcCVphsiz7hz+79q0O6Dw49i9h6QuNJSSEn+EIKgb9cm7Kg5cG9SwQ35RmhrOJhJaad4LUHdy9GOznqvw9FJTg5kfAhFkDw== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id g6-20020aa79f06000000b006d9b4ee5b2fsi2828438pfr.12.2024.02.07.18.15.29 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 18:15:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57384-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Tb7BB+XA; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-57384-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57384-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1066A285454 for <ouuuleilei@gmail.com>; Thu, 8 Feb 2024 02:15:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B90251E86C; Thu, 8 Feb 2024 02:15:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Tb7BB+XA" Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6B2C41CD33 for <linux-kernel@vger.kernel.org>; Thu, 8 Feb 2024 02:15:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707358514; cv=none; b=YKcLZk22znhnnDql9SEGHiBbPPlhju3fXwtbFQ6wJWaGkoPQUN09kYSlXZngU0sKAwyBinK2sicgfeB8RYGVV3mGJbcqyHgNFi313aWbXdg4j1sipQ7l/lQ4nb4yKDjYgwgrtkZIQXHIIjEyJbU9WoVWilUIPxxD0X7D5adycw8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707358514; c=relaxed/simple; bh=5jxQ7rp3f0TfsHJmSsqDidV/zOA9QMWktfKvmoRDLc8=; h=From:To:Cc:Subject:Date:Message-Id; b=QOIieDerG9+YoYbo4BX7EfNr5kcGfi/1cRoGhQSAlAjYGE8lF6+0c9nNzZ1LtN//1ZYyZfOEM4Q3x+kBlzkLfrXzLkVVcUc+7WW08HQuH0Y29aJgJGz1WETmmfy5deAOCuMcQZqNLHaQ3Z0IDzfRFfXu/uuzu7NGIhXkudhyN7Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Tb7BB+XA; arc=none smtp.client-ip=209.85.218.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-a38392b9917so175008366b.1 for <linux-kernel@vger.kernel.org>; Wed, 07 Feb 2024 18:15:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707358510; x=1707963310; darn=vger.kernel.org; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uqBzT3onXCur0xX254jJErRIXH3jmw1EamFLcd9YzN4=; b=Tb7BB+XAnN5jnja119O5lz0O1/S9lV/Ud44F91OQ8GpJ8ByFIaIUR0bIHo9dk+laoG rr6g+htvlnAqk5I5GSG3/zWIUeAEUbWch5eJWNsoWWJDbXcIq7bvJW8xJQGcVnzPu5zQ vy5FqKDuEhuH0Ofw7tMB7MsJa7lcw2GEZSfnPtb1wWeVhAhXpzdt/CjUsZeB2R1fhm4M uAUEGpkqlMF0KQi8WQPZIAkwETz2RXT7WQpwZbpU5nhBLOhSVCnjh8vDclfAi0swLmvO QP9Xnz0IfL7wnnLMgt/+15fafJkn7Bb/GYN6XZkgHd8UL26BQ6gHr1yaAgOYZwFKm0Uy Jx5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707358510; x=1707963310; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uqBzT3onXCur0xX254jJErRIXH3jmw1EamFLcd9YzN4=; b=jf2S/eSjnYeTGlJuNLCt+HZaH+pNHl2OM3tqWZaSL0hMN4Zmd0LLwqXsfGaTzI+0tP Kif3iHAIeuo9Vlo1SH1O8EB/XmcgpQE9CeSVMz68nzeb9LOLp6xS7C79Sm2yn7QJsD6f +By3JmBLt5/8NV3O8FluWkpm8efkYspQwzHDEaU65cHKDWVPHC8jJXZCgESFrcOe6uMV g8IPGCxVD5hgeIESVTlnFJzYQ5HH7n3RevmJY1SkaFWgEwYEmZVB66ri4z3UPmD6FNYJ nUlVb8rLStTYNc1XnQc3SfRKSCWLHYkGQGrgxfYiK/I0xqQhz/dJPwGNv9O1i/ZBomVO 3Mow== X-Gm-Message-State: AOJu0Ywtw8GU5h3phIEMkX2iY5hoerAQeqxh7YHkqvejhv2W6J21feVD Jo367aiTCOiBWSoB5Bqca3bu2MMRMiyoaMMzFIjp07jGh8vYxtOTa92ETgGolUM= X-Received: by 2002:a17:906:e085:b0:a3b:a2c0:5013 with SMTP id gh5-20020a170906e08500b00a3ba2c05013mr206142ejb.41.1707358510483; Wed, 07 Feb 2024 18:15:10 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCW4Dw7O+E8AuHda3gfIDvoRpUdSUClgAqA/qeaRGKS/QrPpJXPuYBRA3TD7Qvsy5ucf+CJa1pnSqurNC4Gm5QOxN1IUpLctefmnFduYPI50bpyOAd6u6eQvNLXh9qN7A6b9/Pq5/jGMewyR6AIXvixtiZ8YfLhTZ1xidoLnmvtslNJoyoBsb6c= Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id e18-20020a170906045200b00a379cc90bdesm1368447eja.199.2024.02.07.18.15.09 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Feb 2024 18:15:09 -0800 (PST) From: Wei Yang <richard.weiyang@gmail.com> To: elver@google.com Cc: linux-kernel@vger.kernel.org, Wei Yang <richard.weiyang@gmail.com>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Andrew Morton <akpm@linux-foundation.org> Subject: [PATCH] list: leverage list_is_head() for list_entry_is_head() Date: Thu, 8 Feb 2024 02:14:23 +0000 Message-Id: <20240208021423.15704-1-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790295177079278629 X-GMAIL-MSGID: 1790295177079278629 |
Series |
list: leverage list_is_head() for list_entry_is_head()
|
|
Commit Message
Wei Yang
Feb. 8, 2024, 2:14 a.m. UTC
This is what list_is_head() exactly do.
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
CC: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
CC: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/list.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/list.h b/include/linux/list.h index 059aa1fff41e..3dca3760f726 100644 --- a/include/linux/list.h +++ b/include/linux/list.h @@ -766,7 +766,7 @@ static inline size_t list_count_nodes(struct list_head *head) * @member: the name of the list_head within the struct. */ #define list_entry_is_head(pos, head, member) \ - (&pos->member == (head)) + list_is_head(&pos->member, (head)) /** * list_for_each_entry - iterate over list of given type