public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Nicholas Mc Guire <der.herr@hofr.at>
Cc: Nicholas Mc Guire <hofrat@osadl.org>,
	Li Zefan <lizefan@huawei.com>,
	cgroups@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cgroup: add explicit cast and comment for return type conversion
Date: Mon, 25 May 2015 07:40:45 -0400	[thread overview]
Message-ID: <20150525114045.GA526@htj.duckdns.org> (raw)
In-Reply-To: <20150525055742.GE1397@opentech.at>

Hello, Nicholas.

On Mon, May 25, 2015 at 07:57:42AM +0200, Nicholas Mc Guire wrote:
> nop not downward but signed/unsigned  if it were down it would not be
> a problem but signed/unsigned can be - for those cases where it can't
> be fixed up by changing the declarations or return variable types 
> explicit cast might make sense - as noted in the patch Im not sure either
> if this form of cleanups is helpful. 
> 
> In the kernel core there are about 400 signed/unsigned implicit 
> conversions (about 3k in the entire kernel) which is what Im trying to 
> remove or if that is not possible in a resonable way mark as false positive.

I still don't get it.  What does this buy us actually?  If we continue
to do this, people would just learn to add explicit cast when doing
sign conversions.  We just converge to a different behavior without
actually gaining any protection.  What's the benefit of doing this?

Thanks.

-- 
tejun

  reply	other threads:[~2015-05-25 11:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-24 13:07 [PATCH] cgroup: add explicit cast and comment for return type conversion Nicholas Mc Guire
2015-05-24 20:35 ` Tejun Heo
2015-05-25  5:57   ` Nicholas Mc Guire
2015-05-25 11:40     ` Tejun Heo [this message]
2015-05-25 11:50       ` Nicholas Mc Guire
2015-05-26  0:05         ` Tejun Heo
2015-05-26  4:52           ` Nicholas Mc Guire

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=20150525114045.GA526@htj.duckdns.org \
    --to=tj@kernel.org \
    --cc=cgroups@vger.kernel.org \
    --cc=der.herr@hofr.at \
    --cc=hofrat@osadl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.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