Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp203944rdb; Thu, 1 Feb 2024 06:22:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IFYJH0x9H0Qc3qWNmXTbyUWm4vC5kxwGfbcJvT/4A3plSOriKvNFtPX+cfVgHgcDRh4/BPy X-Received: by 2002:a17:902:c948:b0:1d8:d864:4f with SMTP id i8-20020a170902c94800b001d8d864004fmr6358780pla.66.1706797372916; Thu, 01 Feb 2024 06:22:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706797372; cv=pass; d=google.com; s=arc-20160816; b=LRYO5W9DWoPHenJL7EELw7priNW+IqwSk5wwJrsbVsH75lXdbkmBENx4gvTPzp9NRz 21QBgwcOy+PmlW+GIHGUyW5cCgngCfaWNXS/HNRrsYg2jvuw0lheSrzwyRAJI/zBDRZh 5Ni/ElJiy6f9Ut1zcZSYtOn/s6/N2Lzcb7LOxTINkSXwt0m4o9RNvzGWKfvQNSa9yAvC R4ut8rsbaYlo6k9DuvwynRh8B0YvxGDd5K2mdlY28hkBL/05fcD7YR4n0va72x96JyjI PPtanhStWl3+HlZ8BmjHv0Ec2QiW/JzxVYbMeKTvYmqhFI4kwfpwVaikpSrAGTZ55/Rk 5s1g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=UbDXEE1jhUO7OiOFDxWRr8ny44sKWcjgMLE73CTFeYc=; fh=Vw7SAg4ToLppAA73dDJ4lfO8oQHv0SuS18fOr+lK9jo=; b=Cj/jBLYt+eQXbSKNxTc+mrz9aFANFFgVGDC6373VqG4f1CVzHg1iETnKgaSCKAak/7 cm0pkzw2HY/l5PAPvl67YFf8eTW40/K3hIIgXgvqPSBNeYakwOLTSyA5SeFklcMEoc12 qDB4YwYkr8CnI3fkZL1DDkf+n/0R0mmsnvO07JYPUse0cXs6OJAdwJTNrONS2hJUZBH7 GGv2MAIei+ChHuawXnd/7jDti2Ej9dm0okuQGdp949ACf5anxHuSK8EzcJT4tq0wYYT+ e2Le8w8yIC3FrfumBp00aMv+HiDXvIfUa6BhjeoE1pNSNmaRqvJKqTdCo/QMxhG4i/jA PRVQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fL1Dlw7g; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-48307-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48307-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org X-Forwarded-Encrypted: i=1; AJvYcCWWk2Wi3grzVHxBCSyKAptsq8zQ9WZ/mTbOyXyRCjVMUryq9XQ8BeuJaGhln+B8tPCt1ieqIcaZ3gUTJdjaBxoihzUoDrmhg+J6mR8Qsw== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id g11-20020a1709026b4b00b001d6e8fa5b3asi11696128plt.610.2024.02.01.06.22.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 06:22:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48307-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fL1Dlw7g; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-48307-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48307-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 3BD14286ABB for ; Thu, 1 Feb 2024 14:22:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4C5A05D498; Thu, 1 Feb 2024 14:22:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="fL1Dlw7g" 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 1161D5CDF5; Thu, 1 Feb 2024 14:22:14 +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=1706797335; cv=none; b=CAKa+EohCvNtBnNW6WKjvDFqGmFIhXoxWoHvBuKJwfFbl6IbS0pNMWpPi6896Mh5u/5BcTap2FylxsRsTzGrehzI5ZtPrXQ0EN5F13MnylQ/FvCAgXMJEcGPYviOkjix9vltbO1CjMt6/NkcCfUnc48BvkupOOS9CD232ZOSWTo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706797335; c=relaxed/simple; bh=WNRgXpK3cyTcLjrStmAedyAdHp3cF8ZyWMJ/8P4PCE4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=u10cZUDJ/vkNcRv+GUMqTjooqPgTC7zNKzdFJ2bzytgBPi8bsI2j3cyLwHC8/NJavqzeIlARGksZJRuLBXoTTouU2F/Zrd1srYTpoBc2dgxyj/zCh2SZ8x47Lbo4VsLSJY+UC14MqgKny7B8mN1qBy1QOx77z6dhCIZU76Ng6g8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=fL1Dlw7g; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 71F19C433F1; Thu, 1 Feb 2024 14:22:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1706797334; bh=WNRgXpK3cyTcLjrStmAedyAdHp3cF8ZyWMJ/8P4PCE4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fL1Dlw7gOwnCWJ78CU0EbGE9YEyAiqiAq5Ep1QhAxQ06DxnpnNMxPugkP1BO/K15X ZyzG/y+WN56MiCvYz8ReuKAC98WVeSMka6b2NMqa+ViWplfqqNvYlPCHcsyEDzQxg3 ltSDtZEK667nul9fTNVcStlIUBKU+GJu+jFkA9Y8= Date: Thu, 1 Feb 2024 06:22:13 -0800 From: Greg Kroah-Hartman To: "Hegde, Suma" Cc: Ilpo =?iso-8859-1?Q?J=E4rvinen?= , naveenkrishna.chatradhi@amd.com, LKML , Carlos Bilbao , Hans de Goede , platform-driver-x86@vger.kernel.org Subject: Re: [PATCH] platform/x86/amd/hsmp: switch to use device_add_groups() Message-ID: <2024020144-duplicity-nuptials-1cd7@gregkh> References: <2024012822-exalted-fidgeting-f180@gregkh> <0d110d2a-da0c-017a-0e5a-fc6bef7b066a@linux.intel.com> 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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Thu, Feb 01, 2024 at 06:50:33PM +0530, Hegde, Suma wrote: > On 1/29/2024 6:16 PM, Ilpo J?rvinen wrote: > > Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. > > > > > > + Cc Suma Hegde. > > > > On Sun, 28 Jan 2024, Greg Kroah-Hartman wrote: > > > > > The use of devm_*() functions works properly for when the device > > > structure itself is dynamic, but the hsmp driver is attempting to have a > > > local, static, struct device and then calls devm_() functions attaching > > > memory to the device that will never be freed. > > > > > > The logic of having a static struct device is almost never a wise > > > choice, but for now, just remove the use of devm_device_add_groups() in > > > this driver as it obviously is not needed. > > Hi Greg, > > Could you please hold on merging this patch for a week? I will push a patch > for converting platform specific structure's memory allocation from static > to a dynamic > > allocation. Push it where? Ususally we do "first patch wins" type stuff, why not just do your work on top of mine? Also, when you do make the needed changes, please remove the explicit call to create sysfs groups and use the default groups pointer instead, that will make things much simpler and avoid races in the code. thanks, greg k-h