Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp396643rdb; Thu, 1 Feb 2024 11:33:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IHecU+k1heaaZ5XKOx8KbGqwN9AKoVlvCO/xDU5/HJn7PYpHLLfjko6i//Khj7WMNl6E9pk X-Received: by 2002:a17:90a:c688:b0:296:3179:588d with SMTP id n8-20020a17090ac68800b002963179588dmr36855pjt.0.1706816018235; Thu, 01 Feb 2024 11:33:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706816018; cv=pass; d=google.com; s=arc-20160816; b=HPr/k6Byx5v6ziQF3siwMsCz05qdueTfZG4qj+WGDdrlq3mBhEHxyEYxmnaFCHkz8z L2bySE06/diYSJkaUMmAHfnOK3aXrjelywn32V3E6oVmLvJTnfECQMVMtr+IS7Ph4kkR 2WDbmf3HVEn4hdadX2UOkQrXxNKOeChk9AzE8nHY4ytnIwWQpuTEpS1mpb1RS9WRSsEF Kwia+D0e7IYqn7NwWKEV90wv/hEWtmRItjdzKrTYTQL0cL0VBjFPWj5aE3xPnKOosswW 9GD/M82kwBcimy6DPP/W4rVPA3Ae9HCKAg6cx9hjmmBC/QnqzC4Rt14X3ORCyWwvsWG8 pXfg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:in-reply-to:subject:cc:to:date:from :dkim-signature; bh=hjG9YUME7obixg0lpRByb+fetCPtS5ombkpvsNbGi2A=; fh=LBlkw30L+/G/5PpycZgth0rjdsjnhWZ3Fi5UQlsQIto=; b=ukmvBTIF1wF9IE72BPV41z5lhYMbnVDt4sMP2Wlu9TNsSWhkCSBKZVGZ4U8gcwY5uI c4/9c2MRBOFbYPlHqqh5EYoAa1xxajfWhtVicFkqVLlTNF84B5aC3BjHurxfHFcJYspS tgqh8VdP1bc7cBe4k3mVoHEBrjo+mEyfsntYdZQK8jJRO6S56UKb/R+O5OpJuZ9uTV3h 73bWPeLGKInYtMDqf0rtjQi/D/T0qD6p9EzoYPxKNGEtGnaAxMBZAbDYA7zquffQRLrw 4kdx9b5gVlyKUmod8Pju3pkslnI7pGl+MeiPdNSZAMjfTLOAzCd+HA45Ft+sO5halmWh dJNA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=PQV67DeE; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-48324-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48324-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=1; AJvYcCW+X7DZkJJ/PMskzTABeDsVIc4vkvf8iKrlchSWYyKzHYt4DhwkRMlFvRVK8hMJ3XTK+fMZf7bRMB/+6GoiSc/fFn9916oXPTtLFeJzGQ== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id v20-20020a17090a899400b0029603e6618asi2977179pjn.101.2024.02.01.11.33.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 11:33:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48324-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=@intel.com header.s=Intel header.b=PQV67DeE; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-48324-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48324-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 20ABB28F6F1 for ; Thu, 1 Feb 2024 14:34:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 981235F469; Thu, 1 Feb 2024 14:34:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="PQV67DeE" Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) (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 4CCEC4500F; Thu, 1 Feb 2024 14:34:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.55.52.115 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706798081; cv=none; b=RJ++bqnSox4/yQhY68kS0fJ/mf71Kox6iZyc9OUC+4KdrXn95jRoeIaedql88cqEKo8zkQxNoIok6xTzrJVRPI6v2JlbhyHFlhW0YrQhoOBWsnE5mP0EkZYMhu0R/riKtq0CDV3rfZilsfE84Xy4lHuabucZF2fXmGOby9UAVcY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706798081; c=relaxed/simple; bh=MwpDtmXN1dHVZjKlwVZnjRa8BnrGUX+o12/7/pZ4rzE=; h=From:Date:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=juGlE91V6T0PcS7FUzKcEZLYtkvm8aZ4qWTmjKjwZ55zMx6iil7nU0/UB1EbkbD9vRX+O4Yr783NCgiWnpqOsC5AmLiJmswh/H7MiyS7HfXlZ/dSzgEz808uNMR4fGg+h+xU+HIbgbTgwVarKb8TIcWzO84gvuGuFjRpU0Xw5fk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=PQV67DeE; arc=none smtp.client-ip=192.55.52.115 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706798080; x=1738334080; h=from:date:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=MwpDtmXN1dHVZjKlwVZnjRa8BnrGUX+o12/7/pZ4rzE=; b=PQV67DeE/3UPzdnxCmfjMEaxv3KOh7aYGDGBbiOz7FWHKupLJoX+C06U riZ/dg0dvK5+fZrihDKJTyoOODNyWIMsPtExcYwBCmXLNgHiG+bTu//xT 19U/BqESiwA4AB9iOFYi40j63O2CwnKGcbJrsvxGGhWqZukPxWs3RVc25 MUXe75m6jfQCcK5943GHAIrPIXWwEFtnx+7PLPMRS0uK+sZCqlgbFDMyu UxwubZ5sMmad4TU37rOYv8VKFrbcrOXYZAdmmbaJ+KK/G/Y2DpY1h767T AioVnSdHRkwlXb0hHN5aJw+3Sr7W0DMbe89VJeJLYQje55whn7Vixg1Uz A==; X-IronPort-AV: E=McAfee;i="6600,9927,10969"; a="403517806" X-IronPort-AV: E=Sophos;i="6.05,234,1701158400"; d="scan'208";a="403517806" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2024 06:34:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10969"; a="859163966" X-IronPort-AV: E=Sophos;i="6.05,234,1701158400"; d="scan'208";a="859163966" Received: from ijarvine-desk1.ger.corp.intel.com (HELO localhost) ([10.246.33.1]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2024 06:34:34 -0800 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Date: Thu, 1 Feb 2024 16:34:30 +0200 (EET) To: Greg Kroah-Hartman 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() In-Reply-To: <2024020144-duplicity-nuptials-1cd7@gregkh> Message-ID: 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: multipart/mixed; boundary="8323328-462016549-1706798070=:1028" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-462016549-1706798070=:1028 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE 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=E4rvinen wrote: > > > Caution: This message originated from an External Source. Use proper = caution when opening attachments, clicking links, or responding. > > >=20 > > >=20 > > > + Cc Suma Hegde. > > >=20 > > > On Sun, 28 Jan 2024, Greg Kroah-Hartman wrote: > > >=20 > > > > The use of devm_*() functions works properly for when the device > > > > structure itself is dynamic, but the hsmp driver is attempting to h= ave a > > > > local, static, struct device and then calls devm_() functions attac= hing > > > > memory to the device that will never be freed. > > > >=20 > > > > 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. > >=20 > > Hi Greg, > >=20 > > Could you please hold on merging this patch for a week? I will push a p= atch > > for converting platform specific structure's memory allocation from sta= tic > > to a dynamic > >=20 > > allocation. >=20 > Push it where? Ususally we do "first patch wins" type stuff, why not > just do your work on top of mine? >=20 > 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=20 which considers the changes already made in the for-next branch (the=20 current one won't apply). --=20 i. --8323328-462016549-1706798070=:1028--