* [PATCH] hv/hv_kvp_daemon: remove unnecessary (void*) conversions
@ 2022-08-23 3:45 Zhou jie
2022-08-25 17:14 ` Michael Kelley (LINUX)
0 siblings, 1 reply; 3+ messages in thread
From: Zhou jie @ 2022-08-23 3:45 UTC (permalink / raw)
To: kys, haiyangz, sthemmin, wei.liu, decui
Cc: linux-hyperv, linux-kernel, Zhou jie
remove unnecessary void* type casting.
Signed-off-by: Zhou jie <zhoujie@nfschina.com>
---
tools/hv/hv_kvp_daemon.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c
index 1e6fd6ca513b..445abb53bf0d 100644
--- a/tools/hv/hv_kvp_daemon.c
+++ b/tools/hv/hv_kvp_daemon.c
@@ -772,11 +772,11 @@ static int kvp_process_ip_address(void *addrp,
const char *str;
if (family == AF_INET) {
- addr = (struct sockaddr_in *)addrp;
+ addr = addrp;
str = inet_ntop(family, &addr->sin_addr, tmp, 50);
addr_length = INET_ADDRSTRLEN;
} else {
- addr6 = (struct sockaddr_in6 *)addrp;
+ addr6 = addrp;
str = inet_ntop(family, &addr6->sin6_addr.s6_addr, tmp, 50);
addr_length = INET6_ADDRSTRLEN;
}
--
2.18.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH] hv/hv_kvp_daemon: remove unnecessary (void*) conversions
2022-08-23 3:45 [PATCH] hv/hv_kvp_daemon: remove unnecessary (void*) conversions Zhou jie
@ 2022-08-25 17:14 ` Michael Kelley (LINUX)
2022-09-05 16:56 ` Wei Liu
0 siblings, 1 reply; 3+ messages in thread
From: Michael Kelley (LINUX) @ 2022-08-25 17:14 UTC (permalink / raw)
To: Zhou jie, KY Srinivasan, Haiyang Zhang, Stephen Hemminger,
wei.liu, Dexuan Cui
Cc: linux-hyperv, linux-kernel
From: Zhou jie <zhoujie@nfschina.com> Sent: Monday, August 22, 2022 8:46 PM
>
> remove unnecessary void* type casting.
>
> Signed-off-by: Zhou jie <zhoujie@nfschina.com>
> ---
> tools/hv/hv_kvp_daemon.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c
> index 1e6fd6ca513b..445abb53bf0d 100644
> --- a/tools/hv/hv_kvp_daemon.c
> +++ b/tools/hv/hv_kvp_daemon.c
> @@ -772,11 +772,11 @@ static int kvp_process_ip_address(void *addrp,
> const char *str;
>
> if (family == AF_INET) {
> - addr = (struct sockaddr_in *)addrp;
> + addr = addrp;
> str = inet_ntop(family, &addr->sin_addr, tmp, 50);
> addr_length = INET_ADDRSTRLEN;
> } else {
> - addr6 = (struct sockaddr_in6 *)addrp;
> + addr6 = addrp;
> str = inet_ntop(family, &addr6->sin6_addr.s6_addr, tmp, 50);
> addr_length = INET6_ADDRSTRLEN;
> }
> --
> 2.18.2
The patch subject prefix for changes to this module is usually "tools: hv:"
or "tools: hv: kvp:" and this patch should be consistent. Check the commit
log for tools/hv/hv_kvp_daemon.c for historical examples.
Modulo this tweak,
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] hv/hv_kvp_daemon: remove unnecessary (void*) conversions
2022-08-25 17:14 ` Michael Kelley (LINUX)
@ 2022-09-05 16:56 ` Wei Liu
0 siblings, 0 replies; 3+ messages in thread
From: Wei Liu @ 2022-09-05 16:56 UTC (permalink / raw)
To: Michael Kelley (LINUX)
Cc: Zhou jie, KY Srinivasan, Haiyang Zhang, Stephen Hemminger,
wei.liu, Dexuan Cui, linux-hyperv, linux-kernel
On Thu, Aug 25, 2022 at 05:14:55PM +0000, Michael Kelley (LINUX) wrote:
> From: Zhou jie <zhoujie@nfschina.com> Sent: Monday, August 22, 2022 8:46 PM
> >
> > remove unnecessary void* type casting.
> >
> > Signed-off-by: Zhou jie <zhoujie@nfschina.com>
> > ---
> > tools/hv/hv_kvp_daemon.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c
> > index 1e6fd6ca513b..445abb53bf0d 100644
> > --- a/tools/hv/hv_kvp_daemon.c
> > +++ b/tools/hv/hv_kvp_daemon.c
> > @@ -772,11 +772,11 @@ static int kvp_process_ip_address(void *addrp,
> > const char *str;
> >
> > if (family == AF_INET) {
> > - addr = (struct sockaddr_in *)addrp;
> > + addr = addrp;
> > str = inet_ntop(family, &addr->sin_addr, tmp, 50);
> > addr_length = INET_ADDRSTRLEN;
> > } else {
> > - addr6 = (struct sockaddr_in6 *)addrp;
> > + addr6 = addrp;
> > str = inet_ntop(family, &addr6->sin6_addr.s6_addr, tmp, 50);
> > addr_length = INET6_ADDRSTRLEN;
> > }
> > --
> > 2.18.2
>
> The patch subject prefix for changes to this module is usually "tools: hv:"
> or "tools: hv: kvp:" and this patch should be consistent. Check the commit
> log for tools/hv/hv_kvp_daemon.c for historical examples.
>
> Modulo this tweak,
>
> Reviewed-by: Michael Kelley <mikelley@microsoft.com>
I fixed the prefix and pushed this to hyperv-fixes.
Thanks,
Wei.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-09-05 16:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-23 3:45 [PATCH] hv/hv_kvp_daemon: remove unnecessary (void*) conversions Zhou jie
2022-08-25 17:14 ` Michael Kelley (LINUX)
2022-09-05 16:56 ` Wei Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).