From patchwork Mon Jun 21 11:56:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 12334661 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=-11.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, 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 90E98C49EA2 for ; Mon, 21 Jun 2021 11:57:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7847261350 for ; Mon, 21 Jun 2021 11:57:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230076AbhFUL7N (ORCPT ); Mon, 21 Jun 2021 07:59:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:34250 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229699AbhFUL7H (ORCPT ); Mon, 21 Jun 2021 07:59:07 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2CCBC611CE; Mon, 21 Jun 2021 11:56:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624276613; bh=cJW6ZV/RN425qeMKGfvcGB3bzVvcoiRdk+y2GpVF8Ks=; h=From:To:Cc:Subject:Date:From; b=uHr54hPd2nruyWRVc4YnUxn/eRx7eTf7OHuF0nFyUqadSaA48/Lgv5PHygxB8E657 xllRpboBLFih/Jyqr1szLfOQLZgtm9J+P/0cbGVA43Qfjpz1+G3HH1x3WeoWifZtds N5aktCSqCcmF2EWvQacfhu/68o73JDuF+s3g29l83qmEqM2HyI/LAOMcy/mxKLEwdE 6ipFFN8H1EPq3CGWKXlquTN+u27/CUwb19Aop0ItTug7wDCsy+SdakIZLT5E3p7cBp ZH/Jp3ymQap5Jyg+boqdMheRQV3JIUThOXjwSWQi+mVS/IDj9eVydy9k9sKvt9NESy 6AfoA469hgHXg== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1lvIXq-000Hcd-Q7; Mon, 21 Jun 2021 13:56:50 +0200 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Andy Walls , Laurent Pinchart , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: [PATCH 0/5] some smatch fixes Date: Mon, 21 Jun 2021 13:56:44 +0200 Message-Id: X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This 5 patch series addresses a couple of other smatch warnings. One of the patches seem to be fixing an user-visible bug: media: uvc: don't do DMA on stack Basically, input selection at the UVC driver seems broken, as it is usind DMA on stack, which stopped working on Kernel 4.9. In practice, the number of affected devices is probably small, as this affects UVC devices with multiple inputs. The vast majority of UVC ones have just one input. Mauro Carvalho Chehab (5): media: dib8000: rewrite the init prbs logic media: uvc: don't do DMA on stack media: v4l2-flash-led-class: drop an useless check media: ivtv: prevent going past the hw arrays media: sti: don't copy past the size drivers/media/dvb-frontends/dib8000.c | 56 ++++++++++----- drivers/media/pci/ivtv/ivtv-cards.h | 68 +++++++++++++------ drivers/media/pci/ivtv/ivtv-i2c.c | 16 +++-- drivers/media/platform/sti/delta/delta-ipc.c | 3 +- drivers/media/usb/uvc/uvc_v4l2.c | 10 ++- drivers/media/usb/uvc/uvcvideo.h | 3 + .../media/v4l2-core/v4l2-flash-led-class.c | 2 +- 7 files changed, 106 insertions(+), 52 deletions(-)