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: <CAKwvOdndQiSbMK6a7nU01HiovY-Bdjt4m4gOO5m5A36y8qQ8=A@mail.gmail.com>
Date:   Fri, 7 Apr 2023 10:49:44 -0700
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     Tom Rix <trix@...hat.com>
Cc:     zackr@...are.com, linux-graphics-maintainer@...are.com,
        airlied@...il.com, daniel@...ll.ch, nathan@...nel.org,
        dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
        llvm@...ts.linux.dev
Subject: Re: [PATCH] drm/vmwgfx: remove unused mksstat_init_record function

On Fri, Mar 24, 2023 at 12:54 PM Tom Rix <trix@...hat.com> wrote:
>
> clang with W=1 reports
> drivers/gpu/drm/vmwgfx/vmwgfx_msg.c:716:21: error: unused function
>   'mksstat_init_record' [-Werror,-Wunused-function]
> static inline char *mksstat_init_record(mksstat_kern_stats_t stat_idx,
>                     ^
> This function is not used so remove it.
>
> Signed-off-by: Tom Rix <trix@...hat.com>
> ---
>  drivers/gpu/drm/vmwgfx/vmwgfx_msg.c | 26 --------------------------
>  1 file changed, 26 deletions(-)
>
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c b/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c
> index e76976a95a1e..ca1a3fe44fa5 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c
> @@ -702,32 +702,6 @@ static inline void hypervisor_ppn_remove(PPN64 pfn)
>  /* Header to the text description of mksGuestStat instance descriptor */
>  #define MKSSTAT_KERNEL_DESCRIPTION "vmwgfx"
>
> -/**
> - * mksstat_init_record: Initializes an MKSGuestStatCounter-based record
> - * for the respective mksGuestStat index.
> - *
> - * @stat_idx: Index of the MKSGuestStatCounter-based mksGuestStat record.
> - * @pstat: Pointer to array of MKSGuestStatCounterTime.
> - * @pinfo: Pointer to array of MKSGuestStatInfoEntry.
> - * @pstrs: Pointer to current end of the name/description sequence.
> - * Return: Pointer to the new end of the names/description sequence.
> - */
> -
> -static inline char *mksstat_init_record(mksstat_kern_stats_t stat_idx,
> -       MKSGuestStatCounterTime *pstat, MKSGuestStatInfoEntry *pinfo, char *pstrs)
> -{
> -       char *const pstrd = pstrs + strlen(mksstat_kern_name_desc[stat_idx][0]) + 1;
> -       strcpy(pstrs, mksstat_kern_name_desc[stat_idx][0]);
> -       strcpy(pstrd, mksstat_kern_name_desc[stat_idx][1]);
> -
> -       pinfo[stat_idx].name.s = pstrs;
> -       pinfo[stat_idx].description.s = pstrd;
> -       pinfo[stat_idx].flags = MKS_GUEST_STAT_FLAG_NONE;

This was the last user of MKS_GUEST_STAT_FLAG_NONE, is there anything
else to clean up there?  Otherwise LGTM.
Reviewed-by: Nick Desaulniers <ndesaulniers@...gle.com>

> -       pinfo[stat_idx].stat.counter = (MKSGuestStatCounter *)&pstat[stat_idx];
> -
> -       return pstrd + strlen(mksstat_kern_name_desc[stat_idx][1]) + 1;
> -}
> -
>  /**
>   * mksstat_init_record_time: Initializes an MKSGuestStatCounterTime-based record
>   * for the respective mksGuestStat index.
> --
> 2.27.0
>


-- 
Thanks,
~Nick Desaulniers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ