lkml.org 
[lkml]   [2010]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 04/12] scsi: ibmmca: use kernel native convertor
    Date
    From: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>

    to get hex digit from a binary format we may use kernel's hex_asc_*() methods.

    Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
    ---
    drivers/scsi/ibmmca.c | 3 +--
    1 files changed, 1 insertions(+), 2 deletions(-)
    diff --git a/drivers/scsi/ibmmca.c b/drivers/scsi/ibmmca.c
    index 9c1e6a5..52b03a6 100644
    --- a/drivers/scsi/ibmmca.c
    +++ b/drivers/scsi/ibmmca.c
    @@ -1002,12 +1002,11 @@ static char *ti_p(int dev)
    /* interpreter for logical device numbers (ldn) */
    static char *ti_l(int val)
    {
    - const char hex[16] = "0123456789abcdef";
    static char answer[2];

    answer[1] = (char) (0x0);
    if (val <= MAX_LOG_DEV)
    - answer[0] = hex[val];
    + answer[0] = hex_asc_lo(val);
    else
    answer[0] = '-';
    return (char *) &answer;
    --
    1.5.6.5


    \
     
     \ /
      Last update: 2010-02-18 20:01    [from the cache]
    ©2003-2011 Jasper Spaans