lkml.org 
[lkml]   [2013]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: do_div() silently truncates "base" to 32bit
From
Date
On Fri, 2013-08-30 at 15:48 -0700, Randy Dunlap wrote:
> On 08/30/13 15:14, Anatol Pomozov wrote:
> > But another question still remains: why compiler does not warn that
> > size truncation happens? How to prevent bugs like CFQ one in the
> > future? Should we add a compile-time assert to do_div() to prevent
> > passing 64 numbers in "base" macro parameter?
> That sounds like a fine idea to me.

Geert thought so too and submitted a patch

http://www.spinics.net/lists/linux-btrfs/msg26788.html




\
 
 \ /
  Last update: 2013-08-31 01:41    [W:0.051 / U:1.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site