* Re: + include-linux-typesh-use-unsigned-int-instead-of-unsigned.patch added to -mm tree
[not found] <20190228174109.MrWZN%akpm@linux-foundation.org>
@ 2019-02-28 21:11 ` Alexey Dobriyan
2019-03-01 0:13 ` Masahiro Yamada
0 siblings, 1 reply; 3+ messages in thread
From: Alexey Dobriyan @ 2019-02-28 21:11 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-kernel, yamada.masahiro, wang.bo116, wdjjwb
On Thu, Feb 28, 2019 at 09:41:09AM -0800, akpm@linux-foundation.org wrote:
> --- a/include/linux/types.h~include-linux-typesh-use-unsigned-int-instead-of-unsigned
> +++ a/include/linux/types.h
> @@ -155,9 +155,9 @@ typedef u64 dma_addr_t;
> typedef u32 dma_addr_t;
> #endif
>
> -typedef unsigned __bitwise gfp_t;
> -typedef unsigned __bitwise slab_flags_t;
> -typedef unsigned __bitwise fmode_t;
> +typedef unsigned int __bitwise gfp_t;
> +typedef unsigned int __bitwise slab_flags_t;
> +typedef unsigned int __bitwise fmode_t;
I don't know if this is desireable. Switching to "unsigned" is better:
1 less token and less 80 column pressure.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: + include-linux-typesh-use-unsigned-int-instead-of-unsigned.patch added to -mm tree
2019-02-28 21:11 ` + include-linux-typesh-use-unsigned-int-instead-of-unsigned.patch added to -mm tree Alexey Dobriyan
@ 2019-03-01 0:13 ` Masahiro Yamada
2019-03-01 6:56 ` Alexey Dobriyan
0 siblings, 1 reply; 3+ messages in thread
From: Masahiro Yamada @ 2019-03-01 0:13 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: Linux Kernel Mailing List, wang.bo116, WangBo
On Fri, Mar 1, 2019 at 7:08 AM Alexey Dobriyan <adobriyan@gmail.com> wrote:
>
> On Thu, Feb 28, 2019 at 09:41:09AM -0800, akpm@linux-foundation.org wrote:
> > --- a/include/linux/types.h~include-linux-typesh-use-unsigned-int-instead-of-unsigned
> > +++ a/include/linux/types.h
> > @@ -155,9 +155,9 @@ typedef u64 dma_addr_t;
> > typedef u32 dma_addr_t;
> > #endif
> >
> > -typedef unsigned __bitwise gfp_t;
> > -typedef unsigned __bitwise slab_flags_t;
> > -typedef unsigned __bitwise fmode_t;
> > +typedef unsigned int __bitwise gfp_t;
> > +typedef unsigned int __bitwise slab_flags_t;
> > +typedef unsigned int __bitwise fmode_t;
>
> I don't know if this is desireable. Switching to "unsigned" is better:
> 1 less token and less 80 column pressure.
See the following commit.
commit a1ce18e4f941d2039aa3bdeee17db968919eac2f
Author: Joe Perches <joe@perches.com>
Date: Tue Mar 15 14:58:03 2016 -0700
checkpatch: warn on bare unsigned or signed declarations without int
Kernel style prefers "unsigned int <foo>" over "unsigned <foo>" and
"signed int <foo>" over "signed <foo>".
Emit a warning for these simple signed/unsigned <foo> declarations. Fix
it too if desired.
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: + include-linux-typesh-use-unsigned-int-instead-of-unsigned.patch added to -mm tree
2019-03-01 0:13 ` Masahiro Yamada
@ 2019-03-01 6:56 ` Alexey Dobriyan
0 siblings, 0 replies; 3+ messages in thread
From: Alexey Dobriyan @ 2019-03-01 6:56 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: Linux Kernel Mailing List, wang.bo116, WangBo
On Fri, Mar 01, 2019 at 09:13:27AM +0900, Masahiro Yamada wrote:
> On Fri, Mar 1, 2019 at 7:08 AM Alexey Dobriyan <adobriyan@gmail.com> wrote:
> >
> > On Thu, Feb 28, 2019 at 09:41:09AM -0800, akpm@linux-foundation.org wrote:
> > > --- a/include/linux/types.h~include-linux-typesh-use-unsigned-int-instead-of-unsigned
> > > +++ a/include/linux/types.h
> > > @@ -155,9 +155,9 @@ typedef u64 dma_addr_t;
> > > typedef u32 dma_addr_t;
> > > #endif
> > >
> > > -typedef unsigned __bitwise gfp_t;
> > > -typedef unsigned __bitwise slab_flags_t;
> > > -typedef unsigned __bitwise fmode_t;
> > > +typedef unsigned int __bitwise gfp_t;
> > > +typedef unsigned int __bitwise slab_flags_t;
> > > +typedef unsigned int __bitwise fmode_t;
> >
> > I don't know if this is desireable. Switching to "unsigned" is better:
> > 1 less token and less 80 column pressure.
>
>
>
> See the following commit.
Ah, checkpatch.pl, how could we live without it.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-03-01 6:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20190228174109.MrWZN%akpm@linux-foundation.org>
2019-02-28 21:11 ` + include-linux-typesh-use-unsigned-int-instead-of-unsigned.patch added to -mm tree Alexey Dobriyan
2019-03-01 0:13 ` Masahiro Yamada
2019-03-01 6:56 ` Alexey Dobriyan
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).