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


Groups > linux.kernel > #1596449 > unrolled thread

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

Started bysimran singhal <singhalsimran0@gmail.com>
First post2017-03-10 00:00 +0100
Last post2017-03-12 15:30 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v1 1/7] staging: gc2235: Remove unnecessary typecast of c90 int constant simran singhal <singhalsimran0@gmail.com> - 2017-03-10 00:00 +0100
    Re: [PATCH v1 1/7] staging: gc2235: Remove unnecessary typecast of  c90 int constant Greg KH <gregkh@linuxfoundation.org> - 2017-03-12 15:30 +0100

#1596449 — [PATCH v1 1/7] staging: gc2235: Remove unnecessary typecast of c90 int constant

Fromsimran singhal <singhalsimran0@gmail.com>
Date2017-03-10 00:00 +0100
Subject[PATCH v1 1/7] staging: gc2235: Remove unnecessary typecast of c90 int constant
Message-ID<tjfcl-3bj-1@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1598637 — Re: [PATCH v1 1/7] staging: gc2235: Remove unnecessary typecast of c90 int constant

FromGreg KH <gregkh@linuxfoundation.org>
Date2017-03-12 15:30 +0100
SubjectRe: [PATCH v1 1/7] staging: gc2235: Remove unnecessary typecast of c90 int constant
Message-ID<tkcFr-2Iv-3@gated-at.bofh.it>
In reply to#1596449
On Fri, Mar 10, 2017 at 04:20:23AM +0530, simran singhal wrote:
> 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(-)

This series doesn't apply to my tree at all, please rebase and resend.

thanks,

greg k-h

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web