Re: [PATCH 2/2] media: ipu3-imgu: Remove dead code for NULL check

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

 



Hi Yong,

On Tue, Jan 15, 2019 at 12:38 PM Yong Zhi <yong.zhi@xxxxxxxxx> wrote:
>
> Since ipu3_css_buf_dequeue() never returns NULL, remove the
> dead code to fix static checker warning:
>
> drivers/staging/media/ipu3/ipu3.c:493 imgu_isr_threaded()
> warn: 'b' is an error pointer or valid
>
> Signed-off-by: Yong Zhi <yong.zhi@xxxxxxxxx>
> ---
> Link to Dan's bug report:
> https://www.spinics.net/lists/linux-media/msg145043.html

You can add Dan's Reported-by above your Signed-off-by to properly
credit him. I'd also add a comment below that Reported-by, e.g.

[Bug report: https://www.spinics.net/lists/linux-media/msg145043.html]

so that it doesn't get removed when applying the patch, as it would
get now, because any text right in this area is ignored by git.

With that fixes, feel free to add my Reviewed-by.

Best regards,
Tomasz

>
>  drivers/staging/media/ipu3/ipu3.c | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/media/ipu3/ipu3.c b/drivers/staging/media/ipu3/ipu3.c
> index d521b3afb8b1..839d9398f8e9 100644
> --- a/drivers/staging/media/ipu3/ipu3.c
> +++ b/drivers/staging/media/ipu3/ipu3.c
> @@ -489,12 +489,11 @@ static irqreturn_t imgu_isr_threaded(int irq, void *imgu_ptr)
>                         mutex_unlock(&imgu->lock);
>                 } while (PTR_ERR(b) == -EAGAIN);
>
> -               if (IS_ERR_OR_NULL(b)) {
> -                       if (!b || PTR_ERR(b) == -EBUSY) /* All done */
> -                               break;
> -                       dev_err(&imgu->pci_dev->dev,
> -                               "failed to dequeue buffers (%ld)\n",
> -                               PTR_ERR(b));
> +               if (IS_ERR(b)) {
> +                       if (PTR_ERR(b) != -EBUSY)       /* All done */
> +                               dev_err(&imgu->pci_dev->dev,
> +                                       "failed to dequeue buffers (%ld)\n",
> +                                       PTR_ERR(b));
>                         break;
>                 }
>
> --
> 2.7.4
>



[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