summaryrefslogtreecommitdiffstats
path: root/drivers/base/map.c
diff options
context:
space:
mode:
authorJinchao Wang <wjc@cdjrlc.com>2021-06-29 01:19:07 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-07-21 17:30:09 +0200
commite7deeb9d79d8691f1e6c4c6707471ec3d7b9886b (patch)
treedde746355f52d2158a3b54893c6f1728e2245c70 /drivers/base/map.c
parente022eac85ecd2140a0829970d923d984356185eb (diff)
downloadlinux-e7deeb9d79d8691f1e6c4c6707471ec3d7b9886b.tar.bz2
driver: base: Prefer unsigned int to bare use of unsigned
Fix checkpatch warnings: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: Jinchao Wang <wjc@cdjrlc.com> Link: https://lore.kernel.org/r/20210628171907.63646-2-wjc@cdjrlc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/map.c')
-rw-r--r--drivers/base/map.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/base/map.c b/drivers/base/map.c
index 5650ab2b247a..83aeb09ca161 100644
--- a/drivers/base/map.c
+++ b/drivers/base/map.c
@@ -33,9 +33,9 @@ int kobj_map(struct kobj_map *domain, dev_t dev, unsigned long range,
struct module *module, kobj_probe_t *probe,
int (*lock)(dev_t, void *), void *data)
{
- unsigned n = MAJOR(dev + range - 1) - MAJOR(dev) + 1;
- unsigned index = MAJOR(dev);
- unsigned i;
+ unsigned int n = MAJOR(dev + range - 1) - MAJOR(dev) + 1;
+ unsigned int index = MAJOR(dev);
+ unsigned int i;
struct probe *p;
if (n > 255)
@@ -67,9 +67,9 @@ int kobj_map(struct kobj_map *domain, dev_t dev, unsigned long range,
void kobj_unmap(struct kobj_map *domain, dev_t dev, unsigned long range)
{
- unsigned n = MAJOR(dev + range - 1) - MAJOR(dev) + 1;
- unsigned index = MAJOR(dev);
- unsigned i;
+ unsigned int n = MAJOR(dev + range - 1) - MAJOR(dev) + 1;
+ unsigned int index = MAJOR(dev);
+ unsigned int i;
struct probe *found = NULL;
if (n > 255)