Re: [GIT PULL for v6.9-rc4] media fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 10 Apr 2024 at 09:39, Mauro Carvalho Chehab <mchehab@xxxxxxxxxx> wrote:
>
>   - some fixes causing oops on mediatec vcodec encoder/decoder.

Well, I certainly hope it's not the fixes that cause oopses. That
would be the opposite of a fix.

However, having fixed that, I also find some of the fixes in here
rather broken: commit d353c3c34af0 ("media: mediatek: vcodec: support
36 bits physical address") has a "fix" for a cast like this:

-       dec->bs_dma = (unsigned long)bs->dma_addr;
+       dec->bs_dma = (uint64_t)bs->dma_addr;

but the underlying problem was in fact that the cast was WRONG TO EVEN EXIST.

Both 'bs_dma' and 'dma_addr' are integers. The cast is pointless and
wrong. It makes the code look like it is doing something else than
what it's doing, and that something else would be wrong anyway (ie if
it is a cast from a pointer, it would be doubly wrong).

IOW, as far as I can tell, the fix *should* have been to just remove
the cast entirely since it was pointless.

I've pulled this, but please people - make the pull request
description make sense, and when fixing bugs, please think about the
code a bit more than just do a mindless conversion.

           Linus




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux