lkml.org 
[lkml]   [2013]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH RFC v2 08/29] PCI/MSI: Make pci_enable_msix() 'nvec' argument unsigned int
    On Wed, Nov 20, 2013 at 11:14:12AM -0500, Tejun Heo wrote:
    > I'm personally not a big fan of using unsigneds where they're just
    > used as numbers unless strictly necessary. They don't really provide
    > any meaningful protection and we often end up in situations where we
    > want to encode error conditions in the same type variable as return
    > value or whatever and end up with silly situations like functions
    > which take unsigned and returns integer or having a separate err
    > variable when the high bit of the orignal variable would have worked
    > just fine. Also, people have different thresholds for what should be
    > unsigned and we end up with half things unsigned and the other signed.

    That sounds convincing. Given that arch hooks do use signed int's
    there is one more reason to convert to signed.

    > I'll defer the decision to Bjorn but I'd vote for converting things to
    > int.

    I will re-post with int's in next version unless Bjorn (someone) speaks
    up against.

    > Thanks.
    >
    > --
    > tejun

    --
    Regards,
    Alexander Gordeev
    agordeev@redhat.com


    \
     
     \ /
      Last update: 2013-11-22 20:41    [W:4.150 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site