Re: [PATCH] ACPICA: Fix return

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 8, 2022 at 12:48 PM <wangkailong@xxxxxxx> wrote:
>
> return is not a function, parentheses are not required
>
> Signed-off-by: KaiLong Wang <wangkailong@xxxxxxx>

ACPICA material is to be submitted to the upstream project at GitHub
(please see MAINTAINERS for the link).

You may notice, however, that your changes do not align with the
coding style there.

Moreover, the patch contains non-ACPICA changes that are not mentioned
in the changelog.

> ---
>  drivers/acpi/acpica/evsci.c                     | 12 +++++-------
>  drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 17 +++++++----------
>  2 files changed, 12 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/acpi/acpica/evsci.c b/drivers/acpi/acpica/evsci.c
> index 3915ff61412b..63dd2aa2d16a 100644
> --- a/drivers/acpi/acpica/evsci.c
> +++ b/drivers/acpi/acpica/evsci.c
> @@ -38,9 +38,8 @@ u32 acpi_ev_sci_dispatch(void)
>
>         /* Are there any host-installed SCI handlers? */
>
> -       if (!acpi_gbl_sci_handler_list) {
> -               return (int_status);
> -       }
> +       if (!acpi_gbl_sci_handler_list)
> +               return int_status;
>
>         flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
>
> @@ -57,7 +56,7 @@ u32 acpi_ev_sci_dispatch(void)
>         }
>
>         acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
> -       return (int_status);
> +       return int_status;
>  }
>
>  /*******************************************************************************
> @@ -193,9 +192,8 @@ acpi_status acpi_ev_remove_all_sci_handlers(void)
>             acpi_os_remove_interrupt_handler((u32) acpi_gbl_FADT.sci_interrupt,
>                                              acpi_ev_sci_xrupt_handler);
>
> -       if (!acpi_gbl_sci_handler_list) {
> -               return (status);
> -       }
> +       if (!acpi_gbl_sci_handler_list)
> +               return status;
>
>         flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
>
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
> index 38d71b5c1f2d..66661a20117b 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
> @@ -29,7 +29,6 @@
>  #include "core_types.h"
>  #include "resource.h"
>  #include "ipp.h"
> -#include "timing_generator.h"
>  #include "dc_dmub_srv.h"
>
>  #define DC_LOGGER dc->ctx->logger
> @@ -152,9 +151,8 @@ static void dc_stream_free(struct kref *kref)
>
>  void dc_stream_release(struct dc_stream_state *stream)
>  {
> -       if (stream != NULL) {
> +       if (stream != NULL)
>                 kref_put(&stream->refcount, dc_stream_free);
> -       }
>  }
>
>  struct dc_stream_state *dc_create_stream_for_sink(
> @@ -316,11 +314,11 @@ bool dc_stream_set_cursor_attributes(
>         struct dc  *dc;
>         bool reset_idle_optimizations = false;
>
> -       if (NULL == stream) {
> +       if (stream == NULL) {
>                 dm_error("DC: dc_stream is NULL!\n");
>                 return false;
>         }
> -       if (NULL == attributes) {
> +       if (attributes == NULL) {
>                 dm_error("DC: attributes is NULL!\n");
>                 return false;
>         }
> @@ -399,12 +397,12 @@ bool dc_stream_set_cursor_position(
>         struct dc  *dc = stream->ctx->dc;
>         bool reset_idle_optimizations = false;
>
> -       if (NULL == stream) {
> +       if (stream == NULL) {
>                 dm_error("DC: dc_stream is NULL!\n");
>                 return false;
>         }
>
> -       if (NULL == position) {
> +       if (position == NULL) {
>                 dm_error("DC: cursor position is NULL!\n");
>                 return false;
>         }
> @@ -468,9 +466,8 @@ bool dc_stream_add_writeback(struct dc *dc,
>                 }
>         }
>
> -       if (!isDrc) {
> +       if (!isDrc)
>                 stream->writeback_info[stream->num_wb_info++] = *wb_info;
> -       }
>
>         if (dc->hwss.enable_writeback) {
>                 struct dc_stream_status *stream_status = dc_stream_get_status(stream);
> @@ -526,7 +523,7 @@ bool dc_stream_remove_writeback(struct dc *dc,
>         /* remove writeback info for disabled writeback pipes from stream */
>         for (i = 0, j = 0; i < stream->num_wb_info; i++) {
>                 if (stream->writeback_info[i].wb_enabled) {
> -                       if (j < i)
> +                       if (i != j)
>                                 /* trim the array */
>                                 stream->writeback_info[j] = stream->writeback_info[i];
>                         j++;
> --
> 2.36.1



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux