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: <CAP-5=fW_tgXjWpevy+y4gY5XxpYq27zHahPZ8fv5L3+LdjaFnQ@mail.gmail.com>
Date:   Wed, 12 Jul 2023 18:20:12 -0700
From:   Ian Rogers <irogers@...gle.com>
To:     baomingtong001@...suo.com
Cc:     peterz@...radead.org, mingo@...hat.com, acme@...nel.org,
        mark.rutland@....com, alexander.shishkin@...ux.intel.com,
        jolsa@...nel.org, namhyung@...nel.org, adrian.hunter@...el.com,
        anshuman.khandual@....com, linux-perf-users@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf tools:remove unneeded variable from perf_event_attr__fprintf()

On Tue, Jun 13, 2023 at 11:25 PM <baomingtong001@...suo.com> wrote:
>
> fix the following coccicheck warning:
>
> tools/perf/util/perf_event_attr_fprintf.c:97:5-8: Unneeded variable:
> "ret". Return "0".
>
> Signed-off-by: Mingtong Bao <baomingtong001@...suo.com>

Acked-by: Ian Rogers <irogers@...gle.com>

Thanks,
Ian

> ---
>   tools/perf/util/perf_event_attr_fprintf.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/tools/perf/util/perf_event_attr_fprintf.c
> b/tools/perf/util/perf_event_attr_fprintf.c
> index 7e5e7b30510d..4a8f625b80c7 100644
> --- a/tools/perf/util/perf_event_attr_fprintf.c
> +++ b/tools/perf/util/perf_event_attr_fprintf.c
> @@ -94,7 +94,6 @@ int perf_event_attr__fprintf(FILE *fp, struct
> perf_event_attr *attr,
>                    attr__fprintf_f attr__fprintf, void *priv)
>   {
>       char buf[BUF_SIZE];
> -    int ret = 0;
>
>       PRINT_ATTRf(type, p_unsigned);
>       PRINT_ATTRf(size, p_unsigned);
> @@ -155,5 +154,5 @@ int perf_event_attr__fprintf(FILE *fp, struct
> perf_event_attr *attr,
>       PRINT_ATTRf(aux_sample_size, p_unsigned);
>       PRINT_ATTRf(sig_data, p_unsigned);
>
> -    return ret;
> +    return 0;
>   }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ