Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp218449rdb; Thu, 1 Feb 2024 06:47:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IFN+wjegHmcj3F0B4x27sxinfE/TMHya8xQXg9qRE+DA/YWvIJrqsgIdMKpRwt2P5nitDDL X-Received: by 2002:a05:6808:1717:b0:3bd:c58f:ca21 with SMTP id bc23-20020a056808171700b003bdc58fca21mr2708677oib.34.1706798836671; Thu, 01 Feb 2024 06:47:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706798836; cv=pass; d=google.com; s=arc-20160816; b=RF0blKMz8TxegC+Pvu9kwNLefwexLiyXosyY+XXMYQDUkwajtqaBdZ59kJSFRvnlcf pTo9cd2c09b89ZcJRph4NNfkknJUPtxiRNhqXn1gLpISmNP+WTOhoCNvqNh9VTUe4WM3 f6xF3HjVZR4bomt5yZM2JCJxEuz3kPCrXRPn23vOhBY9ActiYRE0BeNXR6kFKpx6kTNj uYHMWu21reJ0N8+mbcoEsbJGy8LOGbMZzaLrr6qYCHNddg8A8QXd4qbfv4tSnVOyTYGf PdhJHHei6QfvelrFbHdoUPml/zvF8At7znXilbJWtMHenvfXrOwq1rlQFe6EhQlcqI4k KRRw== 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=7vAXtflPu6l7OoUe7K0yRrbi68dkcRxeUIPI6egfPn0=; fh=m9pOXK0hfHdoplbgKbVe5yP9Hm5n8aT21THU2tNle4U=; b=n09GsHkWGsCN6GH+pKacfr13FbB9c3mNICsxHf0Q8bU8D4kzY2aH5gxQl9+tsmGjy9 q95hJLXrubvHfhyguW24JvYFBJvdJ9DoZ15r94oDBOba+q+yNRoBZ6ix1j2COYPelKne v77D/95pFuY7cbq7Ewik0atTrm+OPu5ZlvLpHoWZqvrrFsFk4nXS2HI1D9+jHk+ORB2C SHjyclR7pyLZM/r33c7SzhGdupkh65gYO2lOi0cnjGxCkn7gi+6KAnqUdaLhy0c041Xv oRjCKrXVyte511bL26pO7vGeP+XhOv6UtwTkNlkqm061LxYhlCoRkd+EXGkXq7CZ4l0g W16w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Hp7wO7jo; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-48332-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48332-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; AJvYcCXaSqCcPE3vdwp4+0g9/g3T6eGyzAr1zbSvZU4F2IGYCqRIFFlmDT5yBWyrdHh/YtkIFWS2/jYwSes9U2lEo/tcPFioo8QSYDEL3M+Cog== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id w16-20020ac87e90000000b0042bff0055f0si15700qtj.721.2024.02.01.06.47.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 06:47:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48332-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Hp7wO7jo; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-48332-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48332-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 5E6101C233BE for ; Thu, 1 Feb 2024 14:47:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 240985F486; Thu, 1 Feb 2024 14:47:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Hp7wO7jo" 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 269AF53385; Thu, 1 Feb 2024 14:47:08 +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=1706798829; cv=none; b=GgBfxM/r4c4UyPynLKIhetQb+wYkuPY7V1RwQfTYu8gIrkR2D4HQ2QJ1o7FBEhsqYVvshCVZk/Dy2vPkWxaKeo5ydAp7BlqghxHNgmyksE1iBE4s+ugvQLTbXUNW9stA0/CO5D22TUZezuD/fgYL7TImuJ/zXCdsN46nBhFvfEY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706798829; c=relaxed/simple; bh=Op51wgxnKz739GQ7m4pPxxOXzlkXkfmYI8j1uup/GdY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=H9M5lWMAatFOfzu2fQ2gGWqCZ+3szGvi+DwyUVyzuKnbKmJo3r+tOckBnyBfsc6/5Og5ZcLHTVkZSFGmdDQ8sohshWAzHLwW+JqML/MVLJ4t/NqZuvKefdlmhAF2jcFBF0gyYh3wNTGnKQc7xFmV7OZtWTb7sJebhrOCjbUL6wo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Hp7wO7jo; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 98943C433C7; Thu, 1 Feb 2024 14:47:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1706798828; bh=Op51wgxnKz739GQ7m4pPxxOXzlkXkfmYI8j1uup/GdY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Hp7wO7joI4VfWLO6zvQiKjqUaV0d9262qFHOff7P74jMMApODqxoEUP/HiFTbiEb6 IOwqX6HNOj5F29AOYwYQbJ+/hgcgupu6Fm2tJHV990tK35odGevqhXIettd3tHnr8K Ej080f4gIw8vUr1tla86542hXwCP+9jwqdq0AgLg= Date: Thu, 1 Feb 2024 06:47:07 -0800 From: Greg Kroah-Hartman To: Ilpo =?iso-8859-1?Q?J=E4rvinen?= Cc: "Hegde, Suma" , 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: <2024020135-sly-theft-0594@gregkh> References: <2024012822-exalted-fidgeting-f180@gregkh> <0d110d2a-da0c-017a-0e5a-fc6bef7b066a@linux.intel.com> <2024020144-duplicity-nuptials-1cd7@gregkh> 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 04:34:30PM +0200, Ilpo J?rvinen wrote: > On Thu, 1 Feb 2024, Greg Kroah-Hartman wrote: > > > 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. > > Hi Greg, > > Well, if you really want to "win" :-), please provide an updated version > which considers the changes already made in the for-next branch (the > current one won't apply). Fair enough, I don't want to "win", I just want to squash any "hold off and don't make any changes to this file because I was going to plan on doing something else here in the future" type of stuff, as that is what has been documented to take down many projects in the past. That's why we almost always take patches that people have submitted today, instead of ignoring them for potential future changes, unless of course, they are not acceptable. I'll rebase on linux-next, rejecting it for that reason is totally valid :) thanks, greg k-h