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>] [day] [month] [year] [list]
Message-Id: <20221216061439.3750-1-kunyu@nfschina.com>
Date:   Fri, 16 Dec 2022 14:14:39 +0800
From:   Li kunyu <kunyu@...china.com>
To:     hubcap@...ibond.com, martin@...ibond.com
Cc:     devel@...ts.orangefs.org, linux-kernel@...r.kernel.org,
        Li kunyu <kunyu@...china.com>
Subject: [PATCH] orangefs: remove unnecessary (void*) conversions

The void * type pointer does not need to be cast.

Signed-off-by: Li kunyu <kunyu@...china.com>
---
 fs/orangefs/orangefs-debugfs.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/fs/orangefs/orangefs-debugfs.c b/fs/orangefs/orangefs-debugfs.c
index 1b508f543384..6e69e47ee739 100644
--- a/fs/orangefs/orangefs-debugfs.c
+++ b/fs/orangefs/orangefs-debugfs.c
@@ -721,7 +721,7 @@ gossip_debug(GOSSIP_UTILS_DEBUG, "%s: string:%s:\n", __func__, debug_string);
 
 static void do_k_string(void *k_mask, int index)
 {
-	__u64 *mask = (__u64 *) k_mask;
+	__u64 *mask = k_mask;
 
 	if (keyword_is_amalgam((char *) s_kmod_keyword_mask_map[index].keyword))
 		goto out;
@@ -747,7 +747,7 @@ static void do_k_string(void *k_mask, int index)
 
 static void do_c_string(void *c_mask, int index)
 {
-	struct client_debug_mask *mask = (struct client_debug_mask *) c_mask;
+	struct client_debug_mask *mask = c_mask;
 
 	if (keyword_is_amalgam(cdm_array[index].keyword))
 		goto out;
@@ -794,7 +794,7 @@ static int check_amalgam_keyword(void *mask, int type)
 	int rc = 0;
 
 	if (type) {
-		c_mask = (struct client_debug_mask *) mask;
+		c_mask = mask;
 
 		if ((c_mask->mask1 == cdm_array[client_all_index].mask1) &&
 		    (c_mask->mask2 == cdm_array[client_all_index].mask2)) {
@@ -811,7 +811,7 @@ static int check_amalgam_keyword(void *mask, int type)
 		}
 
 	} else {
-		k_mask = (__u64 *) mask;
+		k_mask = mask;
 
 		if (*k_mask >= s_kmod_keyword_mask_map[k_all_index].mask_val) {
 			strcpy(kernel_debug_string, ORANGEFS_ALL);
@@ -842,10 +842,10 @@ static void debug_string_to_mask(char *debug_string, void *mask, int type)
 	gossip_debug(GOSSIP_UTILS_DEBUG, "%s: start\n", __func__);
 
 	if (type) {
-		c_mask = (struct client_debug_mask *)mask;
+		c_mask = mask;
 		element_count = cdm_element_count;
 	} else {
-		k_mask = (__u64 *)mask;
+		k_mask = mask;
 		*k_mask = 0;
 		element_count = num_kmod_keyword_mask_map;
 	}
-- 
2.18.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ