* [PATCH] cleanup include/asm-generic/atomic.h
@ 2014-07-21 23:30 Madhavan Srinivasan
2014-07-22 0:08 ` David Rientjes
0 siblings, 1 reply; 4+ messages in thread
From: Madhavan Srinivasan @ 2014-07-21 23:30 UTC (permalink / raw)
To: arnd, akpm; +Cc: linux-kernel, Madhavan Srinivasan
Commit 4b358e2206 "cleanup include/asm-generic/atomic.h" added
comments for #else/#endif, but ended up adding same comment
"BITS_PER_LONG == 64" on both sides. This patch fixes it.
Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
---
include/asm-generic/atomic-long.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/asm-generic/atomic-long.h b/include/asm-generic/atomic-long.h
index b7babf0..a8434c6 100644
--- a/include/asm-generic/atomic-long.h
+++ b/include/asm-generic/atomic-long.h
@@ -253,6 +253,6 @@ static inline long atomic_long_add_unless(atomic_long_t *l, long a, long u)
#define atomic_long_xchg(v, new) \
(atomic_xchg((atomic_t *)(v), (new)))
-#endif /* BITS_PER_LONG == 64 */
+#endif /* BITS_PER_LONG != 64 */
#endif /* _ASM_GENERIC_ATOMIC_LONG_H */
--
1.7.11.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] cleanup include/asm-generic/atomic.h
2014-07-21 23:30 [PATCH] cleanup include/asm-generic/atomic.h Madhavan Srinivasan
@ 2014-07-22 0:08 ` David Rientjes
2014-07-22 3:57 ` Madhavan Srinivasan
0 siblings, 1 reply; 4+ messages in thread
From: David Rientjes @ 2014-07-22 0:08 UTC (permalink / raw)
To: Madhavan Srinivasan; +Cc: arnd, akpm, linux-kernel
On Tue, 22 Jul 2014, Madhavan Srinivasan wrote:
> Commit 4b358e2206 "cleanup include/asm-generic/atomic.h" added
> comments for #else/#endif, but ended up adding same comment
> "BITS_PER_LONG == 64" on both sides. This patch fixes it.
>
It's intentionally like that, it comments the condition for which the
#endif is matched.
> Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
> ---
> include/asm-generic/atomic-long.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/asm-generic/atomic-long.h b/include/asm-generic/atomic-long.h
> index b7babf0..a8434c6 100644
> --- a/include/asm-generic/atomic-long.h
> +++ b/include/asm-generic/atomic-long.h
> @@ -253,6 +253,6 @@ static inline long atomic_long_add_unless(atomic_long_t *l, long a, long u)
> #define atomic_long_xchg(v, new) \
> (atomic_xchg((atomic_t *)(v), (new)))
>
> -#endif /* BITS_PER_LONG == 64 */
> +#endif /* BITS_PER_LONG != 64 */
>
> #endif /* _ASM_GENERIC_ATOMIC_LONG_H */
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cleanup include/asm-generic/atomic.h
2014-07-22 0:08 ` David Rientjes
@ 2014-07-22 3:57 ` Madhavan Srinivasan
2014-07-22 22:17 ` David Rientjes
0 siblings, 1 reply; 4+ messages in thread
From: Madhavan Srinivasan @ 2014-07-22 3:57 UTC (permalink / raw)
To: David Rientjes; +Cc: arnd, akpm, linux-kernel
On Tuesday 22 July 2014 05:38 AM, David Rientjes wrote:
> On Tue, 22 Jul 2014, Madhavan Srinivasan wrote:
>
>> Commit 4b358e2206 "cleanup include/asm-generic/atomic.h" added
>> comments for #else/#endif, but ended up adding same comment
>> "BITS_PER_LONG == 64" on both sides. This patch fixes it.
>>
>
> It's intentionally like that, it comments the condition for which the
> #endif is matched.
Ok, will change the else comment. And include/asm-generic/local64.h
also needs a change in comment.
Regards
Maddy
>
>> Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
>> ---
>> include/asm-generic/atomic-long.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/include/asm-generic/atomic-long.h b/include/asm-generic/atomic-long.h
>> index b7babf0..a8434c6 100644
>> --- a/include/asm-generic/atomic-long.h
>> +++ b/include/asm-generic/atomic-long.h
>> @@ -253,6 +253,6 @@ static inline long atomic_long_add_unless(atomic_long_t *l, long a, long u)
>> #define atomic_long_xchg(v, new) \
>> (atomic_xchg((atomic_t *)(v), (new)))
>>
>> -#endif /* BITS_PER_LONG == 64 */
>> +#endif /* BITS_PER_LONG != 64 */
>>
>> #endif /* _ASM_GENERIC_ATOMIC_LONG_H */
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cleanup include/asm-generic/atomic.h
2014-07-22 3:57 ` Madhavan Srinivasan
@ 2014-07-22 22:17 ` David Rientjes
0 siblings, 0 replies; 4+ messages in thread
From: David Rientjes @ 2014-07-22 22:17 UTC (permalink / raw)
To: Madhavan Srinivasan; +Cc: arnd, akpm, linux-kernel
On Tue, 22 Jul 2014, Madhavan Srinivasan wrote:
> On Tuesday 22 July 2014 05:38 AM, David Rientjes wrote:
> > On Tue, 22 Jul 2014, Madhavan Srinivasan wrote:
> >
> >> Commit 4b358e2206 "cleanup include/asm-generic/atomic.h" added
> >> comments for #else/#endif, but ended up adding same comment
> >> "BITS_PER_LONG == 64" on both sides. This patch fixes it.
> >>
> >
> > It's intentionally like that, it comments the condition for which the
> > #endif is matched.
>
> Ok, will change the else comment. And include/asm-generic/local64.h
> also needs a change in comment.
>
The #else comment is fine, it's correct as written. The only use of these
comments is to identify for the reader the #ifdef for which it is matched
when there at least one nested #ifdef.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-07-22 22:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-21 23:30 [PATCH] cleanup include/asm-generic/atomic.h Madhavan Srinivasan
2014-07-22 0:08 ` David Rientjes
2014-07-22 3:57 ` Madhavan Srinivasan
2014-07-22 22:17 ` David Rientjes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox