From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from wfhigh4-smtp.messagingengine.com (wfhigh4-smtp.messagingengine.com [64.147.123.155]) (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 CB7211836C6; Mon, 29 Apr 2024 21:22:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.155 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714425742; cv=none; b=FhPbE+ArO5CbLe/DIgmU5tuIxcEaWVtrURBwRV9vLl7VEJL6qIAOeAdnptTg33Itzv8GWKH9ttG/i5JWABXtlx49tKw6cOFOmL/2ebygDZTD4LZ0rRPcq43210iMsLNEsh7jHCkXG72FfeVlU44kEH1cLva4yWIlD4ZhEUElrIU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714425742; c=relaxed/simple; bh=TfXq4JCL/Hs/bpkpYDBRIz7T31yLLfzQJKQtMc4ciJw=; h=Date:From:Subject:To:Cc:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=RpOKxx/9nROG77jNQWzyaBkPlC50hJ+e/hlNZfKhPZHz1/JIE3SdbV7AI7Jew4SLHXVz5QgdJgvlYNorM29GA37X6gu2hjuZgnWjcHMrBDJ7y31+qc5nMArxbHNp32S0Lr9fj2iJNFtIZbu0h/GCyBFWUrVn6icAQLvJFwWAu2A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lyndeno.ca; spf=pass smtp.mailfrom=lyndeno.ca; dkim=pass (2048-bit key) header.d=lyndeno.ca header.i=@lyndeno.ca header.b=TP56wFuN; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=Q365N2MQ; arc=none smtp.client-ip=64.147.123.155 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lyndeno.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lyndeno.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lyndeno.ca header.i=@lyndeno.ca header.b="TP56wFuN"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Q365N2MQ" Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfhigh.west.internal (Postfix) with ESMTP id 4FFE91800124; Mon, 29 Apr 2024 17:22:18 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 29 Apr 2024 17:22:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lyndeno.ca; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1714425737; x=1714512137; bh=sJmpB3SmOP +OJLwp4SoU1l4+ZfNDN+uqj3tieQq4ilA=; b=TP56wFuNTGk7610MT/EaapZxL8 1YgTtUCuU4/gV2MmoguhOp4ze0XrAyx2XnypkKa6gFuWGxAwq6hMsMg9qulEfKaB ap7P87AzubbEJ2VtNvPd3+5eKD3KOJVrkD0kZUMdTOzXOmNZE524hcTRZbByNutm Ex1m67zReWM4lSRa0olnKdeW6CXMZI8KSzAAA5XNVjNbqVCiQaQZYTinPqjkWeMs i21OEXoXbw6kObW3wLYcxRc9ox+uWjPsWIlHEnryuqR6kmZbaOrcinR96h0UIGld Bt8hlwAaK801X5/7t34u7SalP7XLWnBIN0lHoIF46QsC02xcEyfzEuq7lgfQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1714425737; x=1714512137; bh=sJmpB3SmOP+OJLwp4SoU1l4+ZfND N+uqj3tieQq4ilA=; b=Q365N2MQAaDI79NIg93sNtJid9WamQDMmU4F1j2MzcAc vhf+xMxPgdROzQft7s0u4nf9c1YdxsZ5uZtTdg6HdcOepwdHMnnrjVXR8HoJh3a5 BNoZZWtRKeWVnOxhcSONMNY7GM+tAkWKfCwdjh96QEChIzISjVaFjGD5tKBildVD 2U+9HvAtVJcqFfg0wA0AOV34i0511qglq0RVzsXQAg6Cmcp9ltwX6ckZmsHTzGiT XVL/Ofx++GgCdLM8LBmCM705bJDxRpqJiPi7rcaqJUyqoGDsXTFArFZNE9OpqHJR aV1E49pvacq5HdTqn+3ORnMfrpZGelKwhxhyw/dnOw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdduuddgudehlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffuvfevkfgjfhfogggtsehttdertdertddvnecuhfhrohhmpefnhihn ughonhcuufgrnhgthhgvuceolhhsrghntghhvgeslhihnhguvghnohdrtggrqeenucggtf frrghtthgvrhhnpeejffeukeegieejhfdvudegtdekfeevveetgffhveefueffgfdvveel ieduhfdtvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehlshgrnhgthhgvsehlhihnuggvnhhordgtrg X-ME-Proxy: Feedback-ID: i1719461a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 29 Apr 2024 17:22:11 -0400 (EDT) Date: Mon, 29 Apr 2024 15:21:59 -0600 From: Lyndon Sanche Subject: Re: [PATCH v3] platform/x86: dell-laptop: Implement platform_profile To: Mario Limonciello Cc: pali@kernel.org, W_Armin@gmx.de, srinivas.pandruvada@linux.intel.com, ilpo.jarvinen@linux.intel.com, Matthew Garrett , Hans de Goede , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Dell.Client.Kernel@dell.com Message-Id: In-Reply-To: <5cbb8981-5e24-4dce-a78f-1cabc29f08e3@amd.com> References: <20240425172758.67831-1-lsanche@lyndeno.ca> <20240429164844.7544-2-lsanche@lyndeno.ca> <5cbb8981-5e24-4dce-a78f-1cabc29f08e3@amd.com> X-Mailer: geary/44.1 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=us-ascii; format=flowed On Mon, Apr 29 2024 at 12:45:19 PM -05:00:00, Mario Limonciello wrote: > On 4/29/2024 11:48, Lyndon Sanche wrote: >> #include >> #include >> #include >> +#include >> +#include > > These should be inserted in alphabetical order. Agree >> + >> + // Clean up but do not fail > > Switch comment style to /* */ Agree > >> + if (platform_profile_register(thermal_handler)) >> + kfree(thermal_handler); > > Don't you also want to return an error in this case? Because this > means that the platform supports thermal modes but it failed to setup > due to other issues. > > It's different than the case of no supported modes in which case > returning 0 makes sense. > > Maybe like this: > > > ret = platform_profile_register(thermal_handler); > if (ret) > kfree(thermal_handler); > > return ret; Good idea, I will propogate this error. Failure of module will then occur on allocation or platform_profile error. > > >> >> goto fail_rfkill; >> } >> + // Do not fail module if thermal modes not supported, just skip > > Switch comment style to /* */ Agree. Thank you for this feedback. Lyndon >