public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chen Gang <gang.chen@asianux.com>
To: Richard Weinberger <richard@nod.at>
Cc: Will Deacon <will.deacon@arm.com>,
	Richard Weinberger <richard.weinberger@gmail.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Catalin Marinas <Catalin.Marinas@arm.com>,
	"linux390@de.ibm.com" <linux390@de.ibm.com>,
	"linux-s390@vger.kernel.org" <linux-s390@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] arm/arm64: remove atomic_clear_mask() in "include/asm/atomic.h"
Date: Sat, 12 Oct 2013 09:36:44 +0800	[thread overview]
Message-ID: <5258A7AC.4060902@asianux.com> (raw)
In-Reply-To: <5257F710.5090706@nod.at>

On 10/11/2013 09:03 PM, Richard Weinberger wrote:
> Am 11.10.2013 14:28, schrieb Will Deacon:
>> On Fri, Oct 11, 2013 at 01:08:17PM +0100, Richard Weinberger wrote:
>>> On Fri, Oct 11, 2013 at 1:47 PM, Chen Gang <gang.chen@asianux.com> wrote:
>>>> In current kernel wide source code, except other architectures, only
>>>> s390 scsi drivers use atomic_clear_mask(), and arm/arm64 need not
>>>> support s390 drivers.
>>>>
>>>> So remove atomic_clear_mask() from "arm[64]/include/asm/atomic.h".
>>>
>>> Is it really worth removing such a primitive?
>>> If someone needs it later he has to implement it from scratch and
>>> introduces bugs...
>>
>> The version we have (on ARM64 anyway) already has bugs. Given the choice
>> between fixing code that has no callers and simply removing it, I'd go for
>> the latter.
> 
> Yeah, if it's broken and has no real users, send it to hell. :)
> 

OK, thanks.


Hmm... at least, the original API definition is not well enough: "need
use 'unsigned int' and 'atomic_t' instead of 'unsigned long' for the
type of parameters".

But can we say "under arm64, it must be a bug"? (although I agree it is
very easy to let callers miss using it -- then may cause issue).

In my opinion, it belongs to "API definition issue" not implementation
bug: "if all callers are carefully enough, it will not make issues"
(e.g. in "./kernel" sub-system, we can meet many such kinds of things).



Thanks.

> Thanks,
> //richard
> 
> 
> 

-- 
Chen Gang

  reply	other threads:[~2013-10-12  1:37 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-10  2:30 [PATCH 0/3] s390/arm/arm64: include: asm: atomic.h: use 'unsigned int' and 'atomic_t' instead of 'unsigned long' for atomic_*_mask() Chen Gang
2013-10-10  2:31 ` [PATCH 1/3] s390: include: asm: atomic.h: use 'unsigned int' " Chen Gang
2013-10-10  2:34   ` [PATCH 2/3] arm: include: asm: atomic.h: use 'unsigned int' and 'atomic' instead of 'unsigned long' for atomic_clear_mask() Chen Gang
2013-10-10  2:35     ` [PATCH 3/3] arm64: include: asm: atomic.h: use 'unsigned int' and 'atomic_t' " Chen Gang
2013-10-10 10:07       ` Will Deacon
2013-10-10 11:03         ` Chen Gang
2013-10-10 14:23           ` Will Deacon
2013-10-11  1:18             ` Chen Gang
2013-10-11 10:44               ` Will Deacon
2013-10-11 11:25                 ` Chen Gang
2013-10-11 11:47                   ` [PATCH] arm/arm64: remove atomic_clear_mask() in "include/asm/atomic.h" Chen Gang
2013-10-11 12:08                     ` Richard Weinberger
2013-10-11 12:28                       ` Will Deacon
2013-10-11 13:03                         ` Richard Weinberger
2013-10-12  1:36                           ` Chen Gang [this message]
2013-10-12  2:09                             ` Chen Gang
2013-10-11 16:55                     ` Will Deacon
2013-10-12  1:46                       ` Chen Gang
2013-10-12 22:28                       ` Catalin Marinas
2013-10-10  9:58     ` [PATCH 2/3] arm: include: asm: atomic.h: use 'unsigned int' and 'atomic' instead of 'unsigned long' for atomic_clear_mask() Will Deacon
2013-10-10 11:02       ` Chen Gang
2013-10-10  7:25   ` [PATCH 1/3] s390: include: asm: atomic.h: use 'unsigned int' instead of 'unsigned long' for atomic_*_mask() Heiko Carstens
2013-10-10  7:34     ` Chen Gang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5258A7AC.4060902@asianux.com \
    --to=gang.chen@asianux.com \
    --cc=Catalin.Marinas@arm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux390@de.ibm.com \
    --cc=linux@arm.linux.org.uk \
    --cc=richard.weinberger@gmail.com \
    --cc=richard@nod.at \
    --cc=schwidefsky@de.ibm.com \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox