All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] make get_be64() compile on pu with NO_UNALIGNED_LOADS
@ 2017-07-22  9:47 Martin Ågren
  2017-07-22 15:54 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Ågren @ 2017-07-22  9:47 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

1. s/unit64_t/uint64_t/

2. add const-qualifier to *p

3. add missing closing ')'

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
---
Applies to pu and passes the tests. I think this should be squashed in
somewhere. Perhaps a mismerge in commit d553324d ("Merge branch
'bp/fsmonitor' into pu", 2017-07-21).

 compat/bswap.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/compat/bswap.h b/compat/bswap.h
index 133da1d2b..f86110a72 100644
--- a/compat/bswap.h
+++ b/compat/bswap.h
@@ -188,11 +188,11 @@ static inline void put_be32(void *ptr, uint32_t value)
 	p[3] = value >>  0;
 }
 
-static inline unit64_t get_be64(const void *ptr)
+static inline uint64_t get_be64(const void *ptr)
 {
-	unsigned char *p = ptr;
+	const unsigned char *p = ptr;
 	return  ((uint64_t)get_be32(p) << 32) |
-		((uint64_t)get_be32(p + 4);
+		((uint64_t)get_be32(p + 4));
 }
 
 #endif
-- 
2.14.0.rc0.14.g12cc05b53


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] make get_be64() compile on pu with NO_UNALIGNED_LOADS
  2017-07-22  9:47 [PATCH] make get_be64() compile on pu with NO_UNALIGNED_LOADS Martin Ågren
@ 2017-07-22 15:54 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2017-07-22 15:54 UTC (permalink / raw)
  To: Martin Ågren; +Cc: git

Martin Ågren <martin.agren@gmail.com> writes:

> Applies to pu and passes the tests. I think this should be squashed in
> somewhere. Perhaps a mismerge in commit d553324d ("Merge branch
> 'bp/fsmonitor' into pu", 2017-07-21).

Yes, you spotted a mistaken evil-merge.  Thanks.

>
>  compat/bswap.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/compat/bswap.h b/compat/bswap.h
> index 133da1d2b..f86110a72 100644
> --- a/compat/bswap.h
> +++ b/compat/bswap.h
> @@ -188,11 +188,11 @@ static inline void put_be32(void *ptr, uint32_t value)
>  	p[3] = value >>  0;
>  }
>  
> -static inline unit64_t get_be64(const void *ptr)
> +static inline uint64_t get_be64(const void *ptr)
>  {
> -	unsigned char *p = ptr;
> +	const unsigned char *p = ptr;
>  	return  ((uint64_t)get_be32(p) << 32) |
> -		((uint64_t)get_be32(p + 4);
> +		((uint64_t)get_be32(p + 4));
>  }
>  
>  #endif

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-07-22 15:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-22  9:47 [PATCH] make get_be64() compile on pu with NO_UNALIGNED_LOADS Martin Ågren
2017-07-22 15:54 ` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.