Skip to content

Commit

Permalink
media: vidtv: remove a wrong endiannes check from s302m generator
Browse files Browse the repository at this point in the history
The code there is already doing the right thing, as it uses
value & 0xff, value & 0xff00, which already ensures the
expected endiannes.

So, it doesn't make any sense to touch the order depending on
the CPU endiannes.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
  • Loading branch information
mchehab authored and intel-lab-lkp committed Sep 14, 2020
1 parent 3447cb6 commit f86488b
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions drivers/media/test-drivers/vidtv/vidtv_s302m.c
Expand Up @@ -352,14 +352,6 @@ static u32 vidtv_s302m_write_frame(struct vidtv_encoder *e,
f.data[3] = (sample & 0x0FF0) >> 4;
f.data[4] = (sample & 0xF000) >> 12;

#ifdef __LITTLE_ENDIAN
f.data[0] = reverse[f.data[0]];
f.data[1] = reverse[f.data[1]];
f.data[2] = reverse[f.data[2]];
f.data[3] = reverse[f.data[3]];
f.data[4] = reverse[f.data[4]];
#endif

nbytes += vidtv_memcpy(e->encoder_buf,
e->encoder_buf_offset,
VIDTV_S302M_BUF_SZ,
Expand Down

0 comments on commit f86488b

Please sign in to comment.