Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp462791rwe; Wed, 19 Apr 2023 01:07:46 -0700 (PDT) X-Google-Smtp-Source: AKy350a8Q5wY+CDugYqsp/CRI7tHvu/w2sISVAHrEwlsikJTT7Xa13cQbFhW+a6z3x0xl8ooGJIY X-Received: by 2002:a67:b347:0:b0:42f:e81b:a803 with SMTP id b7-20020a67b347000000b0042fe81ba803mr4241366vsm.31.1681891666058; Wed, 19 Apr 2023 01:07:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681891666; cv=none; d=google.com; s=arc-20160816; b=cUnX2JA17hBZ1qW278f59pk5jVxTMngrYTCZ84KihhWZDzR7p42q37R5qaZeyx55SF 1YaAGvSNK4MWQPql46vm/Ona0ZuD/wBVnveq+bqhjSyWnUeFuMyALMxmF1LP1yWCGumH lsPgn/aGm8iamZHPrqYoyttGs+o4cixHirRpnNBdryx/OteKzWIN6n6WW869wkheAjas kSK9IT8IL7agvyPO8K8G+ripoIPNdivXdb2FWOEc+mJWUTJzJWjHvrEsFKu3y1hxkxG6 WvyLzmwteshx91gkewqL4WuLJU1cNfZ6aAnu3JAgOVpFtOFycbMOJp/YGZ/lheK6boW6 BPKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Ymh4IdZxWRqCRWfhDbTcDdInS+CEmLcPNPncp2Z+tsc=; b=cKLmajxjoSweEMnuvEtUaLSwbDF5q6OjSC4gnFPlV2xYSDE1GcPqmUpKGsqMteNsY0 hTKJuQP5tCvOEIl7x+A40YZdOw8FsyuU/swHIwYULARky47U2jZ+emuYMMr+El4eEXx0 TgH7EVVr8OJaAQnyBjBfl2+U06FLYxc1SvWdCOv2Ft5xIBKq62M3HptN7ePQAxni3sZt ThSV8qTFFYD8hamj/qEhteuZDOTAN9/XiJSInyhYOFE6LJyU82lWNMiJFYogJ4s2/Tux 1SJB4ZocbZ1+L76mHGDPo8GFiA2/RJ4i2dYAaBMkHAUrbnhVi3B7Mx3VDhymZIKCwTXk q1wg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k18-20020a67c292000000b00425eb54651esi3466646vsj.204.2023.04.19.01.07.31; Wed, 19 Apr 2023 01:07:46 -0700 (PDT) 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 S232129AbjDSIGa (ORCPT + 99 others); Wed, 19 Apr 2023 04:06:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231642AbjDSIG2 (ORCPT ); Wed, 19 Apr 2023 04:06:28 -0400 X-Greylist: delayed 120 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 19 Apr 2023 01:06:24 PDT Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 11FEC5FD1; Wed, 19 Apr 2023 01:06:23 -0700 (PDT) Received: from who-virtual-machine (unknown [180.167.10.98]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 37A521835D256E; Wed, 19 Apr 2023 16:03:42 +0800 (CST) X-MD-Sfrom: suhui@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Suhui To: "K . Y . Srinivasa" , Haiyang Zhang , Wei Liu , Dexuan Cui Cc: linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, Suhui Subject: [PATCH] Drivers: hv: vmbus: Remove unnecessary (void*) conversions Date: Wed, 19 Apr 2023 16:03:31 +0800 Message-Id: <20230419080331.505798-1-suhui@nfschina.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,RDNS_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 No need cast (void*) to (struct hv_ring_buffer *). Signed-off-by: Suhui --- drivers/hv/ring_buffer.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/hv/ring_buffer.c b/drivers/hv/ring_buffer.c index c6692fd5ab15..5471321169e9 100644 --- a/drivers/hv/ring_buffer.c +++ b/drivers/hv/ring_buffer.c @@ -209,9 +209,8 @@ int hv_ringbuffer_init(struct hv_ring_buffer_info *ring_info, for (i = 0; i < 2 * (page_cnt - 1); i++) pfns_wraparound[i + 1] = pfn + i % (page_cnt - 1) + 1; - ring_info->ring_buffer = (struct hv_ring_buffer *) - vmap_pfn(pfns_wraparound, page_cnt * 2 - 1, - PAGE_KERNEL); + ring_info->ring_buffer = vmap_pfn(pfns_wraparound, page_cnt * 2 - 1, + PAGE_KERNEL); kfree(pfns_wraparound); if (!ring_info->ring_buffer) @@ -231,9 +230,8 @@ int hv_ringbuffer_init(struct hv_ring_buffer_info *ring_info, pages_wraparound[i + 1] = &pages[i % (page_cnt - 1) + 1]; - ring_info->ring_buffer = (struct hv_ring_buffer *) - vmap(pages_wraparound, page_cnt * 2 - 1, VM_MAP, - PAGE_KERNEL); + ring_info->ring_buffer = vmap(pages_wraparound, page_cnt * 2 - 1, VM_MAP, + PAGE_KERNEL); kfree(pages_wraparound); if (!ring_info->ring_buffer) -- 2.34.1