lkml.org 
[lkml]   [2012]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[ 022/173] scsi: aha152x: Fix sparse warning and make printing pointer address more portable.
    3.2-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>

    commit b631cf1f899f9d2e449884dbccc34940637c639f upstream.

    This is to change use of "0x%08x" in favour of "%p" as per ../Documentation/printk-formats.txt,
    which also takes care about the following warning during compilation time:

    drivers/scsi/aha152x.c: In function ‘get_command’:
    drivers/scsi/aha152x.c:2987: warning: cast from pointer to integer of different size

    Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
    Signed-off-by: Jiri Kosina <jkosina@suse.cz>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    ---
    drivers/scsi/aha152x.c | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c
    index 19a3694..dd4547b 100644
    --- a/drivers/scsi/aha152x.c
    +++ b/drivers/scsi/aha152x.c
    @@ -2984,8 +2984,8 @@ static int get_command(char *pos, Scsi_Cmnd * ptr)
    char *start = pos;
    int i;

    - SPRINTF("0x%08x: target=%d; lun=%d; cmnd=( ",
    - (unsigned int) ptr, ptr->device->id, ptr->device->lun);
    + SPRINTF("%p: target=%d; lun=%d; cmnd=( ",
    + ptr, ptr->device->id, ptr->device->lun);

    for (i = 0; i < COMMAND_SIZE(ptr->cmnd[0]); i++)
    SPRINTF("0x%02x ", ptr->cmnd[i]);

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2012-12-28 21:21    [W:4.208 / U:0.592 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site