From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4C811EB64DC for ; Mon, 3 Jul 2023 05:48:51 +0000 (UTC) Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.96) (envelope-from ) id 1qGCPn-0007kM-2s; Mon, 03 Jul 2023 01:47:59 -0400 Received: from mscreen.etri.re.kr ([129.254.9.16]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA (Exim 4.96) (envelope-from ) id 1qGCPf-0007M3-1B for kernelnewbies@kernelnewbies.org; Mon, 03 Jul 2023 01:47:57 -0400 Received: from unknown (HELO send002-relay.gov-dooray.com) (211.180.235.153) by 129.254.9.16 with ESMTP; 3 Jul 2023 14:47:34 +0900 X-Original-SENDERIP: 211.180.235.153 X-Original-MAILFROM: ckim@etri.re.kr X-Original-RCPTTO: kernelnewbies@kernelnewbies.org Received: from [10.162.225.106] (HELO smtp001-imp.gov-dooray.com) ([10.162.225.106]) by send002-relay.gov-dooray.com with SMTP id 0345d5d564a260f6; Mon, 03 Jul 2023 14:47:34 +0900 DKIM-Signature: a=rsa-sha256; b=Opv894Mhjfx19tvErxBglJmrOboJ0azmbOj2RhbExoun6uLDKFHTNLPsHesdRlG1wo67UO3QZV 8C2Zvfc0wEtObsC0jcfiQl+aYbQu0iW16occU0B4u99YX9KcqnzDGzbY/R1qfQKp5h7a+6CoGYr/ El4ScrGldE+xWAwAqRX3p9GsAwg2oJceJMYdT3y/wa7YLdcCFFMxXlStP8nC0ah63afc3nbrx8/U k7gw+uq9OmI0AtoZVWaxJ02rqQ6R0pbOqxxD2HDrANc6jtNMAQi00slV9haTrk+dz26BTYsMMuSO TLPwzT5inZeVQfCsp/0EneGUx/ZO4q/0Bs0w8YQA==; c=relaxed/relaxed; s=selector; d=dooray.com; v=1; bh=S/qyz3xScNJ375iCBO25DjZRgNgSYoelkWS/0P0aJFk=; h=From:To:Subject:Message-ID; Received: from [129.254.132.39] (HELO CHANKIMPC) ([129.254.132.39]) by smtp001-imp.gov-dooray.com with SMTP id 2f84b1e664a260f5; Mon, 03 Jul 2023 14:47:34 +0900 From: "Chan Kim" To: Subject: About the name of 'struct list_head', how about giving an alias for differentiating the usage? Date: Mon, 3 Jul 2023 14:47:32 +0900 Message-ID: <03b601d9ad71$dccecb70$966c6250$@etri.re.kr> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Content-Language: ko Thread-Index: Admtcduklq/uiW9mR8CKPX2fZZ/nIg== X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org Hello all, Often when I analyze linux source code, it takes me some time to figure out how a list_head member of a struct is being used. Sometimes it points to a linked list's start member, but sometimes it used to link the containing struct as a member of linked list.(you know we cat get the struct in the linked list using container_of operator). Wouldn't it be nice if we give list_head an alias like 'list_hook_head' (or just list_hook) so that the alias can be used for the second case? By gradually changing the type name to list_hook_head in some structs, we could make the source code more easier to read. I hope someone do this someday.. Thank you. Chan Kim _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies