From patchwork Fri Dec 16 06:14:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li kunyu X-Patchwork-Id: 33873 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp803073wrn; Thu, 15 Dec 2022 22:36:43 -0800 (PST) X-Google-Smtp-Source: AA0mqf6fAcShDDAWayFUkc07qXZnKTi0mTs1mXoYP3ZLfH7kyzw/TFhaHwnytUXxIdNJzOtxwfT5 X-Received: by 2002:a17:906:5448:b0:7c1:6fd3:1efa with SMTP id d8-20020a170906544800b007c16fd31efamr15439336ejp.28.1671172603525; Thu, 15 Dec 2022 22:36:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671172603; cv=none; d=google.com; s=arc-20160816; b=MFlGSgfgQw0qt8JEML0x5KFtwgkBbvgVGnGHjrZzUjZ09l/u2WvZ6XBcPsArHOdx+o CH5m5P8AP23CT+ep+N/TOa1inEsA3tfQ2Gom2c4WE1mAn0SrzlDUMMIS3K3RF+R9nOL+ Ay5ulY7+v+GVcdzJT4yWN0aojgGpgsjMiDzfp8jzcnXfU0mZN81VlsHdqq77Hf0WqnKx 91pVuEmcnWwnLQO6uO5J9abkuU5yQPjERaKdEL5nsy9KyE0yunNBNAiE+kYZr8uY9/My 6v6f611U4AYThpPgtWvf7lj55UPZSc7TGr+eDTBbW4DHV3fCuNUauBFmv4AYwvqb9ZqT 3ZeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=xgHusr+hpRFpgEfZQWf0JZYGgTypWJcGPWxGYdp1OD0=; b=teFjByK2VuRZMQbwaSBcDDqV/7vHw69evE5+8ixY1RsHKrer0RFxqiMKz0+xtj8pGh Tpe7/HBkbRjTIetVkbKU5WRPsnXGxpyeO5N75hgh3TwdQaVpnu2NL53KzEUWNskC39+h lFiFGPlNghDGb8LNlvZweCgZIu0S4EptIPlixHnlhJe+lDCPzoNtqtl7iTCYgAu28ihx QYZewSmAylnv39r4YXlGHFNdDrGYYJQSOeAnrqw6z3hCtFQRZU9bagdH65jA4I7lnZ97 5QZTth/kWT2U9aAnO/lGxvelKLsP20NAyBYoF2Puf6jtDpVwMzZvLEBFuq/OyKGZf6Bk i0aA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gb6-20020a170907960600b00773db351c39si1902020ejc.64.2022.12.15.22.36.16; Thu, 15 Dec 2022 22:36:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229754AbiLPGOv (ORCPT + 99 others); Fri, 16 Dec 2022 01:14:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229526AbiLPGOt (ORCPT ); Fri, 16 Dec 2022 01:14:49 -0500 Received: from mail.nfschina.com (mail.nfschina.com [124.16.136.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9B9DC15823 for ; Thu, 15 Dec 2022 22:14:47 -0800 (PST) Received: from localhost (unknown [127.0.0.1]) by mail.nfschina.com (Postfix) with ESMTP id 8B7E11E80D72; Fri, 16 Dec 2022 14:09:59 +0800 (CST) X-Virus-Scanned: amavisd-new at test.com Received: from mail.nfschina.com ([127.0.0.1]) by localhost (mail.nfschina.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qNLiGqz1SLfn; Fri, 16 Dec 2022 14:09:56 +0800 (CST) Received: from localhost.localdomain (unknown [219.141.250.2]) (Authenticated sender: kunyu@nfschina.com) by mail.nfschina.com (Postfix) with ESMTPA id B51DC1E80D58; Fri, 16 Dec 2022 14:09:56 +0800 (CST) From: Li kunyu To: hubcap@omnibond.com, martin@omnibond.com Cc: devel@lists.orangefs.org, linux-kernel@vger.kernel.org, Li kunyu Subject: [PATCH] orangefs: remove unnecessary (void*) conversions Date: Fri, 16 Dec 2022 14:14:39 +0800 Message-Id: <20221216061439.3750-1-kunyu@nfschina.com> X-Mailer: git-send-email 2.18.2 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752351483926525494?= X-GMAIL-MSGID: =?utf-8?q?1752351483926525494?= The void * type pointer does not need to be cast. Signed-off-by: Li kunyu --- 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; }