Removed unncessesary typecasting to int. Changed geoid data type to u32 because it will always going to be positive. Signed-off-by: Riyan Dhiman <riyandhiman14@xxxxxxxxx> --- drivers/staging/vme_user/vme_fake.c | 4 ++-- drivers/staging/vme_user/vme_tsi148.c | 6 +++--- drivers/staging/vme_user/vme_user.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/vme_user/vme_fake.c b/drivers/staging/vme_user/vme_fake.c index 7f84d1c86f29..8d4129c11e73 100644 --- a/drivers/staging/vme_user/vme_fake.c +++ b/drivers/staging/vme_user/vme_fake.c @@ -79,7 +79,7 @@ struct fake_driver { }; /* Module parameter */ -static int geoid; +static u32 geoid; static const char driver_name[] = "vme_fake"; @@ -1283,7 +1283,7 @@ static void __exit fake_exit(void) } MODULE_PARM_DESC(geoid, "Set geographical addressing"); -module_param(geoid, int, 0); +module_param(geoid, uint, 0); MODULE_DESCRIPTION("Fake VME bridge driver"); MODULE_LICENSE("GPL"); diff --git a/drivers/staging/vme_user/vme_tsi148.c b/drivers/staging/vme_user/vme_tsi148.c index d81be8e4ceba..231eb17b6aa1 100644 --- a/drivers/staging/vme_user/vme_tsi148.c +++ b/drivers/staging/vme_user/vme_tsi148.c @@ -36,7 +36,7 @@ static void tsi148_remove(struct pci_dev *); /* Module parameter */ static bool err_chk; -static int geoid; +static u32 geoid; static const char driver_name[] = "vme_tsi148"; @@ -2123,7 +2123,7 @@ static int tsi148_slot_get(struct vme_bridge *tsi148_bridge) slot = geoid; } - return (int)slot; + return slot; } static void *tsi148_alloc_consistent(struct device *parent, size_t size, @@ -2625,7 +2625,7 @@ MODULE_PARM_DESC(err_chk, "Check for VME errors on reads and writes"); module_param(err_chk, bool, 0); MODULE_PARM_DESC(geoid, "Override geographical addressing"); -module_param(geoid, int, 0); +module_param(geoid, uint, 0); MODULE_DESCRIPTION("VME driver for the Tundra Tempe VME bridge"); MODULE_LICENSE("GPL"); diff --git a/drivers/staging/vme_user/vme_user.c b/drivers/staging/vme_user/vme_user.c index 5829a4141561..fe261eef9153 100644 --- a/drivers/staging/vme_user/vme_user.c +++ b/drivers/staging/vme_user/vme_user.c @@ -130,7 +130,7 @@ static ssize_t resource_to_user(int minor, char __user *buf, size_t count, copied = vme_master_read(image[minor].resource, image[minor].kern_buf, count, *ppos); if (copied < 0) - return (int)copied; + return copied; if (copy_to_user(buf, image[minor].kern_buf, (unsigned long)copied)) return -EFAULT; -- 2.46.0