From patchwork Wed Jan 20 09:42:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 367462 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C83EC43331 for ; Wed, 20 Jan 2021 10:45:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3FB7923339 for ; Wed, 20 Jan 2021 10:45:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733175AbhATKhZ (ORCPT ); Wed, 20 Jan 2021 05:37:25 -0500 Received: from lb1-smtp-cloud8.xs4all.net ([194.109.24.21]:41079 "EHLO lb1-smtp-cloud8.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731628AbhATJnx (ORCPT ); Wed, 20 Jan 2021 04:43:53 -0500 Received: from cust-b5b5937f ([IPv6:fc0c:c16d:66b8:757f:c639:739b:9d66:799d]) by smtp-cloud8.xs4all.net with ESMTPA id 2A14lJCTVftvz2A18l8jDv; Wed, 20 Jan 2021 10:43:10 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s2; t=1611135790; bh=MfC1s2lgwyYxPnZZbWRrWIDKFG8VbjFQpRmGZkZ0ssY=; h=From:To:Subject:Date:Message-Id:MIME-Version:From:Subject; b=KnTgMU4KdD+niD/Mub53wVy27MLo58Ar2gVm77ofzPplcBiiKT9bRtYY12Ab/XP/0 qXOeHzrKX5bnreI7CDatZyJ/CY5wOQU6NTtGYsqbAgpFaA+7dfVEIjkba01zOtoSqf OTaOTwvlrhFUBUbcIHXlQm131595kVQ3fCN5kqEgzHeltuomYOZTnA9EMA+pH+vq1I K97YArVX8WHiT7R5YFI5VlKAfsvFadPVTO3cIbAvfEO8nTqhsXpH20Ro7NZ+jJ7e2S dsb7VXY0DDdPZ5AD25hvtKoCPg8PmLwjFzUpey7DKZ7rQ87XlL8veCB8GJdyVaNUev UgkIG/CSjEr7Q== From: Hans Verkuil To: linux-media@vger.kernel.org Cc: Hans Verkuil Subject: [PATCH 01/14] atomisp/pci/hmm: fix wrong printk format Date: Wed, 20 Jan 2021 10:42:53 +0100 Message-Id: <20210120094306.784318-2-hverkuil-cisco@xs4all.nl> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210120094306.784318-1-hverkuil-cisco@xs4all.nl> References: <20210120094306.784318-1-hverkuil-cisco@xs4all.nl> MIME-Version: 1.0 X-CMAE-Envelope: MS4xfGCYqhuwV3+Yk1rv2QJDZScmo32gHmrOGHUW680tMvz8mG7tCBVf9OnohmtN4nL1GUNY/zfLKBZtYzV8Xbr2NOg5rrxGzfqKLgJgrvnqWJC4O9RuLB9k 4+VfNDbmV2VhmlnSBs8pyyraikQBcoRXd7vgdYwk0bep6SSkhbuKHiaknI3RYF1/TuiKsb196eIX2rNikNdhPTEn8ceAbNvsq8cGeQ4VWTmyFMyxZ4+yxggF Q1gMJr27nkwFUlAGjc3T6Q== Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Fix this compiler warning on i686: In file included from include/linux/printk.h:409, from include/linux/kernel.h:16, from drivers/staging/media/atomisp/pci/hmm/hmm.c:23: drivers/staging/media/atomisp/pci/hmm/hmm.c: In function 'hmm_alloc': drivers/staging/media/atomisp/pci/hmm/hmm.c:272:3: warning: format '%ld' expects argument of type 'long int', but argument 6 has type 'size_t' {aka 'unsigned int'} [-Wformat=] 272 | "%s: pages: 0x%08x (%ld bytes), type: %d from highmem %d, user ptr %p, cached %d\n", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Use %zu instead of %ld. Signed-off-by: Hans Verkuil --- drivers/staging/media/atomisp/pci/hmm/hmm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/atomisp/pci/hmm/hmm.c b/drivers/staging/media/atomisp/pci/hmm/hmm.c index e0eaff0f8a22..6a5ee4607089 100644 --- a/drivers/staging/media/atomisp/pci/hmm/hmm.c +++ b/drivers/staging/media/atomisp/pci/hmm/hmm.c @@ -269,7 +269,7 @@ ia_css_ptr hmm_alloc(size_t bytes, enum hmm_bo_type type, hmm_set(bo->start, 0, bytes); dev_dbg(atomisp_dev, - "%s: pages: 0x%08x (%ld bytes), type: %d from highmem %d, user ptr %p, cached %d\n", + "%s: pages: 0x%08x (%zu bytes), type: %d from highmem %d, user ptr %p, cached %d\n", __func__, bo->start, bytes, type, from_highmem, userptr, cached); return bo->start; From patchwork Wed Jan 20 09:42:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 368317 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E047EC43332 for ; Wed, 20 Jan 2021 10:45:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9C25D2333C for ; Wed, 20 Jan 2021 10:45:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733277AbhATKi7 (ORCPT ); Wed, 20 Jan 2021 05:38:59 -0500 Received: from lb3-smtp-cloud8.xs4all.net ([194.109.24.29]:49687 "EHLO lb3-smtp-cloud8.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731639AbhATJnx (ORCPT ); Wed, 20 Jan 2021 04:43:53 -0500 Received: from cust-b5b5937f ([IPv6:fc0c:c16d:66b8:757f:c639:739b:9d66:799d]) by smtp-cloud8.xs4all.net with ESMTPA id 2A14lJCTVftvz2A18l8jE1; Wed, 20 Jan 2021 10:43:10 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s2; t=1611135790; bh=JZzkiPmVAaBmQuP/1MtsV6/a+PnMIh7Hh1MIHYnWOrk=; h=From:To:Subject:Date:Message-Id:MIME-Version:From:Subject; b=jiOL0K7siGBgE14+bwao2bL4Ltgr3sivd+Kei6XmUVouyo28M8QkMwdcvAihjCIon mo4IMW9Z4ZIjVlqVkpzlgsjiUPR7p0Crzmrp0X++AtGhaitN7CchznVk5sir2oEQV7 bM90AsxWGa0VdWQ4DErlKwJQmsJNHjIdTj32zoRdpmd8Km3i+8FtkfusKlsrlkSCud ODXDJ8djZoIJwOHkR39UuE5GxMugePc7gcUVycq0ANBLlozza+DhsFKGSlX75ztaSw 9R27IXLc2xDa7EHIp/xMkNJ6k4eGaRIqwPouk0LCRWHPB5BaWbjFEsRpftv19SqUc6 3g0RpsMClXZSA== From: Hans Verkuil To: linux-media@vger.kernel.org Cc: Hans Verkuil , syzbot+42d8c7c3d3e594b34346@syzkaller.appspotmail.com Subject: [PATCH 02/14] v4l2-ctrls.c: fix shift-out-of-bounds in std_validate Date: Wed, 20 Jan 2021 10:42:54 +0100 Message-Id: <20210120094306.784318-3-hverkuil-cisco@xs4all.nl> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210120094306.784318-1-hverkuil-cisco@xs4all.nl> References: <20210120094306.784318-1-hverkuil-cisco@xs4all.nl> MIME-Version: 1.0 X-CMAE-Envelope: MS4xfGCYqhuwV3+Yk1rv2QJDZScmo32gHmrOGHUW680tMvz8mG7tCBVf9OnohmtN4nL1GUNY/zfLKBZtYzV8Xbr2NOg5rrxGzfqKLgJgrvnqWJC4O9RuLB9k 4+VfNDbmV2VhmkuyyJOenL24yx7QFERp9o2SQ72ibKL0wbJ7Hf8SEVIm0JL+mHbYV7hUgZNj6H36R7elzTCc5UMO46UrRVuc1Fq0Arh/79aSp4oBJ79kDWjk 32sBleXhNHyUT+nYtbDuI0FKCA/YsGqezDlArjJfBIo+M3+KWoarFf4bhXy5OYcD/ApKwPBU3V7b4F22rCuJxw== Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org If a menu has more than 64 items, then don't check menu_skip_mask for items 65 and up. Signed-off-by: Hans Verkuil Reported-by: syzbot+42d8c7c3d3e594b34346@syzkaller.appspotmail.com --- drivers/media/v4l2-core/v4l2-ctrls.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index f7b310240af2..016cf6204cbb 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -2181,7 +2181,8 @@ static int std_validate(const struct v4l2_ctrl *ctrl, u32 idx, case V4L2_CTRL_TYPE_INTEGER_MENU: if (ptr.p_s32[idx] < ctrl->minimum || ptr.p_s32[idx] > ctrl->maximum) return -ERANGE; - if (ctrl->menu_skip_mask & (1ULL << ptr.p_s32[idx])) + if (ptr.p_s32[idx] < BITS_PER_LONG_LONG && + (ctrl->menu_skip_mask & BIT_ULL(ptr.p_s32[idx]))) return -EINVAL; if (ctrl->type == V4L2_CTRL_TYPE_MENU && ctrl->qmenu[ptr.p_s32[idx]][0] == '\0') From patchwork Wed Jan 20 09:42:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 368318 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1EEBAC43381 for ; Wed, 20 Jan 2021 10:45:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CD12A23339 for ; Wed, 20 Jan 2021 10:45:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733146AbhATKgv (ORCPT ); Wed, 20 Jan 2021 05:36:51 -0500 Received: from lb3-smtp-cloud8.xs4all.net ([194.109.24.29]:54385 "EHLO lb3-smtp-cloud8.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731616AbhATJnx (ORCPT ); Wed, 20 Jan 2021 04:43:53 -0500 Received: from cust-b5b5937f ([IPv6:fc0c:c16d:66b8:757f:c639:739b:9d66:799d]) by smtp-cloud8.xs4all.net with ESMTPA id 2A14lJCTVftvz2A18l8jEC; Wed, 20 Jan 2021 10:43:10 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s2; t=1611135790; bh=hzRq6gcUKb9kyoq3Szr5E1bDwNwDQ12pPde39gwBv3M=; h=From:To:Subject:Date:Message-Id:MIME-Version:From:Subject; b=f1L543L1yn7ODN01uLgcE2kSX+JpKR4/u8hnH6PLW0GGMVzfyk9NAQqUqFs/z/78p cravbxN1fAYKWyScpux0s+ESbChizJ4mdhMY2L1GiN4sfXWcozNR4mS084jjK/1bgU 5VtWu8KCJPB9rSuD16GZoFH9UI7XGCBb0ejZM1obgK2aYVZwYM4Zx6GJeuCiDQLpxN DiRMQvZBZDAkH15JOLvqJOwpbp6K33WRD1PD9ZPZjuBTUJiPwtE27M85ElMoRqyQoC ef6TiwSjkPDtDQiC3FJApIgsnFXjLaiHAD5B0thqnhNksybFv2E2mzRompcA+3bv45 C48uH0B67WyPg== From: Hans Verkuil To: linux-media@vger.kernel.org Cc: Hans Verkuil , Neil Armstrong Subject: [PATCH 03/14] meson/ge2d: set ret to -ENOMEM Date: Wed, 20 Jan 2021 10:42:55 +0100 Message-Id: <20210120094306.784318-4-hverkuil-cisco@xs4all.nl> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210120094306.784318-1-hverkuil-cisco@xs4all.nl> References: <20210120094306.784318-1-hverkuil-cisco@xs4all.nl> MIME-Version: 1.0 X-CMAE-Envelope: MS4xfGCYqhuwV3+Yk1rv2QJDZScmo32gHmrOGHUW680tMvz8mG7tCBVf9OnohmtN4nL1GUNY/zfLKBZtYzV8Xbr2NOg5rrxGzfqKLgJgrvnqWJC4O9RuLB9k 4+VfNDbmV2VhmkuyyJOenL24yx7QFERp9o2SQ72ibKL0wbJ7Hf8SEVIm0JL+mHbYV7hUgZNj6H36R7elzTCc5UMO46UrRVuc1FprAlm6JDtpBOg8NKiw9C2V WmJ7HTddDRRKbNYr521QD/4NNZeYi3N80Mo5YI4icZY= Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Fix this smatch warning: drivers/media/platform/meson/ge2d/ge2d.c:991 ge2d_probe() warn: missing error code 'ret' when video_device_alloc() returns NULL. Signed-off-by: Hans Verkuil Cc: Neil Armstrong --- drivers/media/platform/meson/ge2d/ge2d.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/meson/ge2d/ge2d.c b/drivers/media/platform/meson/ge2d/ge2d.c index f526501bd473..153612ca96fc 100644 --- a/drivers/media/platform/meson/ge2d/ge2d.c +++ b/drivers/media/platform/meson/ge2d/ge2d.c @@ -988,6 +988,7 @@ static int ge2d_probe(struct platform_device *pdev) vfd = video_device_alloc(); if (!vfd) { v4l2_err(&ge2d->v4l2_dev, "Failed to allocate video device\n"); + ret = -ENOMEM; goto unreg_v4l2_dev; } From patchwork Wed Jan 20 09:42:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 367457 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 282E3C43217 for ; Wed, 20 Jan 2021 10:45:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E31BD2333F for ; Wed, 20 Jan 2021 10:45:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733294AbhATKjS (ORCPT ); Wed, 20 Jan 2021 05:39:18 -0500 Received: from lb3-smtp-cloud8.xs4all.net ([194.109.24.29]:55609 "EHLO lb3-smtp-cloud8.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731636AbhATJnx (ORCPT ); Wed, 20 Jan 2021 04:43:53 -0500 Received: from cust-b5b5937f ([IPv6:fc0c:c16d:66b8:757f:c639:739b:9d66:799d]) by smtp-cloud8.xs4all.net with ESMTPA id 2A14lJCTVftvz2A18l8jEP; Wed, 20 Jan 2021 10:43:11 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s2; t=1611135791; bh=6NRXEHUxjZBx2VWD5wEWM0Lrged4zVx6TCrEsDhzyOc=; h=From:To:Subject:Date:Message-Id:MIME-Version:From:Subject; b=KKA7O6Z3HXzfEKgCZWLjBE+95eRDIQGW3NvUHypMdYG1qwC8RcB7NenuminCkIodY WAfZR/IUlM80twq5xAlltbOeuqRf0Hfa7ddIt7E8EGcq6d6p/dRTyqWjtOuo6MAQPF kaM/M+eMpVjB4y36suX/bk3sAdbRs/vhgS0bUBJKHaJSG/RjPNlKT+pNaVx2qtSlQV /+jWMR84PK+z6McNe+0X0WSMKe4kFNOKQ9umWipXF6cm8+QVz/67cRt92ke0WTh6QT QCPCzsAHqdZa/8mu5oPfz8U/DSwqzxsJzgm2sem1SH7chST7EFkybvqNi6hXy+xNTp SfobkQPtlaIYw== From: Hans Verkuil To: linux-media@vger.kernel.org Cc: Hans Verkuil , "Lad, Prabhakar" Subject: [PATCH 04/14] davinci/vpbe.c: ret contains the return code, not err Date: Wed, 20 Jan 2021 10:42:56 +0100 Message-Id: <20210120094306.784318-5-hverkuil-cisco@xs4all.nl> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210120094306.784318-1-hverkuil-cisco@xs4all.nl> References: <20210120094306.784318-1-hverkuil-cisco@xs4all.nl> MIME-Version: 1.0 X-CMAE-Envelope: MS4xfL6gXyIQamfwxJt2kYKZXIXPfvD+J+cb4hNqS4nbZzw1GI5vvllDlxOUWgqraiFNhq3F/LZtBzfudYa84HR768+XzVha/eeTgmB7xn3J2//BbfAk1A8s 5K51t7mq0GZhhRzy8q2mJCkBnW/olr6hAcPJJmtpi7qySuQkPni50WBwSuSgWdujIYeONtM5tvxr8wdI8jbwvKfnflQAK8HUBVwJAB70utBQl/HA+1/JemGD Qm+5gqLU4GqEBAAl2YVr3KW5mXMyHo1977iCpb9OoBCvqG58vxnSnnoHzxWADMg3 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Fixes this smatch warning: drivers/media/platform/davinci/vpbe.c:632 vpbe_initialize() warn: missing error code 'ret' The function returns 'ret', but instead 'err' was set to -ENOMEM. Signed-off-by: Hans Verkuil Cc: "Lad, Prabhakar" --- drivers/media/platform/davinci/vpbe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/davinci/vpbe.c b/drivers/media/platform/davinci/vpbe.c index fe9468b180e6..5f0aeb744e81 100644 --- a/drivers/media/platform/davinci/vpbe.c +++ b/drivers/media/platform/davinci/vpbe.c @@ -628,7 +628,7 @@ static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev) if (err) { v4l2_err(&vpbe_dev->v4l2_dev, "unable to initialize the OSD device"); - err = -ENOMEM; + ret = -ENOMEM; goto fail_dev_unregister; } } From patchwork Wed Jan 20 09:42:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 368312 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D2A4C41621 for ; Wed, 20 Jan 2021 10:45:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 460A823339 for ; Wed, 20 Jan 2021 10:45:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733207AbhATKiD (ORCPT ); Wed, 20 Jan 2021 05:38:03 -0500 Received: from lb1-smtp-cloud8.xs4all.net ([194.109.24.21]:37355 "EHLO lb1-smtp-cloud8.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731640AbhATJnx (ORCPT ); Wed, 20 Jan 2021 04:43:53 -0500 Received: from cust-b5b5937f ([IPv6:fc0c:c16d:66b8:757f:c639:739b:9d66:799d]) by smtp-cloud8.xs4all.net with ESMTPA id 2A14lJCTVftvz2A19l8jEb; Wed, 20 Jan 2021 10:43:11 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s2; t=1611135791; bh=CKIGfhq1KWOmGl6UjN6qnlcI8sCmeEHWOWE2stnPNWM=; h=From:To:Subject:Date:Message-Id:MIME-Version:From:Subject; b=QHU95PRBy6fYt4ksYfvC2rzv47gn9kGgYJetQI1THLooJrn2zb1FbaauJcEHxM06Q FH0WAe04xpCGb2Gc5QqJKgopk5sl0ZeO5AXyyXSm5Vy0uMPLQRLos0U6sUaihWrePe nJJoVnkxxCP9GvkFyr5V+cTjMPvRSSOdbt3mJgFNmovi/Eyx/t6AVr8hwtKOFAqT74 4Fdtunz7Y8pI2MscLN3XF/R9jjKU1JmTnGiymqA34/eYKu4HJ+heg67+WwJB+Qfzeg +9Lho/fRg3kL52lHrvCQcR8gi262e23rMrU2IQ+Jwe8KZhoLIrexfRS11mWMOfHwAA GJqrdf6YOSNCw== From: Hans Verkuil To: linux-media@vger.kernel.org Cc: Hans Verkuil Subject: [PATCH 05/14] tuners/it913x.c: fix missing error code Date: Wed, 20 Jan 2021 10:42:57 +0100 Message-Id: <20210120094306.784318-6-hverkuil-cisco@xs4all.nl> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210120094306.784318-1-hverkuil-cisco@xs4all.nl> References: <20210120094306.784318-1-hverkuil-cisco@xs4all.nl> MIME-Version: 1.0 X-CMAE-Envelope: MS4xfL6gXyIQamfwxJt2kYKZXIXPfvD+J+cb4hNqS4nbZzw1GI5vvllDlxOUWgqraiFNhq3F/LZtBzfudYa84HR768+XzVha/eeTgmB7xn3J2//BbfAk1A8s 5K51t7mq0GZhhQ49J7CLA+RHjKt5Hf37i+bOtd1gdl67I4sW94CZUKZ7oKlpPPXv1ea/7JeAdQ5LUW/5vUTX2byGUDAugDmGCw5EWS8w0pd7OAxiojkwR3Kr 4pB9lnSLupHvBjX2nym/AA== Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Fixes this smatch warning: drivers/media/tuners/it913x.c:65 it913x_init() warn: missing error code 'ret' Set ret to -EINVAL if the clock identifier was invalid. Signed-off-by: Hans Verkuil --- drivers/media/tuners/it913x.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/tuners/it913x.c b/drivers/media/tuners/it913x.c index e8e66390be41..7696a28fe407 100644 --- a/drivers/media/tuners/it913x.c +++ b/drivers/media/tuners/it913x.c @@ -62,6 +62,7 @@ static int it913x_init(struct dvb_frontend *fe) break; default: dev_err(&pdev->dev, "unknown clock identifier %d\n", utmp); + ret = -EINVAL; goto err; } From patchwork Wed Jan 20 09:42:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 368306 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D377C10DC3 for ; Wed, 20 Jan 2021 10:45:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 67BCB23339 for ; Wed, 20 Jan 2021 10:45:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387498AbhATKka (ORCPT ); Wed, 20 Jan 2021 05:40:30 -0500 Received: from lb2-smtp-cloud8.xs4all.net ([194.109.24.25]:56565 "EHLO lb2-smtp-cloud8.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731645AbhATJny (ORCPT ); Wed, 20 Jan 2021 04:43:54 -0500 Received: from cust-b5b5937f ([IPv6:fc0c:c16d:66b8:757f:c639:739b:9d66:799d]) by smtp-cloud8.xs4all.net with ESMTPA id 2A14lJCTVftvz2A19l8jEn; Wed, 20 Jan 2021 10:43:12 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s2; t=1611135792; bh=cASv0L/3Ndr/1cXJ9kG21MCLpitVUBYkCIZgva6q27M=; h=From:To:Subject:Date:Message-Id:MIME-Version:From:Subject; b=hSoGyyGFfq9hqb/lRu6BjCknO8UQoDDcQunwRywbbELDW0oF57/zZK5CR2qZjN2QY 7xw9BzUn9s4kPmJSq8tQpc69wvHwPq3I4ER8ogmxfMcOAy2DKxoQ7ZxUdqAhjFHjB0 OvIE26XPDUA7/GIuSb5kUmxEeSoXY/oucp2hHaOKMmJ2XbTw0OB0eKqRZP47oHvXDg xbTXGxacYNsDmA08CT4ZCNW36+KADHsGDFt5bofKMAhTAthp0uaKXzmyZ/W1rdcRG/ sk7fG1zfufVvGu0f/2lUPdnunHIApD6ZbMOfYq4+0KNtbPNiuIeN4djnss9WXBJmQ/ 6Yt83tUCjL3MQ== From: Hans Verkuil To: linux-media@vger.kernel.org Cc: Hans Verkuil , kernel test robot , Dan Carpenter Subject: [PATCH 06/14] i2c/ov8865.c: fix error checks using wrong variable Date: Wed, 20 Jan 2021 10:42:58 +0100 Message-Id: <20210120094306.784318-7-hverkuil-cisco@xs4all.nl> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210120094306.784318-1-hverkuil-cisco@xs4all.nl> References: <20210120094306.784318-1-hverkuil-cisco@xs4all.nl> MIME-Version: 1.0 X-CMAE-Envelope: MS4xfORkKQX5gN9k5kFaBKWeo+8JRWkTLMzG6fpWfMxdBNifkxq9v62lX9Jj+rbzuwPnakICu39PzPg6MMJv16bir3xVLnIVCkM9B8JQVe0xWy2saKwmQdGd m2SpTLrwFJwp98Do2dpK1L+DfVBTDRbf2cJz+GRrOWgLQIra6CHaoOKUlywpUr370CJGTmKaILUaPAvbmaZj00hpRivhZUM5xOWpM1QF9KAOKJsh2bLDALE4 eWQXvTlROWPiQ1smvld8vu/Mes68RDdGCInOYWCmnkXtabvHEnNKkjwGrXufHF3ZWd7O3Qk6aQSs4uE1ptnzUQ== Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Fix two typos: dvdd -> dovdd and dvdd -> avdd Both clearly copy-and-paste mistakes. Fixes this smatch warning: drivers/media/i2c/ov8865.c:2852 ov8865_probe() warn: passing zero to 'PTR_ERR' Signed-off-by: Hans Verkuil Reported-by: kernel test robot Reported-by: Dan Carpenter --- drivers/media/i2c/ov8865.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c/ov8865.c b/drivers/media/i2c/ov8865.c index fda5a55979aa..72ef300c0b67 100644 --- a/drivers/media/i2c/ov8865.c +++ b/drivers/media/i2c/ov8865.c @@ -2839,9 +2839,9 @@ static int ov8865_probe(struct i2c_client *client) /* DOVDD: digital I/O */ sensor->dovdd = devm_regulator_get(dev, "dovdd"); - if (IS_ERR(sensor->dvdd)) { + if (IS_ERR(sensor->dovdd)) { dev_err(dev, "cannot get DOVDD (digital I/O) regulator\n"); - ret = PTR_ERR(sensor->dvdd); + ret = PTR_ERR(sensor->dovdd); goto error_endpoint; } @@ -2849,7 +2849,7 @@ static int ov8865_probe(struct i2c_client *client) sensor->avdd = devm_regulator_get(dev, "avdd"); if (IS_ERR(sensor->avdd)) { dev_err(dev, "cannot get AVDD (analog) regulator\n"); - ret = PTR_ERR(sensor->dvdd); + ret = PTR_ERR(sensor->avdd); goto error_endpoint; } From patchwork Wed Jan 20 09:42:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 368311 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8775C10F00 for ; Wed, 20 Jan 2021 10:45:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7B3F52333C for ; Wed, 20 Jan 2021 10:45:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387454AbhATKkY (ORCPT ); Wed, 20 Jan 2021 05:40:24 -0500 Received: from lb1-smtp-cloud8.xs4all.net ([194.109.24.21]:59895 "EHLO lb1-smtp-cloud8.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731647AbhATJny (ORCPT ); Wed, 20 Jan 2021 04:43:54 -0500 Received: from cust-b5b5937f ([IPv6:fc0c:c16d:66b8:757f:c639:739b:9d66:799d]) by smtp-cloud8.xs4all.net with ESMTPA id 2A14lJCTVftvz2A1Al8jF2; Wed, 20 Jan 2021 10:43:12 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s2; t=1611135792; bh=jk8ExUIRHzkWPr8vA/2/QT51ujbhxJnmlqq3kXlcOZI=; h=From:To:Subject:Date:Message-Id:MIME-Version:From:Subject; b=djYrzza9uBAIQM4zTdQsgST+2WHIJtWnh2n6vwBNn17yhkm+Pu3qRS5qtxKhe+0jb xSP3P/J17m24pUnS2YQoOUYFF+yPvCqY1Gn8VwUqgiVpMxJaL023zwZunVSW+Chk0o jESU/qJ8/OH9AqVMsRlsKdd6oAxwlPQEz7uJf9mVPCvbfKKgYbJ9/u6MP6l+tMHelI It1iScmhaAwbEICWpHO4e/o/QoYzANb5RYMaDPGwV8Je37Uilbs5FpAeBMoFsgBA20 UIjvaXogr8R/yaTaLnohisNsNcAm6TamR3hIMyvJg9ONVUuQ1ZZAEHwXkx9v2S47oo qL4Sxh9R9+vgg== From: Hans Verkuil To: linux-media@vger.kernel.org Cc: Hans Verkuil Subject: [PATCH 07/14] sti/c8sectpfe: set correct return code Date: Wed, 20 Jan 2021 10:42:59 +0100 Message-Id: <20210120094306.784318-8-hverkuil-cisco@xs4all.nl> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210120094306.784318-1-hverkuil-cisco@xs4all.nl> References: <20210120094306.784318-1-hverkuil-cisco@xs4all.nl> MIME-Version: 1.0 X-CMAE-Envelope: MS4xfORkKQX5gN9k5kFaBKWeo+8JRWkTLMzG6fpWfMxdBNifkxq9v62lX9Jj+rbzuwPnakICu39PzPg6MMJv16bir3xVLnIVCkM9B8JQVe0xWy2saKwmQdGd m2SpTLrwFJwp91ObOojllz25+H8lTtAoDwLHG8jZpGrKrwU7APww6+sf1nrLb4EicX2xlBYvrLjBqU+uaG6RA0wJBMBQS9YBDMxonC7PwXWYQLCm2T02g8s1 le9Lr6PJfCEpDuvg3Oefuw== Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Fixes this smatch warning: drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c:829 c8sectpfe_probe() warn: missing error code 'ret' Set ret to -EINVAL if the reset gpio was not found. Signed-off-by: Hans Verkuil --- drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c index 5ceb366648b3..a7a6ea666740 100644 --- a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c +++ b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c @@ -826,6 +826,7 @@ static int c8sectpfe_probe(struct platform_device *pdev) dev_err(dev, "reset gpio for tsin%d not valid (gpio=%d)\n", tsin->tsin_id, tsin->rst_gpio); + ret = -EINVAL; goto err_node_put; } From patchwork Wed Jan 20 09:43:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 368316 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC298C43142 for ; Wed, 20 Jan 2021 10:45:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 934DC23332 for ; Wed, 20 Jan 2021 10:45:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387650AbhATKle (ORCPT ); Wed, 20 Jan 2021 05:41:34 -0500 Received: from lb3-smtp-cloud8.xs4all.net ([194.109.24.29]:40217 "EHLO lb3-smtp-cloud8.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731658AbhATJoo (ORCPT ); Wed, 20 Jan 2021 04:44:44 -0500 Received: from cust-b5b5937f ([IPv6:fc0c:c16d:66b8:757f:c639:739b:9d66:799d]) by smtp-cloud8.xs4all.net with ESMTPA id 2A14lJCTVftvz2A1Al8jF7; Wed, 20 Jan 2021 10:43:12 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s2; t=1611135792; bh=DPEsPco8QmKy9HybatKhPIkZ08H34N8xzyBedSbzkIY=; h=From:To:Subject:Date:Message-Id:MIME-Version:From:Subject; b=D5kPFClva7eV+DWAkjynLN/rwBM5BQZK2KoqrBDgwfx9JazNDP7Ez29XjQ2vroyqL c9GD6v5DfRXXC9LbjW86GPp+fWuv+Cx8aai0QBJqPDN63Uc93d3woCQWvxEU7kkrtp HuwJEtRgDVpjV5MwWxC49AxAGW/M1zzWM1A/haMQQxubDf4UVv5YH5Q+7BR3WIm8Uy 4ELb2vJEWwzZZVn/oKXDScgk3BvzrPBKyuGUXjFc3Ju8pyNnEc1xIEpU6YyX6AFoIv weDapCr+0zkDxH+7E3/Q0SAo3G5wGG+Ax5jJll7FptjnQyOGEVEerQ7ordYrZQhciA PDzv58cMks2aw== From: Hans Verkuil To: linux-media@vger.kernel.org Cc: Hans Verkuil , Jean-Christophe Trotin Subject: [PATCH 08/14] sti/hva: add missing clk_disable_unprepare() Date: Wed, 20 Jan 2021 10:43:00 +0100 Message-Id: <20210120094306.784318-9-hverkuil-cisco@xs4all.nl> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210120094306.784318-1-hverkuil-cisco@xs4all.nl> References: <20210120094306.784318-1-hverkuil-cisco@xs4all.nl> MIME-Version: 1.0 X-CMAE-Envelope: MS4xfORkKQX5gN9k5kFaBKWeo+8JRWkTLMzG6fpWfMxdBNifkxq9v62lX9Jj+rbzuwPnakICu39PzPg6MMJv16bir3xVLnIVCkM9B8JQVe0xWy2saKwmQdGd m2SpTLrwFJwp9zBW1P1/x4g1u/iRmZS8OTIXiETopGzzwZ0FpBe27E6Im3OLUCU5bTmJMl0cInRss2P0+vZRDlzZCxq9BSOHthjp/OylirLZtBJRy8e6spBI CspxGB5zQPDsjib/hcvDEFJF2kanhb4tTfo3PC+dh9aYnypScjkYW8f7cWB5e4hB Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Fixes this smatch warning: drivers/media/platform/sti/hva/hva-hw.c:453 hva_hw_runtime_resume() warn: 'hva->clk' not released on lines: 450. Call clk_disable_unprepare() when clk_set_rate() fails. Signed-off-by: Hans Verkuil Cc: Jean-Christophe Trotin --- drivers/media/platform/sti/hva/hva-hw.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/sti/hva/hva-hw.c b/drivers/media/platform/sti/hva/hva-hw.c index 43f279e2a6a3..f59811e27f51 100644 --- a/drivers/media/platform/sti/hva/hva-hw.c +++ b/drivers/media/platform/sti/hva/hva-hw.c @@ -447,6 +447,7 @@ int hva_hw_runtime_resume(struct device *dev) if (clk_set_rate(hva->clk, CLK_RATE)) { dev_err(dev, "%s failed to set clock frequency\n", HVA_PREFIX); + clk_disable_unprepare(hva->clk); return -EINVAL; } From patchwork Wed Jan 20 09:43:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 367456 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 113FDC0044D for ; Wed, 20 Jan 2021 10:45:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E1E6F23339 for ; Wed, 20 Jan 2021 10:45:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387677AbhATKly (ORCPT ); Wed, 20 Jan 2021 05:41:54 -0500 Received: from lb1-smtp-cloud8.xs4all.net ([194.109.24.21]:35375 "EHLO lb1-smtp-cloud8.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731660AbhATJop (ORCPT ); Wed, 20 Jan 2021 04:44:45 -0500 Received: from cust-b5b5937f ([IPv6:fc0c:c16d:66b8:757f:c639:739b:9d66:799d]) by smtp-cloud8.xs4all.net with ESMTPA id 2A14lJCTVftvz2A1Al8jFM; Wed, 20 Jan 2021 10:43:13 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s2; t=1611135793; bh=IB09Ru0Dwkgtmy8Sizw+EPS/eOIBZ32GMG7jQ4yKpeQ=; h=From:To:Subject:Date:Message-Id:MIME-Version:From:Subject; b=kez0JI3VwuTqP+vJT8FUW7V5ftHfxwXlGHoiZkRRSRh9k30V+SQIKt1aSKQKf30uU Dx+hA2cRc8BUs4omFb1XJCC1AMPWthG1KGPNhwicTIdOIOnO+khptX14CBFWHL3pqS Zzv+dIlA0g13WFLr+sXguybfEssG70dxd6EPboqV9sHeN+0WgNBE2zo04nwtRPASPV rhf7/pExacoTcsh3OZLyrJmNdBFlhuYPw69SJOkkGSplbE8xFxXplj5QcT7Nj4OkgZ v2bF6kNUcYYsL7c/IytpPDS7e4H0JbD5mlIMfofQAGYJuCOxGO65x9a/FFs4r24j4r 76OyJSMM1muvA== From: Hans Verkuil To: linux-media@vger.kernel.org Cc: Hans Verkuil Subject: [PATCH 09/14] pci/ivtv: release memory regions on error Date: Wed, 20 Jan 2021 10:43:01 +0100 Message-Id: <20210120094306.784318-10-hverkuil-cisco@xs4all.nl> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210120094306.784318-1-hverkuil-cisco@xs4all.nl> References: <20210120094306.784318-1-hverkuil-cisco@xs4all.nl> MIME-Version: 1.0 X-CMAE-Envelope: MS4xfAX5slZdcEG06gClf1fIbSEcdCCiibSaO57tXMNZ1RIGZ6Bnhop5RCmAwSDRBq0pMH9u1fnxz2YJnBjddl0CUTNYr+CsDS0ZgH7HSCI/FBqqF/Lc17c1 spMTuaX3EY59qmTlxUrh7WdPKN+QMvl/ueTCuoV7ce54KMRIJcbPGXQgqeDUKYloleGy3kY3NfG34FOIu/4gLICuUcAx8qvPQhkcY/j7Cxe5kgNgO9ercodC 59IpAWQKL4x5TIxzCbqj6A== Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Fix this smatch warning: drivers/media/pci/ivtv/ivtv-driver.c:900 ivtv_setup_pci() warn: 'itv->base_addr' not released on lines: 876. One error path didn't release the memory regions. Signed-off-by: Hans Verkuil --- drivers/media/pci/ivtv/ivtv-driver.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/media/pci/ivtv/ivtv-driver.c b/drivers/media/pci/ivtv/ivtv-driver.c index 28acb14490d5..6e448cb3b51c 100644 --- a/drivers/media/pci/ivtv/ivtv-driver.c +++ b/drivers/media/pci/ivtv/ivtv-driver.c @@ -873,6 +873,11 @@ static int ivtv_setup_pci(struct ivtv *itv, struct pci_dev *pdev, pci_read_config_word(pdev, PCI_COMMAND, &cmd); if (!(cmd & PCI_COMMAND_MASTER)) { IVTV_ERR("Bus Mastering is not enabled\n"); + if (itv->has_cx23415) + release_mem_region(itv->base_addr + IVTV_DECODER_OFFSET, + IVTV_DECODER_SIZE); + release_mem_region(itv->base_addr, IVTV_ENCODER_SIZE); + release_mem_region(itv->base_addr + IVTV_REG_OFFSET, IVTV_REG_SIZE); return -ENXIO; } } From patchwork Wed Jan 20 09:43:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 368309 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E365C072B3 for ; Wed, 20 Jan 2021 10:45:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 04C6323332 for ; Wed, 20 Jan 2021 10:45:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387683AbhATKmS (ORCPT ); Wed, 20 Jan 2021 05:42:18 -0500 Received: from lb2-smtp-cloud8.xs4all.net ([194.109.24.25]:42465 "EHLO lb2-smtp-cloud8.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731653AbhATJou (ORCPT ); Wed, 20 Jan 2021 04:44:50 -0500 Received: from cust-b5b5937f ([IPv6:fc0c:c16d:66b8:757f:c639:739b:9d66:799d]) by smtp-cloud8.xs4all.net with ESMTPA id 2A14lJCTVftvz2A1Bl8jFR; Wed, 20 Jan 2021 10:43:13 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s2; t=1611135793; bh=/CUlZ4gB273owm3WI6BFTHh2Aoe9MLl4inaEJzppNWU=; h=From:To:Subject:Date:Message-Id:MIME-Version:From:Subject; b=KqLm75kRMrs2OS0akafqFHRHqQ/kCWzMEntw5toy9V5RvCXZq3Qyom9dfu9sIcRyX xth/yN1pudL0sHpuh6cyksfurlMVaqwn7YelxjV2FkiSj4D9pHnTnIjQwSWY/IdII5 7yjw/Rxb4w7LkdifYAM3nqAsP0htTlsIjvVdJaoZwrD2mpl1D5JmPkXWH2jBS1BtGb CouMP6sYTAVjE3BeN9vv5/1vXI9Ll1pAcF9O6m/HSLDPNs9OTy+hkdeYweOx5HrH8E ztvVqz/7023wvz9Wfxnjvn8BFU1M7v4YKy8wxp1aiAvuU0e8NvIBpmNBFXYbiN/eEU KHm2OlBvAHiDQ== From: Hans Verkuil To: linux-media@vger.kernel.org Cc: Hans Verkuil Subject: [PATCH 10/14] usb/dvb-usb-v2/rtl28xxu.c: clean up code to fix smatch warning Date: Wed, 20 Jan 2021 10:43:02 +0100 Message-Id: <20210120094306.784318-11-hverkuil-cisco@xs4all.nl> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210120094306.784318-1-hverkuil-cisco@xs4all.nl> References: <20210120094306.784318-1-hverkuil-cisco@xs4all.nl> MIME-Version: 1.0 X-CMAE-Envelope: MS4xfAX5slZdcEG06gClf1fIbSEcdCCiibSaO57tXMNZ1RIGZ6Bnhop5RCmAwSDRBq0pMH9u1fnxz2YJnBjddl0CUTNYr+CsDS0ZgH7HSCI/FBqqF/Lc17c1 spMTuaX3EY59qmTlxUrh7WdPKN+QMvl/ueTCuoV7ce54KMRIJcbPGXQgqeDUKYloleGy3kY3NfG34FOIu/4gLICuUcAx8qvPQhkcY/j7Cxe5kgNgO9ercodC 59IpAWQKL4x5TIxzCbqj6A== Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Fixes this smatch warning: drivers/media/usb/dvb-usb-v2/rtl28xxu.c:1040 rtl2832u_frontend_attach() warn: missing error code 'ret' It is actually a bogus warning since in this particular case ret isn't meant to be set. But by reworking the code a bit the code is actually a lot more understandable and it fixes this warning. Signed-off-by: Hans Verkuil --- drivers/media/usb/dvb-usb-v2/rtl28xxu.c | 35 +++++++++---------------- 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c index 3952cc534b4a..97ed17a141bb 100644 --- a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c +++ b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c @@ -944,12 +944,6 @@ static int rtl2832u_frontend_attach(struct dvb_usb_adapter *adap) if (dev->slave_demod) { struct i2c_board_info info = {}; - /* - * We continue on reduced mode, without DVB-T2/C, using master - * demod, when slave demod fails. - */ - ret = 0; - /* attach slave demodulator */ if (dev->slave_demod == SLAVE_DEMOD_MN88472) { struct mn88472_config mn88472_config = {}; @@ -964,14 +958,11 @@ static int rtl2832u_frontend_attach(struct dvb_usb_adapter *adap) info.platform_data = &mn88472_config; request_module(info.type); client = i2c_new_client_device(&d->i2c_adap, &info); - if (!i2c_client_has_driver(client)) { - dev->slave_demod = SLAVE_DEMOD_NONE; + if (!i2c_client_has_driver(client)) goto err_slave_demod_failed; - } if (!try_module_get(client->dev.driver->owner)) { i2c_unregister_device(client); - dev->slave_demod = SLAVE_DEMOD_NONE; goto err_slave_demod_failed; } @@ -986,14 +977,11 @@ static int rtl2832u_frontend_attach(struct dvb_usb_adapter *adap) info.platform_data = &mn88473_config; request_module(info.type); client = i2c_new_client_device(&d->i2c_adap, &info); - if (!i2c_client_has_driver(client)) { - dev->slave_demod = SLAVE_DEMOD_NONE; + if (!i2c_client_has_driver(client)) goto err_slave_demod_failed; - } if (!try_module_get(client->dev.driver->owner)) { i2c_unregister_device(client); - dev->slave_demod = SLAVE_DEMOD_NONE; goto err_slave_demod_failed; } @@ -1009,10 +997,8 @@ static int rtl2832u_frontend_attach(struct dvb_usb_adapter *adap) adap->fe[1] = dvb_attach(cxd2841er_attach_t_c, &cxd2837er_config, &d->i2c_adap); - if (!adap->fe[1]) { - dev->slave_demod = SLAVE_DEMOD_NONE; + if (!adap->fe[1]) goto err_slave_demod_failed; - } adap->fe[1]->id = 1; dev->i2c_client_slave_demod = NULL; } else { @@ -1029,14 +1015,11 @@ static int rtl2832u_frontend_attach(struct dvb_usb_adapter *adap) info.platform_data = &si2168_config; request_module(info.type); client = i2c_new_client_device(&d->i2c_adap, &info); - if (!i2c_client_has_driver(client)) { - dev->slave_demod = SLAVE_DEMOD_NONE; + if (!i2c_client_has_driver(client)) goto err_slave_demod_failed; - } if (!try_module_get(client->dev.driver->owner)) { i2c_unregister_device(client); - dev->slave_demod = SLAVE_DEMOD_NONE; goto err_slave_demod_failed; } @@ -1047,10 +1030,18 @@ static int rtl2832u_frontend_attach(struct dvb_usb_adapter *adap) } } return 0; -err_slave_demod_failed: + err: dev_dbg(&d->intf->dev, "failed=%d\n", ret); return ret; + +err_slave_demod_failed: + /* + * We continue on reduced mode, without DVB-T2/C, using master + * demod, when slave demod fails. + */ + dev->slave_demod = SLAVE_DEMOD_NONE; + return 0; } static int rtl28xxu_frontend_attach(struct dvb_usb_adapter *adap) From patchwork Wed Jan 20 09:43:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 368314 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB2EDC4160E for ; Wed, 20 Jan 2021 10:45:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A8C2F23339 for ; Wed, 20 Jan 2021 10:45:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387661AbhATKlk (ORCPT ); Wed, 20 Jan 2021 05:41:40 -0500 Received: from lb3-smtp-cloud8.xs4all.net ([194.109.24.29]:49445 "EHLO lb3-smtp-cloud8.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731657AbhATJoo (ORCPT ); Wed, 20 Jan 2021 04:44:44 -0500 Received: from cust-b5b5937f ([IPv6:fc0c:c16d:66b8:757f:c639:739b:9d66:799d]) by smtp-cloud8.xs4all.net with ESMTPA id 2A14lJCTVftvz2A1Bl8jFW; Wed, 20 Jan 2021 10:43:13 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s2; t=1611135793; bh=Wk05yQtqStxFJUKVqNfq5qjxGWd/CT0EeCirjMw2RFg=; h=From:To:Subject:Date:Message-Id:MIME-Version:From:Subject; b=hiP5ziZ6oBuG98xtt3sF6WP0yubAbncKHfoiTuo/ZWG/pXuHvLUQX6r3hPCP94eQi jRfoXc4jTSbC1mFiDwwlMjOImvxedC38AYQu9hvUJsAh3CWVV5cPCGQL1Kgjt4baDE cX+EBA9iNoIsKArmKMjzcdKZFdAo0Z80vLrbJlZMiI1iKeyX9+sFaGOnVn2i/KEywx q8sIzZNc/tsoSfvG3VzyJYSlYOXSH00zP1NfT3xkUJAt7qVnx9gU9x87BD5IRHAkdn wru/BguMWwcmDdv2cliTa54Qq42XUx9bLbFigYMP1Lqa18ba9latboX+GGhHx49WSk IccIUTVOk0Ulw== From: Hans Verkuil To: linux-media@vger.kernel.org Cc: Hans Verkuil Subject: [PATCH 11/14] dvb-frontends/rtl2832.c: fix missing error code Date: Wed, 20 Jan 2021 10:43:03 +0100 Message-Id: <20210120094306.784318-12-hverkuil-cisco@xs4all.nl> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210120094306.784318-1-hverkuil-cisco@xs4all.nl> References: <20210120094306.784318-1-hverkuil-cisco@xs4all.nl> MIME-Version: 1.0 X-CMAE-Envelope: MS4xfAX5slZdcEG06gClf1fIbSEcdCCiibSaO57tXMNZ1RIGZ6Bnhop5RCmAwSDRBq0pMH9u1fnxz2YJnBjddl0CUTNYr+CsDS0ZgH7HSCI/FBqqF/Lc17c1 spMTuaX3EY59qmTlxUrh7WdPKN+QMvl/ueTCuoV7ce54KMRIJcbPGXQgqeDUKYloleGy3kY3NfG34FOIu/4gLICuUcAx8qvPQhkcY/j7Cxe5kgNgO9ercodC 59IpAWQKL4x5TIxzCbqj6A== Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Fixes this smatch warning: drivers/media/dvb-frontends/rtl2832.c:702 rtl2832_read_status() warn: missing error code 'ret' 'ret' is indeed not set, so set it to -EINVAL so a proper error code is returned. Signed-off-by: Hans Verkuil --- drivers/media/dvb-frontends/rtl2832.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/dvb-frontends/rtl2832.c b/drivers/media/dvb-frontends/rtl2832.c index 01dcc7f1b9b2..dcbeb9f5e12a 100644 --- a/drivers/media/dvb-frontends/rtl2832.c +++ b/drivers/media/dvb-frontends/rtl2832.c @@ -698,6 +698,7 @@ static int rtl2832_read_status(struct dvb_frontend *fe, enum fe_status *status) goto err; constellation = (u8tmp >> 2) & 0x03; /* [3:2] */ + ret = -EINVAL; if (constellation > CONSTELLATION_NUM - 1) goto err; From patchwork Wed Jan 20 09:43:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 368315 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF88BC433E0 for ; Wed, 20 Jan 2021 10:45:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CAFF723332 for ; Wed, 20 Jan 2021 10:45:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387671AbhATKlp (ORCPT ); Wed, 20 Jan 2021 05:41:45 -0500 Received: from lb2-smtp-cloud8.xs4all.net ([194.109.24.25]:38111 "EHLO lb2-smtp-cloud8.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731667AbhATJop (ORCPT ); Wed, 20 Jan 2021 04:44:45 -0500 Received: from cust-b5b5937f ([IPv6:fc0c:c16d:66b8:757f:c639:739b:9d66:799d]) by smtp-cloud8.xs4all.net with ESMTPA id 2A14lJCTVftvz2A1Bl8jFd; Wed, 20 Jan 2021 10:43:13 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s2; t=1611135793; bh=E5z65qRlZQuYEUTcnzqsRIcp4AaIXPW+rtHHdPXH8zE=; h=From:To:Subject:Date:Message-Id:MIME-Version:From:Subject; b=MkGlxY3+17hEJvpqBcIu6bAb4ttszPfneF7xq/hmPSRJEijwgJQcC8acnExcIRwLI yFwixOtqwt9ot5AruQa7T99C3fyFytkH15xqCTevrGjqnhC2D6roHWeL75pqkAro3U kdmjUNuEg5sRfFFPo66S94Wg3ZaCWNZSCGU6bBnUxcA1sxnZSH7Bl/hbC9XfNLvHKm mo177o6cripID3VMfILIY82Di/YvAcU7gE1/BiZ7rKwbpyhJUcmRhknImoXkKt2NGy qLda0TP/Ddxxu/QLIdEOid5bGsd0SSF1MUkzl2CKag6NZAlzb+h+zbSyYq7BfLQKNr iE/tfzBdIifxA== From: Hans Verkuil To: linux-media@vger.kernel.org Cc: Hans Verkuil Subject: [PATCH 12/14] dvb-frontends/af9033.c: fix missing error codes Date: Wed, 20 Jan 2021 10:43:04 +0100 Message-Id: <20210120094306.784318-13-hverkuil-cisco@xs4all.nl> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210120094306.784318-1-hverkuil-cisco@xs4all.nl> References: <20210120094306.784318-1-hverkuil-cisco@xs4all.nl> MIME-Version: 1.0 X-CMAE-Envelope: MS4xfAX5slZdcEG06gClf1fIbSEcdCCiibSaO57tXMNZ1RIGZ6Bnhop5RCmAwSDRBq0pMH9u1fnxz2YJnBjddl0CUTNYr+CsDS0ZgH7HSCI/FBqqF/Lc17c1 spMTuaX3EY59qmTlxUrh7WdPKN+QMvl/ueTCuoV7ce54KMRIJcbPGXQgqeDUKYloleGy3kY3NfG34FOIu/4gLICuUcAx8qvPQhkcY/j7Cxe5kgNgO9ercodC 59IpAWQKL4x5TIxzCbqj6A== Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Fixes two smatch warnings: drivers/media/dvb-frontends/af9033.c:128 af9033_init() warn: missing error code 'ret' drivers/media/dvb-frontends/af9033.c:855 af9033_read_snr() warn: missing error code 'ret' Set error codes correctly. Signed-off-by: Hans Verkuil --- drivers/media/dvb-frontends/af9033.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/dvb-frontends/af9033.c b/drivers/media/dvb-frontends/af9033.c index 6a8d78b6edac..785c49b3d307 100644 --- a/drivers/media/dvb-frontends/af9033.c +++ b/drivers/media/dvb-frontends/af9033.c @@ -125,6 +125,7 @@ static int af9033_init(struct dvb_frontend *fe) if (i == ARRAY_SIZE(clock_adc_lut)) { dev_err(&client->dev, "Couldn't find ADC config for clock %d\n", dev->cfg.clock); + ret = -ENODEV; goto err; } @@ -852,6 +853,7 @@ static int af9033_read_snr(struct dvb_frontend *fe, u16 *snr) *snr = *snr * 0xffff / 32; break; default: + ret = -EINVAL; goto err; } } From patchwork Wed Jan 20 09:43:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 367460 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 841F1C4361B for ; Wed, 20 Jan 2021 10:45:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6A4442333F for ; Wed, 20 Jan 2021 10:45:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387542AbhATKku (ORCPT ); Wed, 20 Jan 2021 05:40:50 -0500 Received: from lb2-smtp-cloud8.xs4all.net ([194.109.24.25]:41331 "EHLO lb2-smtp-cloud8.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731649AbhATJon (ORCPT ); Wed, 20 Jan 2021 04:44:43 -0500 Received: from cust-b5b5937f ([IPv6:fc0c:c16d:66b8:757f:c639:739b:9d66:799d]) by smtp-cloud8.xs4all.net with ESMTPA id 2A14lJCTVftvz2A1Bl8jFk; Wed, 20 Jan 2021 10:43:13 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s2; t=1611135793; bh=cs1cjxFmxTssq1ygaCbCIhvLeOoO+oVCiVzdkJyEZ3g=; h=From:To:Subject:Date:Message-Id:MIME-Version:From:Subject; b=unBak7/DC+sdpBIe6z1q8jbuyDM3uua0wX5jbnTPgK1ErxOf1SaVKq3E4SkZAtLgk uC+pMbUPgboW163mC4eWpU5U8gLLpjNvKEBLCKGJCnnYIYrYL0tWeGG4CD0r6LrwLs xAeY1p7Xiag9p7wXsuSAzIca83o3e62MAqxqEJiz2BgcRgXkhVNwL/0U1gEN6OnBJp 1ZkHo5YnFR1vKFtIEokDsweWEvQfuZRW38Lt/EGmAxIIgNYE01B/PPqmJ35u/XyrqM Q9whJZ/9LVTuI1mGEfqZ10PnxFfGW/M8Q/eH5oE9E4XB5BR/L7cVwsxmjlavN6hxgX 3Ohw8DPA+3j6Q== From: Hans Verkuil To: linux-media@vger.kernel.org Cc: Hans Verkuil Subject: [PATCH 13/14] atomisp/pci: add missing include Date: Wed, 20 Jan 2021 10:43:05 +0100 Message-Id: <20210120094306.784318-14-hverkuil-cisco@xs4all.nl> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210120094306.784318-1-hverkuil-cisco@xs4all.nl> References: <20210120094306.784318-1-hverkuil-cisco@xs4all.nl> MIME-Version: 1.0 X-CMAE-Envelope: MS4xfAX5slZdcEG06gClf1fIbSEcdCCiibSaO57tXMNZ1RIGZ6Bnhop5RCmAwSDRBq0pMH9u1fnxz2YJnBjddl0CUTNYr+CsDS0ZgH7HSCI/FBqqF/Lc17c1 spMTuaX3EY59qmTlxUrh7WdPKN+QMvl/ueTCuoV7ce54KMRIJcbPGXQgqeDUKYloleGy3kY3NfG34FOIu/4gLICuUcAx8qvPQhkcY/j7Cxe5kgNgO9ercodC 59IpAWQKL4x5TIxzCbqj6A== Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Fix two smatch warnings: drivers/staging/media/atomisp//pci/ia_css_firmware.h:52:29: warning: 'struct device' declared inside parameter list will not be visible outside of this definition or declaration drivers/staging/media/atomisp//pci/ia_css_control.h:49:24: warning: 'struct device' declared inside parameter list will not be visible outside of this definition or declaration Add '#include ' to ia_css_firmware.h so struct device is defined. ia_css_control.h includes ia_css_firmware.h, so it is sufficient to just modify ia_css_firmware.h. Signed-off-by: Hans Verkuil --- drivers/staging/media/atomisp/pci/ia_css_firmware.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/media/atomisp/pci/ia_css_firmware.h b/drivers/staging/media/atomisp/pci/ia_css_firmware.h index edab72256494..e5e2f6fb37e0 100644 --- a/drivers/staging/media/atomisp/pci/ia_css_firmware.h +++ b/drivers/staging/media/atomisp/pci/ia_css_firmware.h @@ -20,6 +20,7 @@ * This file contains firmware loading/unloading support functionality */ +#include #include "ia_css_err.h" #include "ia_css_env.h" From patchwork Wed Jan 20 09:43:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 367461 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3D85C43603 for ; Wed, 20 Jan 2021 10:45:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7F73A23339 for ; Wed, 20 Jan 2021 10:45:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387600AbhATKlF (ORCPT ); Wed, 20 Jan 2021 05:41:05 -0500 Received: from lb1-smtp-cloud8.xs4all.net ([194.109.24.21]:40641 "EHLO lb1-smtp-cloud8.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731652AbhATJoo (ORCPT ); Wed, 20 Jan 2021 04:44:44 -0500 Received: from cust-b5b5937f ([IPv6:fc0c:c16d:66b8:757f:c639:739b:9d66:799d]) by smtp-cloud8.xs4all.net with ESMTPA id 2A14lJCTVftvz2A1Cl8jFp; Wed, 20 Jan 2021 10:43:14 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s2; t=1611135794; bh=IDsjD26s9Euj4LyFV2CX/jH5MvgJQtDQzudauhxg5Es=; h=From:To:Subject:Date:Message-Id:MIME-Version:From:Subject; b=kn+T8KzmzfKD1JHGc5chdePZs0CS823G0kbJ70WCSa6vb0OeMRmufD2YrT185rIFT KqXgameTx8Ld/B4/WbURMCHrpBmUIQBCitQKiQwxyBhLlpkMZOenVqVIwT9xt9igf9 txbtEt1wFK2xgzoAt1c9T0Ju2q9ffo50IiuEL6jBQ4gUgOZxtAykkT1Ruk411q9CE+ 18H4rn9Q6VUGYS/fdFoDym/uD5s3nfZiWrYRXYaTHvkCjTsy/VuaLygZBR5pwhR5Ze QmTLCrFeFGK2jE8/q2qTRE65csEpMYARHmSwUHjByrm1FimYfH8ggdvNGpuLtyvUqW iTA1/fikqAnRw== From: Hans Verkuil To: linux-media@vger.kernel.org Cc: Hans Verkuil Subject: [PATCH 14/14] i2c/ov02a10.c: add cast to fix type mismatch Date: Wed, 20 Jan 2021 10:43:06 +0100 Message-Id: <20210120094306.784318-15-hverkuil-cisco@xs4all.nl> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210120094306.784318-1-hverkuil-cisco@xs4all.nl> References: <20210120094306.784318-1-hverkuil-cisco@xs4all.nl> MIME-Version: 1.0 X-CMAE-Envelope: MS4xfFBmGvvIwAai6tS3xwV9jizlTIpPC1BRkt5zPhw/jABfdUFd8iZJDaGlQzyTlMRxlWvat/SWxV7oqACoU1YyUVOyjCwTWyP12TnFGah7LkRj926zOx+1 CanBVhBYdbVOCeUxqt/9PyeJ5nT4/YorDGl3CNNkHZAMkgsMGqFUnLM+4qS47DqniBN8MxgADgUL+X4MXacdfA21CmbZW3hjOH4/5LCHFJF53oXTHYtXgiXs +VKVew8VTexvUxYzSAPp+Q== Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org By adding this cast '(__force __le16)' this sparse warning is fixed: drivers/media/i2c/ov02a10.c:391:19: warning: cast to restricted __le16 Signed-off-by: Hans Verkuil --- drivers/media/i2c/ov02a10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/ov02a10.c b/drivers/media/i2c/ov02a10.c index 8683ffd3287a..60b4bc645334 100644 --- a/drivers/media/i2c/ov02a10.c +++ b/drivers/media/i2c/ov02a10.c @@ -388,7 +388,7 @@ static int ov02a10_check_sensor_id(struct ov02a10 *ov02a10) if (ret < 0) return ret; - chip_id = le16_to_cpu(ret); + chip_id = le16_to_cpu((__force __le16)ret); if ((chip_id & OV02A10_ID_MASK) != OV02A10_ID) { dev_err(&client->dev, "unexpected sensor id(0x%04x)\n", chip_id);