Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1591455

[PATCH 1/7] staging: media: Remove unnecessary typecast of c90 int constant

From simran singhal <singhalsimran0@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 1/7] staging: media: Remove unnecessary typecast of c90 int constant
Date 2017-03-02 21:50 +0100
Message-ID <tgF3j-72m-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


This patch removes unnecessary typecast of c90 int constant.

WARNING: Unnecessary typecast of c90 int constant

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
---
 drivers/staging/media/atomisp/i2c/gc2235.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/media/atomisp/i2c/gc2235.c b/drivers/staging/media/atomisp/i2c/gc2235.c
index 3dd5e7f..3f2b11ec 100644
--- a/drivers/staging/media/atomisp/i2c/gc2235.c
+++ b/drivers/staging/media/atomisp/i2c/gc2235.c
@@ -706,10 +706,10 @@ static int distance(struct gc2235_resolution *res, u32 w, u32 h)
 	h_ratio = ((res->height << 13) / h);
 	if (h_ratio == 0)
 		return -1;
-	match   = abs(((w_ratio << 13) / h_ratio) - ((int)8192));
+	match   = abs(((w_ratio << 13) / h_ratio) - 8192);
 
-	if ((w_ratio < (int)8192) || (h_ratio < (int)8192)  ||
-		(match > LARGEST_ALLOWED_RATIO_MISMATCH))
+	if ((w_ratio < 8192) || (h_ratio < 8192)  ||
+	    (match > LARGEST_ALLOWED_RATIO_MISMATCH))
 		return -1;
 
 	return w_ratio + h_ratio;
-- 
2.7.4

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 1/7] staging: media: Remove unnecessary typecast of c90 int constant simran singhal <singhalsimran0@gmail.com> - 2017-03-02 21:50 +0100
  [PATCH 2/7] staging: media: Add blank line after a declaration simran singhal <singhalsimran0@gmail.com> - 2017-03-03 02:20 +0100
  Re: [PATCH 1/7] staging: media: Remove unnecessary typecast of c90  int constant Sakari Ailus <sakari.ailus@iki.fi> - 2017-03-03 18:50 +0100
    Re: [PATCH 1/7] staging: media: Remove unnecessary typecast of c90  int constant SIMRAN SINGHAL <singhalsimran0@gmail.com> - 2017-03-03 19:30 +0100
      Re: [Outreachy kernel] Re: [PATCH 1/7] staging: media: Remove  unnecessary typecast of c90 int constant Julia Lawall <julia.lawall@lip6.fr> - 2017-03-03 19:50 +0100
  Re: [PATCH 1/7] staging: media: Remove unnecessary typecast of c90  int constant Greg KH <gregkh@linuxfoundation.org> - 2017-03-09 18:20 +0100

csiph-web