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 X-Spam-Level: X-Spam-Status: No, score=-6.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5E24C43381 for ; Thu, 28 Jan 2021 09:01:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6847664DE1 for ; Thu, 28 Jan 2021 09:01:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231728AbhA1JAM (ORCPT ); Thu, 28 Jan 2021 04:00:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:49334 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229709AbhA1JAL (ORCPT ); Thu, 28 Jan 2021 04:00:11 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7EDCB64D9A; Thu, 28 Jan 2021 09:00:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1611824456; bh=0L3aHlbV9lGw/pwOLtUtCbTsuwnYQQ6OL1z4Tf1UkSs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kB1wCwOZLoPTen+92GJbcpkCz6Jti3sicvzQdRYpS5aL1gBN/XQAT6L7Dks/fNDUb bbu8z/tbap7g7kAEy0m3cs+ttQaA+QgEETmvsPluXeW3EluF5clx7KNgoeiCrSp+nP deWUfFXHvod5gsc7FMrd5SogzahQmdzIL8fRJqoOWkgzfcMlzPE64uBeWfmfNjJNSu 0MWRUIps9xo+VY70lp1I1RBTp56RF9VM8rvogU1e2mWIasogQwJqgIBOH2wf/dlxXT bYtE9RKwJL4DcrkQvgIgVRVOZH9512UCEHxoUy4OwkB19nScMbJeuswWn9Aa/mTz0S Lu1uXCa3/ZXTw== Date: Thu, 28 Jan 2021 10:00:53 +0100 From: Wolfram Sang To: "Rafael J. Wysocki" Cc: Laurent Pinchart , Daniel Scally , Linux Kernel Mailing List , ACPI Devel Maling List , linux-gpio@vger.kernel.org, linux-i2c , Platform Driver , "open list:ACPI COMPONENT ARCHITECTURE (ACPICA)" , "Rafael J. Wysocki" , Len Brown , andy@kernel.org, Mika Westerberg , Linus Walleij , Bartosz Golaszewski , Lee Jones , Hans de Goede , Mark Gross , Robert Moore , Erik Kaneda , Sakari Ailus , Andy Shevchenko , Kieran Bingham Subject: Re: [PATCH v2 4/7] i2c: i2c-core-acpi: Add i2c_acpi_dev_name() Message-ID: <20210128090053.GE963@ninjato> References: <20210118003428.568892-1-djrscally@gmail.com> <20210118003428.568892-5-djrscally@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="dFWYt1i2NyOo1oI9" Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org --dFWYt1i2NyOo1oI9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > > There's a real danger of a memory leak, as the function name sounds very > > similar to dev_name() or acpi_dev_name() and those don't allocate > > memory. I'm not sure what a better name would be, but given that this > > function is only used in patch 6/7 and not in the I2C subsystem itself, > > I wonder if we should inline this kasprintf() call in the caller and > > drop this patch. >=20 > IMO if this is a one-off usage, it's better to open-code it. Sounds reasonable to me, too. --dFWYt1i2NyOo1oI9 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmASfUUACgkQFA3kzBSg KbY9PRAAjVQXWyde1sa4VM3SZZiem5T6eY2LSnbYh9L717+Npfw3qTdRvsWN0klU 1+ZO5n3IkqvbY3/N70ONHrw1kvhC+u+8CvPMN+sBZqrCLApC0E1CEnL1WzqgjIRf 7qpzTOv20TCb5REdvBj2FBPoCd3jdBWBfYUvR3SmbQBhSYo4m8EutoYiBw35cjUy P6lV52Z6bUb9KW+iUUNnqBNqGPyWN6sELoh9t4H8BvTfavaXUZjotFt00PdJV0Ya KBLfanATBa9iwH7BZr2jUNpgDZHMQHnHY/bmFvPFc7exd+trCSjJiFg/SxOWh9HV uUSg25rj699WMJq67QQleo1RVnTkM5uG3vtUa3cQssxp3fCsnvCNvY7xB24APHJx foJqDMCICM4YnUIkAOsIenwzxL3kptt5mD95qzRKUI8+ENY07QjQOEnp3BhLcJIQ vE0CVEGZ/nlhxciaXt+5KkOgDNkQ/zbazYSKhRJ0i7NtAGuL1ageey/x9b32+xi5 zQcEChNhfWOVPdaW95jZRaM/hAHyRB/em35So7tmw3AllrUIWscXk22xS+o2N0Ur kTEK5JEUeXz3/oNcYIQSc+mClHINxq8k65Fy34bWBRv5ZFXOvpMMIR6Ayzzvj9Xd p8ZNIoPeRclQ6557C0nGGgiTo1+o7/YPQMo/J4utGGRoB9NhK18= =9VIP -----END PGP SIGNATURE----- --dFWYt1i2NyOo1oI9--