mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Li zeming <zeming@nfschina.com>
To: akpm@linux-foundation.org, vbabka@suse.cz, keescook@chromium.org,
	mhiramat@kernel.org, edumazet@google.com,
	christophe.leroy@csgroup.eu
Cc: linux-kernel@vger.kernel.org, Li zeming <zeming@nfschina.com>
Subject: [PATCH] init: main: Remove unnecessary (void*) conversions
Date: Thu,  3 Nov 2022 09:39:53 +0800	[thread overview]
Message-ID: <20221103013953.3203-1-zeming@nfschina.com> (raw)

The data pointer does not need to cast the type.

Signed-off-by: Li zeming <zeming@nfschina.com>
---
 init/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/init/main.c b/init/main.c
index 1fe7942f5d4a..6ac4a7f8d034 100644
--- a/init/main.c
+++ b/init/main.c
@@ -1237,7 +1237,7 @@ __setup("initcall_blacklist=", initcall_blacklist);
 static __init_or_module void
 trace_initcall_start_cb(void *data, initcall_t fn)
 {
-	ktime_t *calltime = (ktime_t *)data;
+	ktime_t *calltime = data;
 
 	printk(KERN_DEBUG "calling  %pS @ %i\n", fn, task_pid_nr(current));
 	*calltime = ktime_get();
@@ -1246,7 +1246,7 @@ trace_initcall_start_cb(void *data, initcall_t fn)
 static __init_or_module void
 trace_initcall_finish_cb(void *data, initcall_t fn, int ret)
 {
-	ktime_t rettime, *calltime = (ktime_t *)data;
+	ktime_t rettime, *calltime = data;
 
 	rettime = ktime_get();
 	printk(KERN_DEBUG "initcall %pS returned %d after %lld usecs\n",
-- 
2.18.2


                 reply	other threads:[~2022-11-03  1:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20221103013953.3203-1-zeming@nfschina.com \
    --to=zeming@nfschina.com \
    --cc=akpm@linux-foundation.org \
    --cc=christophe.leroy@csgroup.eu \
    --cc=edumazet@google.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=vbabka@suse.cz \
    /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

all inboxes | Powered by JetHome®