From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.218.47 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796224598; b=OBNOON8Al2C9TqoNxRjCVQ/x21yX/lUbOM9ZJvzOqpDIxUnudKzC+/liNd9xuZl5wQ/n /Jb0vTQbJYaG3WOphbMj+TQTO4rMUIdC9dyAnU4yb4UJ49/zAudNxKs6pwsayZC4rr4QS XlqPzZS8WrZZVd9nOf+TvqYRArsN0uD1J8Bq12l45XOy0vMJjOdCUg1MmuMkDsMO+n5tp S/ZlhRevQj6SZUaMxLO0yYAb+yQ7peTn22FaKDWrHmH1S776G/1cJBeri8ksj2VNQqmk0 Q97zBLdnDDmmU3I9b9GjDC9bvjPRxW8rmD/yNRthnrFfS3x1s5JGSXkygrGOWpBnubg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796224598; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:Message-ID:Date: MIME-Version:User-Agent:Subject:To:Cc:References:Content-Language: From:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=M0mywiz0l3fCjQHSkhSQdR2dhrnuwCP1WjrUOEQuQ44=; b=QACaXuMgWfQyVCMKXcRJNlyUfP/At6iq6CdvVrAMkp0QW/Y9GTa8sgVxk8UyHVqNAhi/ keRNJcrXmjKOs8P4ffpDZT2TZ320E/iw1GMAqMaytW75dHd3wDSdi7LWxTyaijIQzKoDn HfLwvhroq/+QqS+WshRRj6CZdX4HXJE6BXQa8lPmXzqX6D0P8AFoJ/XMU6hOShECwhMoA HUxBINzznU/ica9PzBs15vCz7yX0a084R025rFFlu+9/5RLT7VmT8E99JGqspAeYfdsaF b5Kk6VCKUVV01Pv1pp4HomL3YlCDJAs8pE2mL6mASasNitOmwXMmxtDoYgAU5s0slNQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=AvFWwwYX; arc=none smtp.remote-ip=209.85.218.47 Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BB5FB606A31A for ; Wed, 2 Dec 2026 15:16:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BB5FB606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=AvFWwwYX Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-c4d2b741ed9so2104779566b.2 for ; Wed, 02 Dec 2026 07:16:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796224596; x=1796829396; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=M0mywiz0l3fCjQHSkhSQdR2dhrnuwCP1WjrUOEQuQ44=; b=AvFWwwYX41SA+BXSciZRnQAYPheo6cQ+OA/3CfMLvewddhNv45MpIc2MuJzdZZP4GB Um0vE0PwYD1pdxxUuBdCal95yVukhLMUmTFIOHw2GS+qWIMdyP64/PB4JiRhQVvPWjbf 9RGDtOxsLBYPjW2FVdKBilXI7ffgCaqXkAg6sxhIQLe2eWFXMdYXSe29RVxjJT8NhoTj a735/b8BPV0+FmJCDPj3JQFArgInr460wVNKXbY/d020UOcOoM0PJZS5YpkshWHsGRdU LZuBVTqmS7hpd9wPXvKHxbRDAT6awamYRCRD2ASGrzonyYMUV0yEtOiIwDh8rbpAN4ql U9Lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796224596; x=1796829396; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=M0mywiz0l3fCjQHSkhSQdR2dhrnuwCP1WjrUOEQuQ44=; b=k1DZ4LjQl+4GvkwQ3xK8yDqLaaqJRvkc7CvBcH535xeJQyUTdbmgGmrFdFDVIW5MpZ yNJg3lXylzoYbzYIoXVqaQjIfqpceNJ/54vTvv6CDpjzsMM/oAwyA0q6NYLhu289NYKd BcoEBdI8De22wcbrFNmuFYGC7tFaTmLGQ2BfYYxO8yCZ2c/QZHcVkTqRKYs7t4bLNz9G l4ZZmb6ZJe+jUSrAhBQeonI3yxtT1xdIq1KBfSw1LjRRukmcnvLtupwQVP3SruUdIW1x s2BDQhUXjaI6HffoPutzEKce+pX5BmkuvlXb2yAkQpUgPBg/ChYEOxbWadYD1ND9zA5b k3ng== X-Gm-Message-State: APuU4Z8AG1wI7ULBpHRXF8TeI+ZK1XwavqKL895YGb68G1zK8WvdF7+e McaOPcEiD/LFA/XxF+wOlgHUXjt6WLNCsLHczTY6vS8VQQizbjlo/E+d X-Gm-Gg: AZFdTZdBVmMekYPyQm3JXIDXPW177ldREOdaERs5hYtGG9jW4KEAQHBE2llTURWpubn X7L9hQbkhW3MSp9IawEYtASRk/065c7q03LFhMJQDvprLbrgXtOBcenHlZ7+C1eMtuCeLgANwfa rvKj/cPOupYSRZiNU8HhvkkKI/PF47xdFZyCOLqIkP7alklDRxHEH2buijHVdmUl7qxXHESgwFN hc+e2MpZpCcmBVWVTc9NfgFzHnET/5vnIkotz5YFW07RQ0s5V+WgLzHr0JzykCzslFbdQ2ZcmKw 0WsqgfdN1jesIxknrBbWh4a7FWjM1TrJx/BqaKGHKtgtL5qtgqZgEYnbXxFhhVoIbrpTn3ueUbP 5skSCIsRonA+1dbx37VQU/ZMzn8+y29REPPi+DJWT9qnTZ5sGaQkAv4tIpcFecsS2tTBykhJZA8 SHLHiHI9fN0HDJ5VV1yGn3tQSq68Gr8I94mR+idsXUcyCpazSDpU3MccmuhuIXzpzTCtLf/mcAS rFT1hhaPsUMYqdo6KdnaKH+0qiWDoHHsk3P/ax69EJSsH/dSyYSVEtuF6nUpNZlp7DHMHGPfZxG kN1Wto2OM+xnE3q+a9f5Bf7G1hI7 X-Received: by 2002:a17:906:f5a9:b0:c51:fd79:890c with SMTP id a640c23a62f3a-c51fd798a6cmr963432166b.5.1796224596076; Wed, 02 Dec 2026 07:16:36 -0800 (PST) Received: from [10.10.0.155] ([85.105.252.11]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c513ae679e3sm1373074766b.22.2026.12.02.07.16.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 02 Dec 2026 07:16:35 -0800 (PST) Message-ID: <3c484c2e-c6a3-4a62-b1ad-7bfe7aa82c87@gmail.com> Date: Wed, 2 Dec 2026 18:16:31 +0300 X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/3] platform/asus: asus-wmi: Document asus_wmi_evaluate_method_buf() To: Denis Benato , Corentin Chary , "Luke D. Jones" , Hans de Goede , =?UTF-8?Q?Ilpo_J=C3=A4rvinen?= Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org References: <20261202-asus-wmi-eval-buf-v1-0-640c12d437dc@gmail.com> <20261202-asus-wmi-eval-buf-v1-3-640c12d437dc@gmail.com> <177a8ebd-aabb-4178-8a7d-d8827a983e8f@linux.dev> Content-Language: en-US From: Bartu Alev In-Reply-To: <177a8ebd-aabb-4178-8a7d-d8827a983e8f@linux.dev> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 12/2/26 5:50 AM, Denis Benato wrote: > This is confusing to me, can you make it shorter? > > "Anything other than a buffer is reported as an error"... anything what? > The answer? > > The sentence "The firmware answers with an integer instead" doesn't > make sense to me, probably because it's too convoluted and mixing > implementation details, ACPI asus methods and function inner working. yes, that wording was overly convoluted and leaked internal details. would a shorter version like this work for v2? /** * asus_wmi_evaluate_method_buf() - Evaluate a WMI method returning a buffer * @method_id: WMI method ID to evaluate (e.g. %ASUS_WMI_METHODID_DSTS) * @arg0: First method argument, usually the device ID * @arg1: Second method argument * @ret_buffer: Caller buffer to copy the returned ACPI buffer into * @size: Size of @ret_buffer in bytes * * Evaluate @method_id and copy the returned ACPI buffer into @ret_buffer. * If the reply is shorter than @size, only the returned bytes are copied * and the remainder of @ret_buffer is left untouched. * * Non-buffer ACPI replies are treated as errors: %ASUS_WMI_UNSUPPORTED_METHOD * (0xfffffffe) and 0xffffffff map to -ENODEV, while any other integer * (such as 0 when an argument is omitted) or unexpected object type maps * to -ENODATA. * * Return: * * %0 - Success, buffer copied into @ret_buffer. * * %-EIO - WMI method evaluation failed. * * %-ENODEV - Firmware reported the device or method as unsupported. * * %-ENOSPC - Returned buffer is larger than @size. * * %-ENODATA - No object returned, empty buffer, or unexpected reply. */