Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1990653rdb; Wed, 31 Jan 2024 16:05:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IHpEOYTdSDmka+1y1OGhM31rTRAIvmsOMbdp17tcnfKUNgJpd8V9QywT6r7s3pTexlh7LwI X-Received: by 2002:a05:6a21:6704:b0:19e:3e3e:991d with SMTP id wh4-20020a056a21670400b0019e3e3e991dmr665053pzb.1.1706745929311; Wed, 31 Jan 2024 16:05:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706745929; cv=pass; d=google.com; s=arc-20160816; b=DmEo6iXfe/i+6QaaLOBHROYpaGr6r2FUbJo819vIbCgdknD68u4ynSzEaw4k6JALNr 7VkiYKISg3x9mbSh6UQc+B1cabkblNCSYmgPJ8Kmc4e59W4Kg/gpsFb3wBLNitgJw+Hx TK+DB7ZdOuB39Ww6VX+9wRpKi32Z0MKFMp/Tj3euflinpZ4aveP0gqR+GZt11t6uhABO ZS3ib2Qxv+2zPw4Haz3MVg5R53Vvkni2O/hLa8DUMAsYvWEixA+Qf60ghjTk1m4MY+f9 D0CjW5W60iZUyTjB0IacElp5l8g2auZc4eILb3+bmpLULLKybuA4yG4/KhlHXC6VnTKE C+4Q== 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=GnbeQJzQdidb3oGtcb+sPLDrrILUdSbET3s4nURTlcs=; fh=K5cCS4jEpy0vSlobFgdEpMnQoh1W9iQR8xPolLwjBLk=; b=INAz7vEeU7UfW/n4jR3dfEN/bO9dxVJVT1/ayqVX7sfAH25s+VNaeMf8rjLKol68T/ wxVVYzNIvAqXKE2guYwZuvVc6boV8zSSxcUGVyfnmGYe3uOASzTxO6FknD0GhVLJF/ke GHEtuB9Zooq3EOR5XJ6HRgPeTUMBZ7wXOqLX7yGe9xQTGQzSv9YaeBmq1JxJhIrIrC30 l0RChcKYG3q0zyNsnhFpbpISaeMJcjFuBy/ta05DkVgUi+JXqB4q6cxOKp1NxiPwhtBK Qy5t+1okn4dizwhYu+k1kLQcn8SCeWJu/XqNfNmfIHlR/vO19W2m+4ydjVQVM+9KmLHb IdLQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HHYtI09U; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-47340-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47340-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; AJvYcCXY43zvHRd3onF/yGYUc7LL2GpLYlYuKjcamIQHcEVDdDTzwu5wBqkGSZd+ZGMZnwwWLVUQ80X3gTMg5tx9REgKWfvhOPHDNj8Be/xz3g== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id v13-20020a056a00148d00b006dbdbf8943esi10908380pfu.182.2024.01.31.16.05.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 16:05:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47340-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HHYtI09U; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-47340-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47340-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 72BC9B2F8A9 for ; Wed, 31 Jan 2024 23:26:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 802AD3B789; Wed, 31 Jan 2024 23:08:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HHYtI09U" 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 5D3464655F; Wed, 31 Jan 2024 23:08:07 +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=1706742488; cv=none; b=tKGgzxM6cRHUAmL9T/4fpJvicHr3XQaHYjFLUn/pjMVOzBVoKMnmarvcsJGOr54NCmXBX/Rr6yMTG/v23Gh8bD9fxOzFf9VZtjxFHpaB/CI6wiZLPH6CLx3htUE269kKgsAzNJbk7p4oBJcAkiWvY8q3Lf0ulL/vZkFnVhU9Ocs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706742488; c=relaxed/simple; bh=146G6LfzA0wSxxyMWUaSwDQCMGOdwZna8K591J5YPx4=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=K45Uy7HrtIIPhmgcVSqnuLscbgIHpVjUKL6AfYNnCyHkrNBaxSOJLI9ATg8JyhF7TJtSItgWLqb3wNqFf/2ZcTdrhgkyN30UhLbPr9VUxsXHqYc48U1nuhLpj7RvQcPogoRFQOrHKY68kDJQf6f2Q/mYHgOrb4q6QTw+2Sfs7c0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HHYtI09U; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id BB0C8C433C7; Wed, 31 Jan 2024 23:08:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706742487; bh=146G6LfzA0wSxxyMWUaSwDQCMGOdwZna8K591J5YPx4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=HHYtI09UkBLzcady1Mkgr1r3aqnyQMIZ00yr7WRk3eeZxltyVQK3fzNVzwSb2BS8C JP7Ir9fTMasTjW7fl785B0TMYSjzV2M4cnxYf+EFBf/N3LdVW95/Ogao8sNK4fYkW5 dLDjraLlo9mB3DHVEgJTC/TkHLwRZO+1/5mj+b28Zh1n0XrDHOcn9F+05sKq72n/cP TJn3wGEqL7tjnnbXIiXD7BiohQeBWzq8b49ycvc99tHr+Cz7MNo25oQH9cKD6G/tAz 6SV+rsVi2s6BYv6ZXzjFepPrfi0SxNXsVYk4snSCQM5s/UWGzvgcQt3YWxX6f5X8gp K79DxyPLXMygA== Date: Wed, 31 Jan 2024 15:08:03 -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: <20240131150803.2fec5a5c@kernel.org> In-Reply-To: <6d2b8c390907dcac2e4dc6e71f1b2db2ef8abef1.1705744530.git.christophe.jaillet@wanadoo.fr> References: <6d2b8c390907dcac2e4dc6e71f1b2db2ef8abef1.1705744530.git.christophe.jaillet@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 Sat, 27 Jan 2024 10:58:29 +0100 Christophe JAILLET wrote: > nfc_llc_register() calls pass a string literal as the 'name' parameter. > > So kstrdup_const() can be used instead of kfree() to avoid a memory > allocation in such cases. > > Signed-off-by: Christophe JAILLET > Reviewed-by: Krzysztof Kozlowski There is a kfree() call in nfc_llc_exit() that looks suspiciously like it may also free the name.