[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-media
Subject:    Re: [GIT PULL for v6.9-rc4] media fixes
From:       Linus Torvalds <torvalds () linux-foundation ! org>
Date:       2024-04-10 20:53:12
Message-ID: CAHk-=wiwn2VamMH-o2zmk0d__GtEPTjL=x3QSEC0MHEt30=g1Q () mail ! gmail ! com
[Download RAW message or body]

On Wed, 10 Apr 2024 at 09:39, Mauro Carvalho Chehab <mchehab@kernel.org> 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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic