lkml.org 
[lkml]   [2009]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Subject[PATCH 0/3] Driver core: Encourage use of const attributes
    Date

    I know now's probably a bad time to be mentioning const issues
    but I recently a reviewed a patch where 'const' was being removed
    from a device_attribute structure, and I enquired why. The reason
    was simply so that device_create_file() could be called, it taking
    a non-const attribute pointer. Looking inside, all that function
    did was pass a pointer to sysfs_create_file, which itself took a
    const pointer. Non-constness was not required at all.

    So here I offer a small patchset which I hope will permit and
    encourage device and other attributes to be made const, and put
    in read-only sections.

    These have been compile/sparse tested against arm and x86_64 targets,
    and through my usual suite of tests on the arm platform I use.

    In addition to the changes in the prior RFC, I have updated the
    documentation appropriately.

    Regards,
    Phil


    \
     
     \ /
      Last update: 2009-12-18 14:37    [W:0.022 / U:1.176 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site