Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1471830

Re: [PATCH] arch: all: include: asm: bitops: Use bool instead of int for all bit test functions

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject Re: [PATCH] arch: all: include: asm: bitops: Use bool instead of int for all bit test functions
Date 2016-08-29 15:20 +0200
Message-ID <sbuDL-7Mi-11@gated-at.bofh.it> (permalink)
References <sb18J-64x-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sunday 28 August 2016, chengang@emindsoft.com.cn wrote:
> From: Chen Gang <chengang@emindsoft.com.cn>
> 
> Also use the same changing to asm-generic, and also use bool variable
> instead of int variable for mips, mn10300, parisc and tile related
> functions, and also avoid checkpatch.pl to report ERROR.
> 
> Originally, except powerpc and xtensa, all another architectures intend
> to return 0 or 1. After this patch, also let powerpc and xtensa return 0
> or 1.
> 
> The patch passes cross building for mips and parisc with default config.
> All related contents are found by "grep test_bit, grep test_and" under
> arch sub-directory.
> 
> Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>

This seems like a good idea overall, and I'm fine with the asm-generic
contents. If there is consensus on changing this, we probably also want
to do some other steps:

- Change the Documentation/atomic_ops.txt file accordingly
- split up the series per architecture (I don't think there are any
  interdependencies)
- For the architectures on which the definition changes (at least
  x86 and ARM), do some more sanity checks and see if there are
  noticeable changes in object code, and if so whether it looks
  better or worse (I'm guessing it will be better if anything)
- See which architectures can still get converted to using the
  asm-generic headers instead of providing their own, I think at
  least for the nonatomic ones, there are a couple.

	Arnd

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [PATCH] arch: all: include: asm: bitops: Use bool instead of int for all bit test functions Arnd Bergmann <arnd@arndb.de> - 2016-08-29 15:20 +0200
  Re: [PATCH] arch: all: include: asm: bitops: Use bool instead of int  for all bit test functions Peter Zijlstra <peterz@infradead.org> - 2016-08-29 15:50 +0200
    Re: [PATCH] arch: all: include: asm: bitops: Use bool instead of int  for all bit test functions Geert Uytterhoeven <geert@linux-m68k.org> - 2016-08-29 16:00 +0200
  Re: [PATCH] arch: all: include: asm: bitops: Use bool instead of int  for all bit test functions Vineet Gupta <vgupta@synopsys.com> - 2016-08-29 18:50 +0200
    Re: [PATCH] arch: all: include: asm: bitops: Use bool instead of  int for all bit test functions Chen Gang <chengang@emindsoft.com.cn> - 2016-08-29 23:50 +0200
      cmsg newgroup alt.sex.fetish.bool (was Re: [PATCH] arch: all:  include: asm: bitops: Use bool instead of int for all bit test functions) Al Viro <viro@ZenIV.linux.org.uk> - 2016-09-01 23:10 +0200
        Re: cmsg newgroup alt.sex.fetish.bool (was Re: [PATCH] arch: all:  include: asm: bitops: Use bool instead of int for all bit test functions) Chen Gang <chengang@emindsoft.com.cn> - 2016-09-03 01:40 +0200
          Re: cmsg newgroup alt.sex.fetish.bool (was Re: [PATCH] arch: all:  include: asm: bitops: Use bool instead of int for all bit test functions) Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-09-03 02:10 +0200
            Re: cmsg newgroup alt.sex.fetish.bool (was Re: [PATCH] arch: all:  include: asm: bitops: Use bool instead of int for all bit test functions) Chen Gang <chengang@emindsoft.com.cn> - 2016-09-04 00:40 +0200
              Re: cmsg newgroup alt.sex.fetish.bool (was Re: [PATCH] arch: all:  include: asm: bitops: Use bool instead of int for all bit test functions) Al Viro <viro@ZenIV.linux.org.uk> - 2016-09-04 07:10 +0200
                Re: cmsg newgroup alt.sex.fetish.bool (was Re: [PATCH] arch: all:  include: asm: bitops: Use bool instead of int for all bit test functions) Chen Gang <chengang@emindsoft.com.cn> - 2016-09-07 18:00 +0200
  Re: [PATCH] arch: all: include: asm: bitops: Use bool instead of  int for all bit test functions Chen Gang <chengang@emindsoft.com.cn> - 2016-08-30 00:30 +0200

csiph-web