lkml.org 
[lkml]   [2009]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4/8] gigaset: skip unnecessary hex formatting
    Date
    Don't generate the hex representation of the payload data if it
    isn't actually used afterwards.

    Impact: optimization
    Signed-off-by: Tilman Schmidt <tilman@imap.cc>
    ---
    drivers/isdn/gigaset/isocdata.c | 4 ++++
    1 files changed, 4 insertions(+), 0 deletions(-)

    diff --git a/drivers/isdn/gigaset/isocdata.c b/drivers/isdn/gigaset/isocdata.c
    index b171e75..09202a5 100644
    --- a/drivers/isdn/gigaset/isocdata.c
    +++ b/drivers/isdn/gigaset/isocdata.c
    @@ -246,6 +246,10 @@ static inline void dump_bytes(enum debuglevel level, const char *tag,
    unsigned char c;
    static char dbgline[3 * 32 + 1];
    int i = 0;
    +
    + if (!(gigaset_debuglevel & level))
    + return;
    +
    while (count-- > 0) {
    if (i > sizeof(dbgline) - 4) {
    dbgline[i] = '\0';
    --
    1.6.2.1.214.ge986c


    \
     
     \ /
      Last update: 2009-05-14 00:49    [W:0.018 / U:0.832 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site