From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Anders Roxell <anders.roxell@linaro.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] intel_th: msu: fix unused variables
Date: Wed, 8 May 2019 11:10:55 +0200 [thread overview]
Message-ID: <CAMuHMdUEaNto48rxq_8=zx3+9cuMp4UxY=dL0TjbqYo=9dxB9A@mail.gmail.com> (raw)
In-Reply-To: <20190507135233.31836-1-anders.roxell@linaro.org>
On Tue, May 7, 2019 at 3:53 PM Anders Roxell <anders.roxell@linaro.org> wrote:
> When building and CONFIG_X86 isn't set the compiler rightly complains
> about an unused varable 'i', see the warning below:
>
> ../drivers/hwtracing/intel_th/msu.c: In function ‘msc_buffer_win_alloc’:
> ../drivers/hwtracing/intel_th/msu.c:783:21: warning: unused variable ‘i’ [-Wunused-variable]
> int ret = -ENOMEM, i;
> ^
> ../drivers/hwtracing/intel_th/msu.c: In function ‘msc_buffer_win_free’:
> ../drivers/hwtracing/intel_th/msu.c:863:6: warning: unused variable ‘i’ [-Wunused-variable]
> int i;
> ^
>
> Rework so that an else part is added where empty functions are created
> for set_memory_uc() and set_memory_wb(), in that way we could remove
> '#ifdef CONFIG_X86' in function msc_buffer_win_alloc() and
> msc_buffer_win_free().
>
> Fixes: ba39bd830605 ("intel_th: msu: Switch over to scatterlist")
> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Thanks for your patch!
> --- a/drivers/hwtracing/intel_th/msu.c
> +++ b/drivers/hwtracing/intel_th/msu.c
> @@ -21,6 +21,11 @@
>
> #ifdef CONFIG_X86
> #include <asm/set_memory.h>
> +#else
> +static void set_memory_uc(unsigned long addr, int numpages)
static inline?
> +{}
> +static void set_memory_wb(unsigned long addr, int numpages)
static inline?
> +{}
> #endif
Regardless:
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
prev parent reply other threads:[~2019-05-08 9:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-07 13:52 [PATCH] intel_th: msu: fix unused variables Anders Roxell
2019-05-08 9:10 ` Geert Uytterhoeven [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='CAMuHMdUEaNto48rxq_8=zx3+9cuMp4UxY=dL0TjbqYo=9dxB9A@mail.gmail.com' \
--to=geert@linux-m68k.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=anders.roxell@linaro.org \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).