summaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/util.h
diff options
context:
space:
mode:
authorColy Li <colyli@suse.de>2018-08-11 13:19:44 +0800
committerJens Axboe <axboe@kernel.dk>2018-08-11 15:46:41 -0600
commit6f10f7d1b02b1bbc305f88d7696445dd38b13881 (patch)
tree180832c7da865145a7528e81d7145f98fd4a29db /drivers/md/bcache/util.h
parentb86d865cb1cae1e61527ea0b8977078bbf694328 (diff)
downloadop-kernel-dev-6f10f7d1b02b1bbc305f88d7696445dd38b13881.zip
op-kernel-dev-6f10f7d1b02b1bbc305f88d7696445dd38b13881.tar.gz
bcache: style fix to replace 'unsigned' by 'unsigned int'
This patch fixes warning reported by checkpatch.pl by replacing 'unsigned' with 'unsigned int'. Signed-off-by: Coly Li <colyli@suse.de> Reviewed-by: Shenghui Wang <shhuiw@foxmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md/bcache/util.h')
-rw-r--r--drivers/md/bcache/util.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/md/bcache/util.h b/drivers/md/bcache/util.h
index f7b0133..4840442 100644
--- a/drivers/md/bcache/util.h
+++ b/drivers/md/bcache/util.h
@@ -347,7 +347,7 @@ static inline int bch_strtoul_h(const char *cp, long *res)
snprintf(buf, size, \
__builtin_types_compatible_p(typeof(var), int) \
? "%i\n" : \
- __builtin_types_compatible_p(typeof(var), unsigned) \
+ __builtin_types_compatible_p(typeof(var), unsigned int) \
? "%u\n" : \
__builtin_types_compatible_p(typeof(var), long) \
? "%li\n" : \
@@ -379,7 +379,7 @@ struct time_stats {
void bch_time_stats_update(struct time_stats *stats, uint64_t time);
-static inline unsigned local_clock_us(void)
+static inline unsigned int local_clock_us(void)
{
return local_clock() >> 10;
}
@@ -543,9 +543,10 @@ dup: \
container_of_or_null(rb_prev(&(ptr)->member), typeof(*ptr), member)
/* Does linear interpolation between powers of two */
-static inline unsigned fract_exp_two(unsigned x, unsigned fract_bits)
+static inline unsigned int fract_exp_two(unsigned int x,
+ unsigned int fract_bits)
{
- unsigned fract = x & ~(~0 << fract_bits);
+ unsigned int fract = x & ~(~0 << fract_bits);
x >>= fract_bits;
x = 1 << x;
OpenPOWER on IntegriCloud