lkml.org 
[lkml]   [2021]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH v2 2/2] scsi: qedi: Fix SYSFS_FLAG_FW_SEL_BOOT formatting
    From
    Date

    Florian,

    > The format used for formatting SYSFS_FLAG_FW_SEL_BOOT creates the
    > following warning:
    >
    > drivers/scsi/qedi/qedi_main.c:2259:35: warning: format specifies type
    > 'char' but the argument has type 'int' [-Wformat]
    > rc = snprintf(buf, 3, "%hhd\n",
    > SYSFS_FLAG_FW_SEL_BOOT);
    >
    > Fix this to cast the constant as an u8 since the intention is to print
    > it via sysfs as a byte.

    The other occurrences of SYSFS_FLAG_FW_SEL_BOOT use "%d". Since %hh is
    deprecated I suggest you just fix the snprintf().

    --
    Martin K. Petersen Oracle Linux Engineering

    \
     
     \ /
      Last update: 2021-11-30 05:00    [W:6.990 / U:0.136 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site