summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRasmus Villemoes <linux@rasmusvillemoes.dk>2015-10-16 15:14:55 +0200
committerVincent Abriou <vincent.abriou@st.com>2015-11-03 13:04:55 +0100
commitcebd6fbeb2fc9e7c4f10f3656fe9f1ba863a8549 (patch)
treeb3de83f31f2f55d9df62a572b608c368a9a903fd
parent4d5821a71ce9bed490e5a71987dc03f22e646039 (diff)
downloadlinux-cebd6fbeb2fc9e7c4f10f3656fe9f1ba863a8549.tar.bz2
drm/sti: remove redundant sign extensions
arg is long int, so arg = (arg << 22) >> 22 makes the upper 22 bits of arg equal to bit 9 (or bit 41). But we then mask away all but bits 0-9, so this is entirely redundant. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Reviewed-by: Vincent Abriou <vincent.abriou@st.com>
-rw-r--r--drivers/gpu/drm/sti/sti_awg_utils.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/gpu/drm/sti/sti_awg_utils.c b/drivers/gpu/drm/sti/sti_awg_utils.c
index 6029a2e3db1d..00d0698be9d3 100644
--- a/drivers/gpu/drm/sti/sti_awg_utils.c
+++ b/drivers/gpu/drm/sti/sti_awg_utils.c
@@ -65,7 +65,6 @@ static int awg_generate_instr(enum opcode opcode,
mux = 0;
data_enable = 0;
- arg = (arg << 22) >> 22;
arg &= (0x3ff);
break;
case REPEAT:
@@ -77,14 +76,12 @@ static int awg_generate_instr(enum opcode opcode,
mux = 0;
data_enable = 0;
- arg = (arg << 22) >> 22;
arg &= (0x3ff);
break;
case JUMP:
mux = 0;
data_enable = 0;
arg |= 0x40; /* for jump instruction 7th bit is 1 */
- arg = (arg << 22) >> 22;
arg &= 0x3ff;
break;
case STOP:
@@ -94,7 +91,6 @@ static int awg_generate_instr(enum opcode opcode,
case RPTSET:
case RPLSET:
case HOLD:
- arg = (arg << 24) >> 24;
arg &= (0x0ff);
break;
default: