From: Wei Liu <wei.liu@kernel.org>
To: Suhui <suhui@nfschina.com>
Cc: "K . Y . Srinivasa" <kys@microsoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>,
Wei Liu <wei.liu@kernel.org>, Dexuan Cui <decui@microsoft.com>,
linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Drivers: hv: vmbus: Remove unnecessary (void*) conversions
Date: Thu, 20 Apr 2023 21:59:18 +0000 [thread overview]
Message-ID: <ZEG1tjvoqTxLxYvl@liuwe-devbox-debian-v2> (raw)
In-Reply-To: <20230419080331.505798-1-suhui@nfschina.com>
On Wed, Apr 19, 2023 at 04:03:31PM +0800, Suhui wrote:
> No need cast (void*) to (struct hv_ring_buffer *).
>
> Signed-off-by: Suhui <suhui@nfschina.com>
Unfortunately due to recent changes this patch no longer applies to
hyperv-next.
> ---
> 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
>
prev parent reply other threads:[~2023-04-20 21:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-19 8:03 [PATCH] Drivers: hv: vmbus: Remove unnecessary (void*) conversions Suhui
2023-04-20 21:59 ` Wei Liu [this message]
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=ZEG1tjvoqTxLxYvl@liuwe-devbox-debian-v2 \
--to=wei.liu@kernel.org \
--cc=decui@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=suhui@nfschina.com \
/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