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=-8.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 C5224C433E0 for ; Sun, 14 Mar 2021 12:48:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 879A064EE8 for ; Sun, 14 Mar 2021 12:48:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235420AbhCNMr0 (ORCPT ); Sun, 14 Mar 2021 08:47:26 -0400 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:46873 "EHLO new3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235207AbhCNMrL (ORCPT ); Sun, 14 Mar 2021 08:47:11 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id EC7015808B4; Sun, 14 Mar 2021 08:47:09 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sun, 14 Mar 2021 08:47:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=t0m7jd tPqXIaqEcRWEY/GD8RkZot8D/MuiQxA9B2pYs=; b=ejydQnkGcNXaiKCSscCZ++ ewRtl7FTPOSZEJpo+rhevzO+TdX9/RZbSTFylQDnLNthrj/z+MSQD3MtuV7YEeTm 9xn6wJfFJGvKUuCXxCdUGGz+fkQSfi3vuqN0Y430SqabqN+bI43UYJXiUwtz9oqM eM75e9CDGD8uQPnu+rANJ9bHWLwTw6uk+g4zlNiY8ATUZIrhYsC+FIF9PJAkHT6Z Ab8ZLYbqPhM+7uonUNc/MrYllQGqyWaUTgmCA0YC/chYhuYek96CfPWeIn9z7NMw CHlP2NRYFCQW+83HIwrjf64Qx0sIx4J3A90cAeZ5waz9jj6sVwYxGhWPi7VUW6Tg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledruddvjedgudekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefkughoucfu tghhihhmmhgvlhcuoehiughoshgthhesihguohhstghhrdhorhhgqeenucggtffrrghtth gvrhhnpedtffekkeefudffveegueejffejhfetgfeuuefgvedtieehudeuueekhfduheel teenucfkphepkeegrddvvdelrdduheefrdeggeenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehiughoshgthhesihguohhstghhrdhorhhg X-ME-Proxy: Received: from localhost (igld-84-229-153-44.inter.net.il [84.229.153.44]) by mail.messagingengine.com (Postfix) with ESMTPA id D1F03240057; Sun, 14 Mar 2021 08:47:08 -0400 (EDT) Date: Sun, 14 Mar 2021 14:47:06 +0200 From: Ido Schimmel To: Daniel Lezcano Cc: rui.zhang@intel.com, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, lukasz.luba@arm.com, Jiri Pirko , Ido Schimmel , "David S. Miller" , Jakub Kicinski , Amit Kucheria , "open list:MELLANOX ETHERNET SWITCH DRIVERS" Subject: Re: [PATCH v3 1/5] thermal/drivers/core: Use a char pointer for the cooling device name Message-ID: References: <20210314111333.16551-1-daniel.lezcano@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210314111333.16551-1-daniel.lezcano@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On Sun, Mar 14, 2021 at 12:13:29PM +0100, Daniel Lezcano wrote: > We want to have any kind of name for the cooling devices as we do no > longer want to rely on auto-numbering. Let's replace the cooling > device's fixed array by a char pointer to be allocated dynamically > when registering the cooling device, so we don't limit the length of > the name. > > Rework the error path at the same time as we have to rollback the > allocations in case of error. > > Tested with a dummy device having the name: > "Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch" > > A village on the island of Anglesey (Wales), known to have the longest > name in Europe. > > Signed-off-by: Daniel Lezcano > Reviewed-by: Lukasz Luba Tested-by: Ido Schimmel