lkml.org 
[lkml]   [2018]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH]cgroup: __cpuset_node_allowed return bool
On Mon, Mar 26, 2018 at 10:20:43PM +0800, yuankuiz@codeaurora.org wrote:
> 1) return int type variable in bool function:
> bool enabled()
> {
> int ret = 1;
> return ret;
> }
...
> 2)
> bool enabled()
> {
> bool ret = 1;
> return ret;
> }
...
> so the #1) style function can generate significant instructions
> than the #2).

That is a problem for the compiler, not the code.

> While, this is happened only when "-On" is not used with *-gcc
> together. Though, it is oftern there, it is best to provide this
> with decoupling of which option is used for optimization.

We don't want to dictate minute coding styles to avoid things which
are trivially optimized by compilers.

Thanks.

--
tejun

\
 
 \ /
  Last update: 2018-03-26 16:25    [W:0.076 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site