• Bart Van Assche's avatar
    cfq: Suppress compiler warnings about comparisons · 9dd38052
    Bart Van Assche authored
    [ Upstream commit f7ecb1b109da1006a08d5675debe60990e824432 ]
    
    This patch does not change any functionality but avoids that gcc
    reports the following warnings when building with W=1:
    
    block/cfq-iosched.c: In function ?cfq_back_seek_max_store?:
    block/cfq-iosched.c:4741:13: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
      if (__data < (MIN))      \
                 ^
    block/cfq-iosched.c:4756:1: note: in expansion of macro ?STORE_FUNCTION?
     STORE_FUNCTION(cfq_back_seek_max_store, &cfqd->cfq_back_max, 0, UINT_MAX, 0);
     ^~~~~~~~~~~~~~
    block/cfq-iosched.c: In function ?cfq_slice_idle_store?:
    block/cfq-iosched.c:4741:13: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
      if (__data < (MIN))      \
                 ^
    block/cfq-iosched.c:4759:1: note: in expansion of macro ?STORE_FUNCTION?
     STORE_FUNCTION(cfq_slice_idle_store, &cfqd->cfq_slice_idle, 0, UINT_MAX, 1);
     ^~~~~~~~~~~~~~
    block/cfq-iosched.c: In function ?cfq_group_idle_store?:
    block/cfq-iosched.c:4741:13: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
      if (__data < (MIN))      \
                 ^
    block/cfq-iosched.c:4760:1: note: in expansion of macro ?STORE_FUNCTION?
     STORE_FUNCTION(cfq_group_idle_store, &cfqd->cfq_group_idle, 0, UINT_MAX, 1);
     ^~~~~~~~~~~~~~
    block/cfq-iosched.c: In function ?cfq_low_latency_store?:
    block/cfq-iosched.c:4741:13: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
      if (__data < (MIN))      \
                 ^
    block/cfq-iosched.c:4765:1: note: in expansion of macro ?STORE_FUNCTION?
     STORE_FUNCTION(cfq_low_latency_store, &cfqd->cfq_latency, 0, 1, 0);
     ^~~~~~~~~~~~~~
    block/cfq-iosched.c: In function ?cfq_slice_idle_us_store?:
    block/cfq-iosched.c:4775:13: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
      if (__data < (MIN))      \
                 ^
    block/cfq-iosched.c:4782:1: note: in expansion of macro ?USEC_STORE_FUNCTION?
     USEC_STORE_FUNCTION(cfq_slice_idle_us_store, &cfqd->cfq_slice_idle, 0, UINT_MAX);
     ^~~~~~~~~~~~~~~~~~~
    block/cfq-iosched.c: In function ?cfq_group_idle_us_store?:
    block/cfq-iosched.c:4775:13: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
      if (__data < (MIN))      \
                 ^
    block/cfq-iosched.c:4783:1: note: in expansion of macro ?USEC_STORE_FUNCTION?
     USEC_STORE_FUNCTION(cfq_group_idle_us_store, &cfqd->cfq_group_idle, 0, UINT_MAX);
     ^~~~~~~~~~~~~~~~~~~
    Signed-off-by: 's avatarBart Van Assche <bart.vanassche@wdc.com>
    Signed-off-by: 's avatarJens Axboe <axboe@kernel.dk>
    Signed-off-by: 's avatarSasha Levin <alexander.levin@microsoft.com>
    Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    9dd38052