lkml.org 
[lkml]   [2006]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 03/16] GFS2: bmap and inode functions

>> >+ for (i = ip->i_di.di_height; i--;)
>> >+ mp->mp_list[i] = (__u16)do_div(b, sdp->sd_inptrs);
>>
>> Drop the cast if possible. do_div returns an integer.
>
>hm, do we need an explicit do_div() in fact, why not just "b / inptrs"?

b is int64 so if we just did b/inptrs, gcc would likely generate calls for
__udivdi3. Is this udivdi3 dependency satisfied in other code (lib/...?)?

>> How about inverting the if() to:
>>
>> if(ip == NULL)
>> return;
>> if(test_bit(GLF_DIRTY, &gl->gl_flags))
>> gfs_inode_attr_in(ip);
>> gfs2_meta_cache_flush(ip);
>
>btw., it should be "if (", not "if(".

There is no such rule in CodingStyle.



Jan Engelhardt
--

--
VGER BF report: H 0
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-09-02 09:25    [W:0.097 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site