From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 166F3C433F5 for ; Tue, 1 Mar 2022 19:40:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236875AbiCATlT (ORCPT ); Tue, 1 Mar 2022 14:41:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235982AbiCATlT (ORCPT ); Tue, 1 Mar 2022 14:41:19 -0500 Received: from mail-yw1-f177.google.com (mail-yw1-f177.google.com [209.85.128.177]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 318A765494; Tue, 1 Mar 2022 11:40:38 -0800 (PST) Received: by mail-yw1-f177.google.com with SMTP id 00721157ae682-2d07c4a0d06so156071267b3.13; Tue, 01 Mar 2022 11:40:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rC4BvLXBCXqc68pcQ7m+8z/EJtaEH/MsSh5u4qPMaYc=; b=8EHGEbua/oGeSyQUtI/MrV2CcYEyH/d49+zMmDMvo8umN+6wx3t5kciPpKlA6rS225 G3jIUyIJNnFeaLorxKJaJQSRR8mDXcDNnxcLcKeB9dOGzexMychR3xow0PoTzl+oDIdf YMNK7OeP3C5qC0sboLEk+LV1hQ0JeQz8+WjtC9jywXhRl/7U5SKKhkEu+guB6DOaZE+t IbvgNvDSzhZzS4YsUkrezFfAQFlxTIGHacdc4pd/OLOonFjW6cKGMaA3euswl10djTxn mU0Fi3TWf+wyhAzdqThTrcSzSwieOukwUERwQqwWYWLmloxMACCnYpYOVWosU0bsq29z Jo1Q== X-Gm-Message-State: AOAM531ztxFb6jy4TYyI6dkfum8eUPuWyQaUPmoJaHt0FK0QCCvOgJLL kDahWjtc/3K7QhTWe8wjW5sDUqtrKm6bVhmwxwM= X-Google-Smtp-Source: ABdhPJzqz8NvN2OYlSJ4r049oH9twxzobfp3rZ5a9AqKOhlvAWL0GuQURf4suVyw4zXef72pObOLA5ljD92LHelrPUU= X-Received: by 2002:a81:1611:0:b0:2d6:3290:9bd3 with SMTP id 17-20020a811611000000b002d632909bd3mr26858713yww.19.1646163637141; Tue, 01 Mar 2022 11:40:37 -0800 (PST) MIME-Version: 1.0 References: <20220224113807.91771-1-pmenzel@molgen.mpg.de> In-Reply-To: <20220224113807.91771-1-pmenzel@molgen.mpg.de> From: "Rafael J. Wysocki" Date: Tue, 1 Mar 2022 20:40:26 +0100 Message-ID: Subject: Re: [PATCH 1/4] acpi: exsystem: Add units to time variable names To: Paul Menzel Cc: Robert Moore , "Rafael J. Wysocki" , Len Brown , ACPI Devel Maling List , "open list:ACPI COMPONENT ARCHITECTURE (ACPICA)" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On Thu, Feb 24, 2022 at 12:38 PM Paul Menzel wrote: > > `how_long` uses different units in both functions, so make it more > clear, what unit they expect. > > Signed-off-by: Paul Menzel > --- > drivers/acpi/acpica/exsystem.c | 20 ++++++++++---------- As ACPICA material, this should be submitted to the upstream project via https://github.com/acpica/acpica/. This applies to the other patches in the series too. > 1 file changed, 10 insertions(+), 10 deletions(-) > > diff --git a/drivers/acpi/acpica/exsystem.c b/drivers/acpi/acpica/exsystem.c > index 1281c07112de..6bc5b46e6927 100644 > --- a/drivers/acpi/acpica/exsystem.c > +++ b/drivers/acpi/acpica/exsystem.c > @@ -107,7 +107,7 @@ acpi_status acpi_ex_system_wait_mutex(acpi_mutex mutex, u16 timeout) > * > * FUNCTION: acpi_ex_system_do_stall > * > - * PARAMETERS: how_long - The amount of time to stall, > + * PARAMETERS: how_long_us - The amount of time to stall, > * in microseconds > * > * RETURN: Status > @@ -120,13 +120,13 @@ acpi_status acpi_ex_system_wait_mutex(acpi_mutex mutex, u16 timeout) > * > ******************************************************************************/ > > -acpi_status acpi_ex_system_do_stall(u32 how_long) > +acpi_status acpi_ex_system_do_stall(u32 how_long_us) > { > acpi_status status = AE_OK; > > ACPI_FUNCTION_ENTRY(); > > - if (how_long > 255) { /* 255 microseconds */ > + if (how_long_us > 255) { /* 255 microseconds */ > /* > * Longer than 255 usec, this is an error > * > @@ -134,10 +134,10 @@ acpi_status acpi_ex_system_do_stall(u32 how_long) > * order to support existing BIOSs) > */ > ACPI_ERROR((AE_INFO, > - "Time parameter is too large (%u)", how_long)); > + "Time parameter is too large (%u)", how_long_us)); > status = AE_AML_OPERAND_VALUE; > } else { > - acpi_os_stall(how_long); > + acpi_os_stall(how_long_us); > } > > return (status); > @@ -147,7 +147,7 @@ acpi_status acpi_ex_system_do_stall(u32 how_long) > * > * FUNCTION: acpi_ex_system_do_sleep > * > - * PARAMETERS: how_long - The amount of time to sleep, > + * PARAMETERS: how_long_ms - The amount of time to sleep, > * in milliseconds > * > * RETURN: None > @@ -156,7 +156,7 @@ acpi_status acpi_ex_system_do_stall(u32 how_long) > * > ******************************************************************************/ > > -acpi_status acpi_ex_system_do_sleep(u64 how_long) > +acpi_status acpi_ex_system_do_sleep(u64 how_long_ms) > { > ACPI_FUNCTION_ENTRY(); > > @@ -168,11 +168,11 @@ acpi_status acpi_ex_system_do_sleep(u64 how_long) > * For compatibility with other ACPI implementations and to prevent > * accidental deep sleeps, limit the sleep time to something reasonable. > */ > - if (how_long > ACPI_MAX_SLEEP) { > - how_long = ACPI_MAX_SLEEP; > + if (how_long_ms > ACPI_MAX_SLEEP) { > + how_long_ms = ACPI_MAX_SLEEP; > } > > - acpi_os_sleep(how_long); > + acpi_os_sleep(how_long_ms); > > /* And now we must get the interpreter again */ > > -- > 2.35.1 > From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============6458649774726088249==" MIME-Version: 1.0 From: Rafael J. Wysocki Subject: [Devel] Re: [PATCH 1/4] acpi: exsystem: Add units to time variable names Date: Tue, 01 Mar 2022 20:40:26 +0100 Message-ID: In-Reply-To: 20220224113807.91771-1-pmenzel@molgen.mpg.de List-ID: To: devel@acpica.org --===============6458649774726088249== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Thu, Feb 24, 2022 at 12:38 PM Paul Menzel wrot= e: > > `how_long` uses different units in both functions, so make it more > clear, what unit they expect. > > Signed-off-by: Paul Menzel > --- > drivers/acpi/acpica/exsystem.c | 20 ++++++++++---------- As ACPICA material, this should be submitted to the upstream project via https://github.com/acpica/acpica/. This applies to the other patches in the series too. > 1 file changed, 10 insertions(+), 10 deletions(-) > > diff --git a/drivers/acpi/acpica/exsystem.c b/drivers/acpi/acpica/exsyste= m.c > index 1281c07112de..6bc5b46e6927 100644 > --- a/drivers/acpi/acpica/exsystem.c > +++ b/drivers/acpi/acpica/exsystem.c > @@ -107,7 +107,7 @@ acpi_status acpi_ex_system_wait_mutex(acpi_mutex mute= x, u16 timeout) > * > * FUNCTION: acpi_ex_system_do_stall > * > - * PARAMETERS: how_long - The amount of time to stall, > + * PARAMETERS: how_long_us - The amount of time to stall, > * in microseconds > * > * RETURN: Status > @@ -120,13 +120,13 @@ acpi_status acpi_ex_system_wait_mutex(acpi_mutex mu= tex, u16 timeout) > * > ***********************************************************************= *******/ > > -acpi_status acpi_ex_system_do_stall(u32 how_long) > +acpi_status acpi_ex_system_do_stall(u32 how_long_us) > { > acpi_status status =3D AE_OK; > > ACPI_FUNCTION_ENTRY(); > > - if (how_long > 255) { /* 255 microseconds */ > + if (how_long_us > 255) { /* 255 microseconds */ > /* > * Longer than 255 usec, this is an error > * > @@ -134,10 +134,10 @@ acpi_status acpi_ex_system_do_stall(u32 how_long) > * order to support existing BIOSs) > */ > ACPI_ERROR((AE_INFO, > - "Time parameter is too large (%u)", how_long)= ); > + "Time parameter is too large (%u)", how_long_= us)); > status =3D AE_AML_OPERAND_VALUE; > } else { > - acpi_os_stall(how_long); > + acpi_os_stall(how_long_us); > } > > return (status); > @@ -147,7 +147,7 @@ acpi_status acpi_ex_system_do_stall(u32 how_long) > * > * FUNCTION: acpi_ex_system_do_sleep > * > - * PARAMETERS: how_long - The amount of time to sleep, > + * PARAMETERS: how_long_ms - The amount of time to sleep, > * in milliseconds > * > * RETURN: None > @@ -156,7 +156,7 @@ acpi_status acpi_ex_system_do_stall(u32 how_long) > * > ***********************************************************************= *******/ > > -acpi_status acpi_ex_system_do_sleep(u64 how_long) > +acpi_status acpi_ex_system_do_sleep(u64 how_long_ms) > { > ACPI_FUNCTION_ENTRY(); > > @@ -168,11 +168,11 @@ acpi_status acpi_ex_system_do_sleep(u64 how_long) > * For compatibility with other ACPI implementations and to preve= nt > * accidental deep sleeps, limit the sleep time to something reas= onable. > */ > - if (how_long > ACPI_MAX_SLEEP) { > - how_long =3D ACPI_MAX_SLEEP; > + if (how_long_ms > ACPI_MAX_SLEEP) { > + how_long_ms =3D ACPI_MAX_SLEEP; > } > > - acpi_os_sleep(how_long); > + acpi_os_sleep(how_long_ms); > > /* And now we must get the interpreter again */ > > -- > 2.35.1 > --===============6458649774726088249==--