All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>,
	Daniel Bristot de Oliveira <bristot@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] ftrace: Fix -Wcast-function-type warnings on powerpc64
Date: Tue, 5 Oct 2021 12:51:32 -0400	[thread overview]
Message-ID: <20211005125132.4ae5d128@gandalf.local.home> (raw)
In-Reply-To: <20211005165027.GA797862@embeddedor>

On Tue, 5 Oct 2021 11:50:27 -0500
"Gustavo A. R. Silva" <gustavoars@kernel.org> wrote:

> Nop; there are still some warnings (ppc64_defconfig):

Thanks, I'll take a look, and compile it against ppc64_defconfig.

-- Steve

> 
> kernel/trace/ftrace.c: In function ‘ftrace_ops_get_list_func’:
> kernel/trace/ftrace.c:171:10: error: returning ‘void (*)(long unsigned int,  long unsigned int,  struct ftrace_ops *, struct ftrace_regs *)’ from a function with incompatible return type ‘ftrace_func_t’ {aka ‘void (*)(long unsigned int,  long unsigned int)’} [-Werror=incompatible-pointer-types]
>   171 |   return ftrace_ops_list_func;
>       |          ^~~~~~~~~~~~~~~~~~~~
> kernel/trace/ftrace.c: In function ‘update_ftrace_function’:
> kernel/trace/ftrace.c:204:8: error: assignment to ‘ftrace_func_t’ {aka ‘void (*)(long unsigned int,  long unsigned int)’} from incompatible pointer type ‘void (*)(long unsigned int,  long unsigned int,  struct ftrace_ops *, struct ftrace_regs *)’ [-Werror=incompatible-pointer-types]
>   204 |   func = ftrace_ops_list_func;
>       |        ^
> kernel/trace/ftrace.c:217:11: warning: comparison of distinct pointer types lacks a cast
>   217 |  if (func == ftrace_ops_list_func) {
>       |           ^~
> kernel/trace/ftrace.c: In function ‘ftrace_modify_all_code’:
> kernel/trace/ftrace.c:2695:35: error: passing argument 1 of ‘ftrace_update_ftrace_func’ from incompatible pointer type [-Werror=incompatible-pointer-types]
>  2695 |   err = ftrace_update_ftrace_func(ftrace_ops_list_func);
>       |                                   ^~~~~~~~~~~~~~~~~~~~
>       |                                   |
>       |                                   void (*)(long unsigned int,  long unsigned int,  struct ftrace_ops *, struct ftrace_regs *)
> In file included from kernel/trace/ftrace.c:29:
> ./include/linux/ftrace.h:585:52: note: expected ‘ftrace_func_t’ {aka ‘void (*)(long unsigned int,  long unsigned int)’} but argument is of type ‘void (*)(long unsigned int,  long unsigned int,  struct ftrace_ops *, struct ftrace_regs *)’
>   585 | extern int ftrace_update_ftrace_func(ftrace_func_t func);
>       |                                      ~~~~~~~~~~~~~~^~~~
> kernel/trace/ftrace.c:2705:38: warning: comparison of distinct pointer types lacks a cast
>  2705 |  if (update && ftrace_trace_function != ftrace_ops_list_func) {
>       |                                      ^~

  reply	other threads:[~2021-10-05 16:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-05  5:39 [PATCH][next] ftrace: Fix -Wcast-function-type warnings on powerpc64 Gustavo A. R. Silva
2021-10-05 15:17 ` Steven Rostedt
2021-10-05 16:18   ` Gustavo A. R. Silva
2021-10-05 16:35     ` Steven Rostedt
2021-10-05 16:50       ` Gustavo A. R. Silva
2021-10-05 16:51         ` Steven Rostedt [this message]
2021-10-05 19:08         ` Steven Rostedt
2021-10-05 19:35           ` Gustavo A. R. Silva
2021-10-06  0:09             ` Steven Rostedt
2021-10-06 21:14               ` Gustavo A. R. Silva
2021-10-06 21:14                 ` Steven Rostedt
2021-10-06 21:23                   ` Gustavo A. R. Silva
2021-10-13  1:40                   ` Gustavo A. R. Silva
2021-10-13  2:23                     ` Steven Rostedt
2021-10-13  2:39                       ` Gustavo A. R. Silva
2021-10-13  2:44                         ` Steven Rostedt
2021-11-05 18:49 ` kernel test robot
2021-11-05 18:49   ` kernel test robot
2021-11-08 17:02 ` kernel test robot
2021-11-08 20:43 ` kernel test robot

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=20211005125132.4ae5d128@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=bristot@kernel.org \
    --cc=gustavoars@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.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.