lkml.org 
[lkml]   [2015]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] debugfs: don't access 4 bytes for a boolean
    On 14-09-15, 17:25, Arnd Bergmann wrote:
    > I'd say that the argument to debugfs_create_bool() has to match the
    > access in the functions you are modifying, as well as whatever
    > gets passed into it by callers.
    >
    > By accessing only the first byte, you break all drivers that
    > call debugfs_create_bool() with a four-byte argument, at least
    > on big-endian systems!
    >
    > If we change any part of this, we need to audit the existing 31 callers
    > of the function and change them all to use a bool type.

    Right, so I have already sent a new version of this patch which should
    be able to take care of stuff you pointed out.

    > In the problem that you saw, what prevented gcc from printing a
    > compile-time warning about debugfs_create_bool() being called with
    > a bool argument?

    A forced cast to u32 * :)

    --
    viresh


    \
     
     \ /
      Last update: 2015-09-14 17:41    [W:6.596 / U:1.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site