Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp1041401rdb; Fri, 2 Feb 2024 11:33:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IH9Vo34kn5RiPfFf9MegT9kJOMS6FekKoAGxhra2m14My0WVC9945V26/Qbn5j4xaWnPtH+ X-Received: by 2002:a05:651c:61e:b0:2d0:80ef:1e61 with SMTP id k30-20020a05651c061e00b002d080ef1e61mr1680212lje.17.1706902408953; Fri, 02 Feb 2024 11:33:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706902408; cv=pass; d=google.com; s=arc-20160816; b=lxUARRgS65QcF95BAgxvhcQ8U34QM33aVZw4S3jupX6Vb1Lm24ThVUGmw1CpXK2CZr zKU7jOBeLrbF7kyDxcd5geEkxrCsUFmyirGajDj2V4ha/9gC9VvrKAjCWXEfZdeLXKmZ sNxiieaN2xzHXCcwIGOk4C6SSYC0HgfgRuPooPBmqV9wQ30wudM8TbTor8qSfAEZwAM2 VJqscGBY830zDB5yTMi9THSz+dwxqeCx0PpFG8eJnaW+MZvzvtCYhkfmR3gC4hdmq2bc yGe0BUQln/QSHGUkEAakc8n9Bf9HiLo8GqhfPt/8XlBxkk/qZy8Eof+0yKhsPTTN2lI3 4aXQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=fuYXnu721iCy4Br1PjfzkiN2qGHnF4Gj4lzlObiZ9Xw=; fh=0bCkqVwXv9q8/bIA/rH+t7IGb5Nf7rxuktz73WwY6zY=; b=GMjt/46tl/zILOdhixsm8xWz9i+19mZ9kjuitbvAB4Vu6D895EbsU4ici3vapfDMSo T5o2UWe7T7gA6uiLKvJu1dEBlK9qO7hIaSb0i7CkjqjftBH0xn/L5ev48q0UuZ3XRVOf yy7rBExb04DhnySuwdHeqfOGK5PcRxA8LJbJGgUR0e/a3rSaAoXzlujnwSeGwGel0mQk PQeYcAHdHok0/IS/OhnY9Jys3StrfyvGwyHtrx/du3ysE6vdlGs8B62/YAIwTKT0ejaI rxzEqGzyaGZqHeAlFlk5/0gMovw9WhbtbAhtOe+6PdRVxNZoyJBU13QGOAk9GyQgcwcG PXtQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fSwZfUaY; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-50483-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50483-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCX7ud7oogfSGTIOQrXY0ZcxpclZjmN1Bqa1YedTeku2yRBCfliLDEiVGIgjUWppbD785sSqq6hqOETwCQdHDatVqls9WHFrkjluUPR41Q== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id o23-20020a509b17000000b005600a952076si307294edi.553.2024.02.02.11.33.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 11:33:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50483-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fSwZfUaY; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-50483-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50483-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 A588C1F28181 for ; Fri, 2 Feb 2024 19:33:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 544AD80606; Fri, 2 Feb 2024 19:33:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fSwZfUaY" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 76F953D3BC; Fri, 2 Feb 2024 19:33:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706902395; cv=none; b=hizcPO5sD2eBk3D/49qq5xhZiwCUNipnMOeEXVtNo53IsZ1ekhMVFLP6gYCuEb4yQfCWPCBrVdoKvKJTAibMwlA8tHXz+1DGf6bQ1bQW8FuTcRtQBroHQWbLv2SIiiHZiRu37o+qHph3plnvQVb2/l0xZWDhXWkVpBeu9+q0oGE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706902395; c=relaxed/simple; bh=5fX28k3jBg8AF6wuBErGgmwNBI5qB8oapTjKGw2klLY=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=XZMh5TLxEWKiFFpfRqkgiCO75larLY7F9DT4zj52/8MfDjZaKyvGYA/sjd63UsEP2hyj14eTfpYSjdYgBfgVjDEHYvxeoxpkslx3H4faxa2GZHYi2rYT4Spfj8IjGz/7bCLQy2g2+e2pCstHqIpnirTxDCNYLVnECrgYftw0RIM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fSwZfUaY; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id F3FE8C433C7; Fri, 2 Feb 2024 19:33:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706902395; bh=5fX28k3jBg8AF6wuBErGgmwNBI5qB8oapTjKGw2klLY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=fSwZfUaYriZSw2g/i0aVBoJi+X28rETNBt7iN9Qv/JADxiikJNxTzbFABqcklfsJe Q1+tSI7YPPGRAUPS3xrzIrQPpoknlXh93bFiFP8YtfCvALE8k9gtvAE6ZInmvoYFEG BMOSXx2/isYuYYTySvQXnEs6aznflCfMOMTvlCKrUNLmqIY72xxgeoR6SXtdDtMcpK UeqsgzPKpUdiIYgFzJefEBWW6j1KaNtbXjjAZSFC2g0kN8AX+1BFEqkUpXDYCIhDxV vvKi1HXBB9mbkKn1poycMz4ZLp2rRGSr9W+g7mpwRMzfAR4BPmEZ+wfEfyBJvFAACP mHuArwCM2/F0A== Date: Fri, 2 Feb 2024 11:33:14 -0800 From: Jakub Kicinski To: Christophe JAILLET Cc: Krzysztof Kozlowski , "David S. Miller" , Eric Dumazet , Paolo Abeni , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH RESEND] nfc: hci: Save a few bytes of memory when registering a 'nfc_llc' engine Message-ID: <20240202113314.4c5f09ce@kernel.org> In-Reply-To: <30e5c9c2-b13a-4b7e-a266-1e03e654f1d3@wanadoo.fr> References: <6d2b8c390907dcac2e4dc6e71f1b2db2ef8abef1.1705744530.git.christophe.jaillet@wanadoo.fr> <20240131150803.2fec5a5c@kernel.org> <30e5c9c2-b13a-4b7e-a266-1e03e654f1d3@wanadoo.fr> 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-Transfer-Encoding: 7bit On Fri, 2 Feb 2024 20:11:56 +0100 Christophe JAILLET wrote: > It would be slower, but it would reduce code duplication as well. > This is just an _exit() function, so it shouldn't be called that often > anyway, if called at all. > > Or, add another function with the list_del()+kfree_const()+kfree(), that > would be called from nfc_llc_exit() and nfc_llc_unregister(), to have > the best of the 2 worlds? My vote is the latter - factor out the 3 calls into a new helper, call it where appropriate.