Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp89923lqo; Tue, 7 May 2024 13:07:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVlNWWRtq72X5j8nd23dYVfzx/do/H9vP9foL+AAlVzMYSeL3CGBL0cg4wtiY4IlPX/gnqJeGpYnDMNORL0nmWV8S76kDpCvVlUHg6mUg== X-Google-Smtp-Source: AGHT+IF1U+dIcxAxSzlDBj6eF5QPessQEKGCo51DIdlNIUygxgeI8LV0geIL6FsogNjWqf8sBil3 X-Received: by 2002:a17:906:3407:b0:a59:cc9b:d6f8 with SMTP id a640c23a62f3a-a59fb958ba8mr29486766b.39.1715112470381; Tue, 07 May 2024 13:07:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715112470; cv=pass; d=google.com; s=arc-20160816; b=NZ+WHf1+KAce0SOr+s/4/Rnv/jt5gYTn6HJXSdT+qO/ANyvHPFMlbIO7iwDGrMpGhk BOEn53nvO9VwCG+hColcqoYVUOP8eiNoaAqXgdErIN2fh0eqzBWhg2dQFOzqPvYcu6+1 kQqnSLF8/5c5ypFNFmS0eP06DAV9GPeeM9dC4gNkbbTR0MLV/Vo6NdEzWzz5NWc8yEM9 9jDX+UWoEEC37qa98Tp63wQ6ohlk49IRer4OYeKJEoA+p6SDABoUR9JQ8DWzjWKssOxs QsOtTgMaiUhJbr2WuRhoS5b3ncyHxindjJvFUQldA74WP0IvMQKJ/ivgTwFGSE1x9FZM oHEA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=c7p/IrBxHwucBrOEVKQG7J/T+Iv+Q5m7uVCzbX5Mls4=; fh=uxBDUp9SSmWDRY8j39E45afy2uNX+S0CpivCgMtX5Ho=; b=Wdo2QttxxoO4kCRNsV6m0msctJbsmXLaSFi9StPfKs1aOgDAaHGDaCgC1Gb/9TIJRu RWMoiNWEmARN+hrDHlBxBPOWXtqStYieK87n5Yz187zIcfVdiUM4KCUh3cZJBSFdc54e sshgCl5OiNZoESlc9k8jUINwuLn18vmERwsw4/Q3ifj15oVWaNjR9KHf9oLgLxmwKBzf N5Zef0cBV+l4Sieqxpq0ixy/Y5t7dbIlZJBX/D3gxHuNBX/rEmwfv1EsxdlE6wylB6E/ 9Sq3mnP17uxPPuHdrxBRC/CMo93UdVHAX+IrPW/5rlN2vMShiOFMtswuSEN7vZv5Pcau W5DA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oddbit.com header.s=20180920-g2b7aziw header.b=oyHizF33; arc=pass (i=1 spf=pass spfdomain=oddbit.com dkim=pass dkdomain=oddbit.com); spf=pass (google.com: domain of linux-kernel+bounces-172119-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172119-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id gn25-20020a1709070d1900b00a59ed7c7a5fsi1061529ejc.66.2024.05.07.13.07.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 13:07:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-172119-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@oddbit.com header.s=20180920-g2b7aziw header.b=oyHizF33; arc=pass (i=1 spf=pass spfdomain=oddbit.com dkim=pass dkdomain=oddbit.com); spf=pass (google.com: domain of linux-kernel+bounces-172119-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172119-linux.lists.archive=gmail.com@vger.kernel.org" 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 534221F26524 for ; Tue, 7 May 2024 20:07:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2631714B94F; Tue, 7 May 2024 20:02:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=oddbit.com header.i=@oddbit.com header.b="oyHizF33" Received: from smtp94.iad3b.emailsrvr.com (smtp94.iad3b.emailsrvr.com [146.20.161.94]) (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 E878314B947 for ; Tue, 7 May 2024 20:02:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=146.20.161.94 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715112124; cv=none; b=PQySA4SAEMxcvmaud1JI1kR2D3Qv3/wsyhI/9vJMjbJ/WPJguTIJwqoxPotFr7yROUn/GlEyTULa1VWwfwh3c/Qf7F8kSMFdTBXBGsj/UfDnt64lJfTrW6njBh32BdUfvuzs6c95hEIuhbG9wc6Pjl3lpj0Hi6O/b4GeQqLtixA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715112124; c=relaxed/simple; bh=Qkybr0ICtPOdOIgP4Bi2fvNRD8VjwHKkQtnvW+vmQBs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=O1RER2uRb+AH0vYfvRaGkdUta9UcY/K+LA6G3YmvU4BIXnoMzXRUbWmgxMwaQoHU9q3Gy1I6P8iq4wqa3hvg0gfBFP1FPRXDd9T1yB5j1Aao2JPgv+NcydEo6wyvpWGMLNW/JcwiSQsM4eTXbn2j6B8d63lAiwl6rrBSGMOfQrM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=oddbit.com; spf=pass smtp.mailfrom=oddbit.com; dkim=pass (1024-bit key) header.d=oddbit.com header.i=@oddbit.com header.b=oyHizF33; arc=none smtp.client-ip=146.20.161.94 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=oddbit.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oddbit.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=oddbit.com; s=20180920-g2b7aziw; t=1715110992; bh=Qkybr0ICtPOdOIgP4Bi2fvNRD8VjwHKkQtnvW+vmQBs=; h=Date:From:To:Subject:From; b=oyHizF33EJ9iPYpjHhjzhbUyxd4IKJc047Qjp1SV2xtzZaVViI5QEGEQXBIwOUhcK 6jS1781D76NO4uaIx/i5/Cyw0q+6i2hyCTju4SK/sLJaQZaSQ4o/ASrGlWvQNyM3sZ g6ZBjMao8iV6oR9+pxsJaoxVAZyZQjPl/RZImsLk= X-Auth-ID: lars@oddbit.com Received: by smtp12.relay.iad3b.emailsrvr.com (Authenticated sender: lars-AT-oddbit.com) with ESMTPSA id B0AD9C00FC; Tue, 7 May 2024 15:43:11 -0400 (EDT) Date: Tue, 7 May 2024 15:43:11 -0400 From: Lars Kellogg-Stedman To: Duoming Zhou Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hams@vger.kernel.org, pabeni@redhat.com, kuba@kernel.org, edumazet@google.com, jreuter@yaina.de, dan.carpenter@linaro.org Subject: Re: [PATCH net v5 1/4] ax25: Use kernel universal linked list to implement ax25_dev_list Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Classification-ID: 3459c125-4b56-4fd5-9dc7-757dbe40275f-1-1 On Tue, May 07, 2024 at 03:03:39PM GMT, Duoming Zhou wrote: > typedef struct ax25_dev { > - struct ax25_dev *next; > + struct list_head list; Would it make sense to replace this with: LIST_HEAD(ax25_dev_list); And then get rid of: > + /* Initialized the list for the first entry */ > + if (!ax25_dev_list.next) > + INIT_LIST_HEAD(&ax25_dev_list); -- Lars Kellogg-Stedman | larsks @ {irc,twitter,github} http://blog.oddbit.com/ | N1LKS