The whole vchiq driver uses unsigned int for "localport" except of find_service_by_port(). So fix this and get the rid of this suspicous cast. Signed-off-by: Stefan Wahren <stefan.wahren@xxxxxxxx> --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 6 +++--- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c index 2cbbbb6..6fa9fee 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -255,9 +255,9 @@ find_service_by_handle(unsigned int handle) } struct vchiq_service * -find_service_by_port(struct vchiq_state *state, int localport) +find_service_by_port(struct vchiq_state *state, unsigned int localport) { - if ((unsigned int)localport <= VCHIQ_PORT_MAX) { + if (localport <= VCHIQ_PORT_MAX) { struct vchiq_service *service; rcu_read_lock(); @@ -271,7 +271,7 @@ find_service_by_port(struct vchiq_state *state, int localport) rcu_read_unlock(); } vchiq_log_info(vchiq_core_log_level, - "Invalid port %d", localport); + "Invalid port %u", localport); return NULL; } diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h index 55abaf0..82b7bd7b 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h @@ -524,7 +524,7 @@ extern struct vchiq_service * find_service_by_handle(unsigned int handle); extern struct vchiq_service * -find_service_by_port(struct vchiq_state *state, int localport); +find_service_by_port(struct vchiq_state *state, unsigned int localport); extern struct vchiq_service * find_service_for_instance(struct vchiq_instance *instance, unsigned int handle); -- 2.7.4