From patchwork Tue Jul 18 09:50:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Qian X-Patchwork-Id: 13318249 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E0D4FEB64DA for ; Wed, 19 Jul 2023 05:50:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=ZPI90Xno3qMFWTUThKizzxfWLEnkRmGaoFKv3hB6KCM=; b=PO+fIXJVkKSUci QZgxgZFUkE90e2MtT/ORc59809lOcI7XSPtqEc2GaixIn13tw6MfVsMKA5wKrbD9Y4dq2KORRY4dL QZD5XSZDJVUDNConOAIO3u+Whsz8bBDnNzjWBxFiFTLpYsPDtSf6MyDSWHhphUgcNJzN/Ki9m/K6u JnhGlTwWM1iLVd9lW6P4ksfgs+0n4vSIrl6ebiG+bRVmnyerE+AEe50a0zSj2/RBVVXWOdVPyRrYw gnv5QKGHOnVW9zMxnG6aAK06vebvTnroRvG8351iGExo9vk9TlWLfD+pKl5XUUIqz/4RddBfF+fb7 WL+ig3671vl25SVIxJBA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qM04X-005Qme-1y; Wed, 19 Jul 2023 05:50:01 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qM04W-005Qm3-0J for linux-arm-kernel@bombadil.infradead.org; Wed, 19 Jul 2023 05:50:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=MIME-Version:Content-Type: Content-Transfer-Encoding:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-ID:Content-Description:In-Reply-To:References; bh=S6MdaxAytz1pci2YqqlhDJoPpbGLB/n5nrnyjZl92u4=; b=grDPLVw0JHrMqWAoHa7PjyODec lE2SKxTLCRckDh2H8ded/VKTEfCwoXPbiChaSgLy4zR62DsuTUmPA/6QOzGe32fHhUXHaUth6PKYL id1Xm0pBIkbASX0RcKE5beI5GPR+qlroJpbpKsd7F4TzTgTUWdfcwtAdfadegjtAAZxmM+qWFmJWr fUZ/jNxZTfTGTL3Gwnq6w2cOkQSJ4QSR80/tL1QT1QD6uv4J1XzYUMSSypeZ/PkyINDZ7F5Zlzysh N9LVa2cYj59ax5MrxBmcdGEFQ1i+xmGiQKIZcAVhw7a/6od/S/TbAJKzk4NURdhTv7jxXstNY5FzU 4IpQeLkA==; Received: from mail-ve1eur01on061d.outbound.protection.outlook.com ([2a01:111:f400:fe1f::61d] helo=EUR01-VE1-obe.outbound.protection.outlook.com) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qLhcr-00BOnv-1V for linux-arm-kernel@lists.infradead.org; Tue, 18 Jul 2023 10:08:15 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OGixpFSQOhnc8VKjTIwMxkUalCXUbyBLKh7R/LnuKqiEzLHNlEko+miJlAfl0+U8eS2PM2fzPKy0L66BfPtOPCkj5hYpuWX2btP/QursYPHICBcbPei701dJ0w3vUBwtsdwvw/WbyYwmmZ7VxdqdC9Mio1f8jeOsFy9npeVnFFN+i0ozPFEvm+dooennjUeTJ4uORxeFYmx6eF7Bqa++Iz/lkrGYN2tOGRWpyJCeH94RfmtPOFjbhv9wd+pRDdynd80ZST4Z2plN65ptwU0DeWipexJjPWc+Fqsn2Bi4i3TcdqzRkbCrd3TfvD1ubZ7c27CaurmAskASAG3TslV2kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=S6MdaxAytz1pci2YqqlhDJoPpbGLB/n5nrnyjZl92u4=; b=gOxpRWOHfUTa0FLxLrbkB4e9IRB/sW89ag/wrWLCCzYm1fCL++RohxcOljU5BaDcuqZvytjHU/0hgyTlMR4CUfV9vcckg1ttWpr60LV7uY6GMifluHHdlq4v2lUzKTaUc9sFHbmyzaAnlwr24NCGwfWWbAllCMQ7BYIVm3sGsWF10POSvXaS6onByw0izBSdioJbV/JaRJYTLf9dwkfZpWT/VidlzR8Gx6//yRcAKqfWAWQLib/s5WRRKPykn7bhgr8w8ggDGRsd6cDvldC0+sz+IP9ItPMtd8TQmjbHQpokY+uCL9UequXZDSujqo5jGc9B3bo7vHD0+cLjmyEZaQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=S6MdaxAytz1pci2YqqlhDJoPpbGLB/n5nrnyjZl92u4=; b=gTNRTl1wd9XM1ndaVjWZF+H3h1BE9Urd4QSuWiIQcTpgAqpbtpsMizoAbfdZfBMp8MEHpG/c8oONxpodkrvNtJq76o6iuiZfQ7JOJ612TSmguRopC7ZVu8jXykaqd/gWCCujd6eEzIsIdNwUC6QfcfXr1+ZyzmSbwKYgSmI+2l4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB6341.eurprd04.prod.outlook.com (2603:10a6:20b:d8::14) by DB8PR04MB7067.eurprd04.prod.outlook.com (2603:10a6:10:12a::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.31; Tue, 18 Jul 2023 09:50:42 +0000 Received: from AM6PR04MB6341.eurprd04.prod.outlook.com ([fe80::613b:e94b:4ccd:f55a]) by AM6PR04MB6341.eurprd04.prod.outlook.com ([fe80::613b:e94b:4ccd:f55a%5]) with mapi id 15.20.6588.031; Tue, 18 Jul 2023 09:50:42 +0000 From: Ming Qian To: mchehab@kernel.org, hverkuil-cisco@xs4all.nl Cc: shawnguo@kernel.org, robh+dt@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, xiahong.bao@nxp.com, eagle.zhou@nxp.com, tao.jiang_2@nxp.com, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 0/5] media: amphion: fix some issues reported by coverity Date: Tue, 18 Jul 2023 17:50:08 +0800 Message-Id: X-Mailer: git-send-email 2.38.1 X-ClientProxiedBy: SI2PR04CA0009.apcprd04.prod.outlook.com (2603:1096:4:197::8) To AM6PR04MB6341.eurprd04.prod.outlook.com (2603:10a6:20b:d8::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB6341:EE_|DB8PR04MB7067:EE_ X-MS-Office365-Filtering-Correlation-Id: 2cdb69cf-acda-4e3c-4eb1-08db877472dc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hwQbCMd2SeQbX8PojhZmpIZ3wVJh8QFoVNvsRS4aHSve2sFAn8iZz5/+NGtZr5465Ug1Q3M3fVj9S02lmOQGlepfEdtEhM2JLs29OiaxvC6jgAAY4q6Jq8+8ouhJc6iAxeoze+16sNUWZwox2BGVjt+pIKnViC1cG5bsziP2lUcAHjkJuvdpwSpsRQBXi4s+gi+roHppM2ZwlQwTyHCnvcGHZwwkV8G4ElXBpKJdVJnHg2DwaVDCK9OB+Wf6Xhl/KiMRevsLnj/h68NaXWSeHRMYb9xiWKQm2v14z2zU0iOkX4GuImgUZPtL+Vqy7vpiSPIVWIU4RpEJus/nVv6MVw8g8FMOyEsNSGt3FDP/cxtKIeMV5favBAqXRWERR3Hs+GuM+Fm7hS3UKjCSN32bbzIjjUC+lVvjxzoD9N9DtiJ6ck979Vb5uRPVLja+auFxeRow3tKDYxutvB5kWAuFbwHBpK3edaY9yBG8hC93k4Ro7FXoIgekLMlDNh/LIC3RBjubTEk88ZJLpZgu22XIeqkWu83vaPXSnEFtfj50DluFVa3Kv+AkQEv46D0pJpCSiuSkw9z5ojX6dbVgomdswPyZgA0ViCyoTtQZs0Umh21HiLkx+dymoAMPF3qUdBDP X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB6341.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(376002)(39860400002)(136003)(346002)(396003)(451199021)(7416002)(86362001)(2906002)(4744005)(36756003)(44832011)(2616005)(6512007)(83380400001)(186003)(6506007)(26005)(38350700002)(38100700002)(52116002)(6486002)(6666004)(4326008)(66946007)(66476007)(66556008)(316002)(5660300002)(478600001)(8676002)(41300700001)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: V6//N9vh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senWaZoTp5bbxiDBEwdKj3Vo8+y4LFPdZ9JsMtY/n6/YFxRrBUcjXGeeXuwAHBG9l8lHjqeA51CiHSWEOEp6QjTZNQlizjdqxk7/lPxnorjsDsx++TK+Uno/u0O2soopzOGKs5MeAoEiJUhmg1r2S9tZuFk6MS71k/qkYwNlZyU/FaLnUUZzPtHze+j6bQQwRtRjHtfGcBvfjS7+0Wfe8s5prQ+clsNac26nqVktRl0SfRTGCx/ItR7kqiaGimT6pIhFCsNdcsvenWAU1o1tFWkOOrkMqTyWmyxsoWr6f0IcqOi9H1yxHLAiNBrsvmC8UxosUIkSvpyPOBu80yQmeSW+eKnlN5e88W2DjFdlGtc+zOvrxzdKotg3wu4Xq0TNlCbF215i7E8AWuBUTsfKN1h0/1roE6gaWMqKI57jQS/ODQskqTJFoeV9SlfFdPDZgDUwq9TEDIl23p4bjyK+XnFJCIGKKkfd4a3Q6oyrTtEcaWpAz/3mpWx+7VHHbj02U3l08XYEk X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2cdb69cf-acda-4e3c-4eb1-08db877472dc X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6341.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jul 2023 09:50:42.0342 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: F2h5Cx8TwROGbpW8ZNA2WhGeArCVIgbpSrmVL/xV2JuQeNTNyloVOxSp9x7ax0KRg7pnukZu9DSx1yWonZPdhw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB7067 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230718_110813_888991_73B84BB8 X-CRM114-Status: UNSURE ( 7.21 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Coverity is a proprietary static code analysis tool from Synopsys. And the coverity scan report some issues about amphion vpu driver, CHECKED_RETURN: 4 case REVERSE_INULL: 2 case UNINIT: 6 case UNUSED_VALUE: 1 case Ming Qian (5): media: amphion: fix CHECKED_RETURN issues reported by coverity media: amphion: fix REVERSE_INULL issues reported by coverity media: amphion: fix UNINIT issues reported by coverity media: amphion: fix UNUSED_VALUE issue reported by coverity media: amphion: ensure the bitops don't cross boundaries drivers/media/platform/amphion/vdec.c | 5 ++++- drivers/media/platform/amphion/venc.c | 6 ++++-- drivers/media/platform/amphion/vpu_cmds.c | 5 +++-- drivers/media/platform/amphion/vpu_core.c | 2 ++ drivers/media/platform/amphion/vpu_dbg.c | 11 +++++++++-- drivers/media/platform/amphion/vpu_msgs.c | 12 ++++++------ 6 files changed, 28 insertions(+), 13 deletions(-)