lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABDvA=nFq6nPMyhB3C87XxVkxXwy23NQVES2Na_TVB6VreKrrQ@mail.gmail.com>
Date:   Mon, 26 Mar 2018 22:34:54 +1000
From:   Ben Skeggs <bskeggs@...hat.com>
To:     Arushi Singhal <arushisinghal19971997@...il.com>
Cc:     linux-kernel@...r.kernel.org,
        dri-devel <dri-devel@...ts.freedesktop.org>,
        David Airlie <airlied@...ux.ie>, seanpaul@...omium.org,
        gustavo@...ovan.org, daniel.vetter@...el.com,
        nouveau <nouveau@...ts.freedesktop.org>
Subject: Re: [PATCH v2 2/2] gpu: drm: nouveau: Use list_{next/prev}_entry
 instead of list_entry

On Mon, Mar 26, 2018 at 4:01 AM, Arushi Singhal
<arushisinghal19971997@...il.com> wrote:
> It's better to use list_entry instead of list_{next/prev}_entry
> as it makes the code more clear to read.
> This patch replace list_entry with list_{next/prev}_entry.
>
> Signed-off-by: Arushi Singhal <arushisinghal19971997@...il.com>
Acked-by: Ben Skeggs <bskeggs@...hat.com>

> ---
>  drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c
> index e4c8d31..81c3567 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c
> @@ -134,7 +134,7 @@ nvkm_cstate_find_best(struct nvkm_clk *clk, struct nvkm_pstate *pstate,
>                                nvkm_volt_map(volt, volt->max2_id, clk->temp));
>
>         for (cstate = start; &cstate->head != &pstate->list;
> -            cstate = list_entry(cstate->head.prev, typeof(*cstate), head)) {
> +            cstate = list_prev_entry(cstate, head)) {
>                 if (nvkm_cstate_valid(clk, cstate, max_volt, clk->temp))
>                         break;
>         }
> --
> 2.7.4
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ