All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: Tales Aparecida <tales.aparecida@gmail.com>
Cc: "Daniel Vetter" <daniel@ffwll.ch>,
	siqueirajordao@riseup.net, magalilemes00@gmail.com,
	"Leo Li" <sunpeng.li@amd.com>, "Pan, Xinhui" <Xinhui.Pan@amd.com>,
	"Rodrigo Siqueira" <Rodrigo.Siqueira@amd.com>,
	amd-gfx@lists.freedesktop.org, mwen@igalia.com,
	"David Airlie" <airlied@linux.ie>,
	"Isabella Basso" <isabbasso@riseup.net>,
	davidgow@google.com, "Alex Deucher" <alexander.deucher@amd.com>,
	mairacanal@riseup.net, andrealmeid@riseup.net,
	"Harry Wentland" <harry.wentland@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"Trevor Woerner" <twoerner@gmail.com>
Subject: Re: [PATCH 2/2] drm/amd/display: fix minor codestyle problems
Date: Mon, 15 Aug 2022 16:31:45 -0400	[thread overview]
Message-ID: <CADnq5_PiXKXaaLbkT4yCNUqREqxrL2Vh7AoxQXQ7PkOEFj=yZQ@mail.gmail.com> (raw)
In-Reply-To: <20220811204327.411709-3-tales.aparecida@gmail.com>

Applied the series.  Thanks!

Alex

On Thu, Aug 11, 2022 at 4:44 PM Tales Aparecida
<tales.aparecida@gmail.com> wrote:
>
> Fixes five checkpatch warnings:
>
> CHECK: Please don't use multiple blank lines
> +
> +
>
> ERROR: Macros with complex values should be enclosed in parentheses
> +#define MAX_I64 \
> +       (int64_t)((1ULL << 63) - 1)
>
> WARNING: Missing a blank line after declarations
> +       struct bw_fixed res;
> +       ASSERT(value < BW_FIXED_MAX_I32 && value > BW_FIXED_MIN_I32);
>
> ERROR: that open brace { should be on the previous line
> +               do
> +               {
>
> ERROR: that open brace { should be on the previous line
> +                       if (remainder >= arg2_value)
> +                       {
>
> Signed-off-by: Tales Aparecida <tales.aparecida@gmail.com>
> ---
>  drivers/gpu/drm/amd/display/dc/dml/calcs/bw_fixed.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dml/calcs/bw_fixed.c b/drivers/gpu/drm/amd/display/dc/dml/calcs/bw_fixed.c
> index 2d46bc527b21..3aa8dd0acd5e 100644
> --- a/drivers/gpu/drm/amd/display/dc/dml/calcs/bw_fixed.c
> +++ b/drivers/gpu/drm/amd/display/dc/dml/calcs/bw_fixed.c
> @@ -25,9 +25,8 @@
>  #include "dm_services.h"
>  #include "bw_fixed.h"
>
> -
>  #define MAX_I64 \
> -       (int64_t)((1ULL << 63) - 1)
> +       ((int64_t)((1ULL << 63) - 1))
>
>  #define MIN_I64 \
>         (-MAX_I64 - 1)
> @@ -49,6 +48,7 @@ static uint64_t abs_i64(int64_t arg)
>  struct bw_fixed bw_int_to_fixed_nonconst(int64_t value)
>  {
>         struct bw_fixed res;
> +
>         ASSERT(value < BW_FIXED_MAX_I32 && value > BW_FIXED_MIN_I32);
>         res.value = value << BW_FIXED_BITS_PER_FRACTIONAL_PART;
>         return res;
> @@ -78,14 +78,12 @@ struct bw_fixed bw_frc_to_fixed(int64_t numerator, int64_t denominator)
>         {
>                 uint32_t i = BW_FIXED_BITS_PER_FRACTIONAL_PART;
>
> -               do
> -               {
> +               do {
>                         remainder <<= 1;
>
>                         res_value <<= 1;
>
> -                       if (remainder >= arg2_value)
> -                       {
> +                       if (remainder >= arg2_value) {
>                                 res_value |= 1;
>                                 remainder -= arg2_value;
>                         }
> --
> 2.37.0
>

      reply	other threads:[~2022-08-15 20:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-11 20:43 [PATCH 0/2] drm/amd/display: fix MIN_I64 overflow on bw_fixed.c Tales Aparecida
2022-08-11 20:43 ` [PATCH 1/2] drm/amd/display: fix overflow on MIN_I64 definition Tales Aparecida
2022-08-11 20:43 ` [PATCH 2/2] drm/amd/display: fix minor codestyle problems Tales Aparecida
2022-08-15 20:31   ` Alex Deucher [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADnq5_PiXKXaaLbkT4yCNUqREqxrL2Vh7AoxQXQ7PkOEFj=yZQ@mail.gmail.com' \
    --to=alexdeucher@gmail.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=Xinhui.Pan@amd.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=andrealmeid@riseup.net \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=davidgow@google.com \
    --cc=harry.wentland@amd.com \
    --cc=isabbasso@riseup.net \
    --cc=magalilemes00@gmail.com \
    --cc=mairacanal@riseup.net \
    --cc=mwen@igalia.com \
    --cc=siqueirajordao@riseup.net \
    --cc=sunpeng.li@amd.com \
    --cc=tales.aparecida@gmail.com \
    --cc=twoerner@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.