From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933237AbcH2NTZ (ORCPT ); Mon, 29 Aug 2016 09:19:25 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:51053 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932715AbcH2NTV (ORCPT ); Mon, 29 Aug 2016 09:19:21 -0400 From: Arnd Bergmann To: chengang@emindsoft.com.cn Subject: Re: [PATCH] arch: all: include: asm: bitops: Use bool instead of int for all bit test functions Date: Mon, 29 Aug 2016 15:03:41 +0200 User-Agent: KMail/1.12.2 (Linux/4.7.0-rc7+; KDE/4.3.2; x86_64; ; ) Cc: akpm@linux-foundation.org, minchan@kernel.org, vbabka@suse.cz, gi-oh.kim@profitbricks.com, iamjoonsoo.kim@lge.com, hillf.zj@alibaba-inc.com, mgorman@techsingularity.net, mhocko@suse.com, rientjes@google.com, linux-kernel@vger.kernel.org, rth@twiddle.net, ink@jurassic.park.msu.ru, mattst88@gmail.com, vgupta@synopsys.com, linux@armlinux.org.uk, catalin.marinas@arm.com, will.deacon@arm.com, hskinnemoen@gmail.com, egtvedt@samfundet.no, realmz6@gmail.com, ysato@users.sourceforge.jp, rkuo@codeaurora.org, tony.luck@intel.com, fenghua.yu@intel.com, geert@linux-m68k.org, james.hogan@imgtec.com, ralf@linux-mips.org, dhowells@redhat.com, deller@gmx.de, benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, dalias@libc.org, davem@davemloft.net, cmetcalf@mellanox.com, chris@zankel.net, jcmvbkbc@gmail.com, noamc@ezchip.com, brueckner@linux.vnet.ibm.com, mingo@kernel.org, peterz@infradead.org, linux-arch@vger.kernel.org, Chen Gang References: <1472362755-26776-1-git-send-email-chengang@emindsoft.com.cn> In-Reply-To: <1472362755-26776-1-git-send-email-chengang@emindsoft.com.cn> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201608291503.41630.arnd@arndb.de> X-Provags-ID: V03:K0:dMVjyUCyGIXYZeMxzvk+l8y1v3IyC7d0i1mOfyN6cd+NOPuPzPf j8msmH3fF8RAqJT0Wfg1tCWT5dioNebsy4NdZj6O5gLAow8gVijlm1BgxgrHtEj0oA08Xng FcbTmtRqbvEw1WTZMiUOtjDxhfqsuXYrvGxkewpbpfWYLBuMaZKKmqT3lGV/0+uo+oHwkIm LbSN3bSgej53OO72bAGcA== X-UI-Out-Filterresults: notjunk:1;V01:K0:3IqkrHIyAVE=:EdS2zpPlZwFyKmsJ2TlXww cnpDo9UClZGD91LB9c6TkvcpLGPhW6TogK2WtFBPEGWZyZbtRJLmToZ29QXvh3n/ZGLK00YvO /ZdJ0PLJzwZjGZwZ3vnhQKNons6w60JE7sQyAzqMna0ZXUzd+Folkv/zQXCCI8eo3iab1NvIC YCQIxyk7LRk5AmTTdRYhwDc8NUKi4qgr9QkObxBhYY+gmFLu1iU/5wz6SYh87OETAPdOg5S2f Lsunb1ynChd+TGR2Xk3C5SxkL9H8coXlDihkXy2JPOP/UlOWOvfbc73F+50wP0IiEToDpChFv 7X2H94IviBLk5EqLy3i1PqI40eP9Ftm6eZP/FNTT1eOViDobXa+B2ZVW/Jq//xnU8PLQon/Xu 3W0yKd52xWvWyMi2nRBo3c9Z1vLs7fPZoaORSSaTmocfFrL1KzuFPgQk8ilxoLn/IrM2gjt7+ q/qRrkvnvGOdK5rBIo3kial+p/VgLQObIkTEvVAYkbEH8/dYcQgmOTPR69pjFfvfSeGMJR2b/ wPOmg8kBWSANA995407to9tOEAUKnKGijcxNk9QaI2GIjMoRIljuaRhTonsJ2TohAx2USxwFy uXanlv/4a6/cdF9fcy0WJZib8KNgy0q8Vwkjbly+xjYY7gceuYt26t89xemB8UBqzNgeR+QC5 LKzX6RtNbxOlLErNFGXZnWOJUIgsAne0wXPTQeN3GhEsD989jvSrU0UKfXXuD368ukMaUYNg+ jHR7KInyxxi93hXU Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sunday 28 August 2016, chengang@emindsoft.com.cn wrote: > From: Chen Gang > > 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 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