[0/3] media: atomisp: fix "don't pass a pointer to a local variable"

Message ID 20220612160556.108264-1-hdegoede@redhat.com (mailing list archive)
Headers
Series media: atomisp: fix "don't pass a pointer to a local variable" |

Message

Hans de Goede June 12, 2022, 4:05 p.m. UTC
  Hi All,

While working on other atomisp stuff I noticed that the recently
added: "media: atomisp: don't pass a pointer to a local variable"
compiler warning fix broke things.

Here is a small series reverting the troublesome fix and adding
an alternative compiler warning fix which does work in my testing.

Regards,

Hans

p.s.

A while ago I mentioned that I was working on also making the code
work on Bay Trail devices (vs Cherry Trail) and that I had things
working with an older kernel based on Alan Cox' first merge of
the driver into drivers/staging. After a lot of work to keep the
code working rebasing on newer and newer (less old really) kernels
I had gathered some fixes and decided to just try the latest kernel.

And it turns out that the latest kernel already has all those
fixes and it just works. I don't know why my previous testing failed.
I might just have been unlucky with the hw which I used in my previous
testing.

So good news, the code works on Bay Trail too, which is also good
from a pov of being able to test on both platforms while doing further
refactoring.

Mauro, you also asked me to try mmap on the original code as merged
by Alan Cox, unfortunately mmap does not work their either, it seems
this has simply always been broken. More about this in another
patch-set.


Hans de Goede (3):
  media: atomisp: revert "don't pass a pointer to a local variable"
  media: atomisp: fix uninitialized stack mem usage in
    ia_css_rmgr_acq_vbuf()
  media: atomisp: fix -Wdangling-pointer warning

 .../atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c  | 22 +++++++++++++------
 1 file changed, 15 insertions(+), 7 deletions(-)
  

Comments

Andy Shevchenko June 12, 2022, 7:29 p.m. UTC | #1
On Sun, Jun 12, 2022 at 6:06 PM Hans de Goede <hdegoede@redhat.com> wrote:
>
> Hi All,
>
> While working on other atomisp stuff I noticed that the recently
> added: "media: atomisp: don't pass a pointer to a local variable"
> compiler warning fix broke things.
>
> Here is a small series reverting the troublesome fix and adding
> an alternative compiler warning fix which does work in my testing.
>
> Regards,
>
> Hans
>
> p.s.
>
> A while ago I mentioned that I was working on also making the code
> work on Bay Trail devices (vs Cherry Trail) and that I had things
> working with an older kernel based on Alan Cox' first merge of
> the driver into drivers/staging. After a lot of work to keep the
> code working rebasing on newer and newer (less old really) kernels
> I had gathered some fixes and decided to just try the latest kernel.
>
> And it turns out that the latest kernel already has all those
> fixes and it just works. I don't know why my previous testing failed.
> I might just have been unlucky with the hw which I used in my previous
> testing.
>
> So good news, the code works on Bay Trail too, which is also good
> from a pov of being able to test on both platforms while doing further
> refactoring.
>
> Mauro, you also asked me to try mmap on the original code as merged
> by Alan Cox, unfortunately mmap does not work their either, it seems
> this has simply always been broken. More about this in another
> patch-set.

Thanks for the fix!
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>

> Hans de Goede (3):
>   media: atomisp: revert "don't pass a pointer to a local variable"
>   media: atomisp: fix uninitialized stack mem usage in
>     ia_css_rmgr_acq_vbuf()
>   media: atomisp: fix -Wdangling-pointer warning
>
>  .../atomisp/pci/runtime/rmgr/src/rmgr_vbuf.c  | 22 +++++++++++++------
>  1 file changed, 15 insertions(+), 7 deletions(-)
>
> --
> 2.36.0
>