lkml.org 
[lkml]   [2008]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 12/52] [microblaze] lmb support

    On Jan 24 2008 16:02, monstr@monstr.eu wrote:
    >+
    >+#define DEBUG
    >+
    >+#ifdef DEBUG
    >+#define DBG(fmt...) printk(fmt)
    >+#else
    >+#define DBG(fmt...)
    >+#endif

    Phew, don't reinvent the wheel - use the existing pr_debug() instead.


    >+static unsigned long __init lmb_addrs_overlap(unsigned long base1,
    >+ unsigned long size1, unsigned long base2, unsigned long size2)
    >+{
    >+ return ((base1 < (base2+size2)) && (base2 < (base1+size1)));
    return base1 < base2 + size2 && base2 < base1 + size1;
    >+}

    Operator precedence makes it possible; you could omit a lot of () in the code.
    (Also try checkpatch.pl to get to know of other style 'errors')


    \
     
     \ /
      Last update: 2008-01-27 13:53    [W:0.020 / U:60.052 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site