lkml.org 
[lkml]   [2022]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] orangefs: remove unnecessary (void*) conversions
Date
The void * type pointer does not need to be cast.

Signed-off-by: Li kunyu <kunyu@nfschina.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
\
 
 \ /
  Last update: 2022-12-16 07:15    [W:0.027 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site