Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp579067rdb; Thu, 1 Feb 2024 18:42:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IGAs1m8+fh5mIi7Z05ODK/H/3B6wELogt+gqS0QvKuYmCNMGoaOTevmqD2DQrgyrbWsv1MG X-Received: by 2002:a81:6d0d:0:b0:602:98af:b469 with SMTP id i13-20020a816d0d000000b0060298afb469mr1171579ywc.9.1706841750216; Thu, 01 Feb 2024 18:42:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706841750; cv=pass; d=google.com; s=arc-20160816; b=je+/3JSJSkPQaoT4S+7f1YkWXfUAnaYktZ81k1qtIpBDlZlYwzvVrLreqGW5R8yAI0 3cRNVjOOD+sQxD8PoZ98l2n7e9Ilsvx5QWzTDrbd+CwOGsYfXelpcq5TzTuIDLKewWbW M7TbjqNhj1NFm5o898V/TvVAmQANFPg+YW5CmUEA7OLhTrd1syIv++bbmwjO9FuAqot4 1yLIfI1A3L0M6QgA88AZcl2NJ0wJcx5TN88R1+1+N9NO+LOcsYnMn6YlPKudOPivnlcW jlIPZRPc3Esq6cdxP0LG8vN8UjWZCc+tvTw5qBIdWybpR8U83FQhYgqcbjDXSmxKtKq6 lO0Q== 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=fM1LKl+OE90GgTntbr5oTucCHPa2tO829BJVNlAmsRE=; fh=97cBGJkKPZBvDUepoMJliGpFJ3skY3gVhTgly0NhsbI=; b=h76X7izdpTvJe7EAvKv/R4lr7079S8TiqKQnbUPoNJo3IcE16vR170nUumdeXbKSRY NHkf/PZD1t3+Xqb8jfxdrPgMLlv1cS8jN70Ikn10qa0QafyByicfwQG+3gyUM7FYOeWA cAG70sNzTL9HnKc2ljyknZnUB8zj3YArltGDK4ys/qklv2cQMuxrggDTyqQST+NFPJji K11+60R+Ur2GNFICBOOXf/U/QdpHvkzRgiddWfskGZtFnlpBO24oecMtOvanD6mA+BTM fNrKTnbSI/Hj4Lgd9RJ3p0MZ5dXyOdRczi5u3VhHsNBspgBJbs6HXlM0d0XiQZOAJadR baqw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BO27UZx6; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-49111-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49111-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; AJvYcCURxaBYWckIwyJ5O4/QdG8bu+DoZP5lb0TWUpBdku/vWqDwGsTdcA29Pi4KNkzehbPUZ7TsCjMGKkjSGq3gZIl95ek8Hnezlz/PDf1Rng== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id c10-20020ac87dca000000b0042bf50e3465si983413qte.765.2024.02.01.18.42.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 18:42:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49111-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BO27UZx6; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-49111-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49111-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 DA6981C2350E for ; Fri, 2 Feb 2024 02:42:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0174ABE74; Fri, 2 Feb 2024 02:42:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="BO27UZx6" 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 1B5C6BE69; Fri, 2 Feb 2024 02:42:22 +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=1706841743; cv=none; b=qVvo4OPRO5254U5IXCDi+LAGruaAtSEHGohMvA0tP6V2QWS1Wwiz0+HJaKL1q5GKYzVu0yLtWUvXaUyIOgy4uA9HPhkGJezdTffCpYB0HxneE3roYFYkkZgLJPmjGoYoNOxGqDaWDZkPEnWktYBCYAtgYnmi12fI1ORzMdKaAKE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706841743; c=relaxed/simple; bh=ACb2Pq3WaRCfkIQVQ7Pcbsp7XchKA0M9Swopp1R7g+w=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KU16or3Azfa4FabG3IKRFvaA8cJN/wXE8PnARXl9qLA5Y4bFEIraEaMjUfMdw7+aLV8TthGWOB7N1Lv4ks7l6iKHvc8NPta8uddjeilKaZuPyxchML6l9K1Bqy5sWXjG7juZ0HGzW5bn9imjecnzvkhGoHdS5tPtxQAnAMk6EeQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=BO27UZx6; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6464CC433C7; Fri, 2 Feb 2024 02:42:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1706841742; bh=ACb2Pq3WaRCfkIQVQ7Pcbsp7XchKA0M9Swopp1R7g+w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BO27UZx6nnAn8F3Dsx6V1mHpHtwrNiLSEHcDD8xZHWPspKM6Nz2SBydsr19FBcn9D qzgOb9X9jm+2ZO0vz9y2qs4ZJRwYMBLT0Go7PvJWvMI1D/6eJ6pjs55ib3p6R8bXSm haNPFacc30LF8K0CumZPNZNj92MPVfVl7xOZJA3g= Date: Thu, 1 Feb 2024 18:42:21 -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: <2024020112-shrouded-ferry-7617@gregkh> References: <2024012822-exalted-fidgeting-f180@gregkh> <0d110d2a-da0c-017a-0e5a-fc6bef7b066a@linux.intel.com> <2024020144-duplicity-nuptials-1cd7@gregkh> <2024020138-monologue-claim-41d4@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: <2024020138-monologue-claim-41d4@gregkh> On Thu, Feb 01, 2024 at 06:40:30PM -0800, Greg Kroah-Hartman wrote: > 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). > > It applies just fine to the latest linux-next tree, version > -next-20240201, what tree/branch are you referring to here? Ah platform driver tree, got it, will rebase...