From patchwork Tue Nov 6 12:07:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fengguang Wu X-Patchwork-Id: 10670209 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5550415A6 for ; Tue, 6 Nov 2018 12:09:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E1D72A354 for ; Tue, 6 Nov 2018 12:09:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2CFDB2A356; Tue, 6 Nov 2018 12:09:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BFDBE2A354 for ; Tue, 6 Nov 2018 12:09:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=66ryYQsQtehX151CzOcvU+RWCkbylt9vp2x3agl/Ky0=; b=VqwyirdCWpucIA vor4Zb7n8dfjsSq30WGzcFggHaQ7kS3DfV1Y/THPTj+gtq4XdGAJV8+TSDAESqx/HYcvLaBDWWa/M zXg0Rih3Tea9PV97Mgc2pnrcu+t5+HUbiC5I8YsaBTOsyKwQvj8ODfN4dQZdbJRXRhRQHgIgmcXF+ x2c35Ko5PLvnNr9IJuhsEW/ri4OtmNQ6A5aF1kQmaEYP/aA850deZiYli52FWsv0bwZSp7S+z0IZq yMuNxnec+YBIUO4mjfaGGDRQI3OO0G85sNDiN+gRkqIc2TWmI441JRMtiZSAA9MklI+Hk9g3JRD+d 5b92hojQ0upMTQKNavSw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gK0B3-000395-GS; Tue, 06 Nov 2018 12:09:49 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gK0Av-00031H-4Z; Tue, 06 Nov 2018 12:09:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=FAMrKLH5rkssrqDVRkfR3d55u974FltBtyijGEZ9Rng=; b=YkjFmcxi4MLzq4Hwpm4DHoKcT Pnf8W0sWJdlESz3aooiYhDkAlKt19/wR6LbTp+dn/Njii+ZXIFKtoNOkJPpz48xd0tIw8q4Bwq/7q 4v8j96bLXsLTtPWzDQ5CQFzD48mXN/ScXyA4DaYtSHi8cuJJ3wVQHPwlmTAB23V78YNvc3c5upEgU tGQFHtY6WYpmhcI0pJVpsEUZQW7Xi0e0qtlEiNidEA2A8bOWkWPLw1jHQPC5LeVOWvFDWPjn7e2CY 9ojU6quxgZ9ETCKIzIYBYQH45+jsfYe3GjRIOaOYbyFbIkUQs6qDXR7zTBYTpgD/7g0oSUEpZ6zCs YlpuYYVKw==; Received: from mga06.intel.com ([134.134.136.31]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gK0As-000609-7a; Tue, 06 Nov 2018 12:09:39 +0000 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Nov 2018 04:08:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,471,1534834800"; d="scan'208";a="83701571" Received: from lkp-server01.sh.intel.com (HELO lkp-server01) ([10.239.97.150]) by fmsmga007.fm.intel.com with ESMTP; 06 Nov 2018 04:08:22 -0800 Received: from kbuild by lkp-server01 with local (Exim 4.89) (envelope-from ) id 1gK09e-00078E-5L; Tue, 06 Nov 2018 20:08:22 +0800 Date: Tue, 6 Nov 2018 20:07:24 +0800 From: kbuild test robot To: Maxime Jourdan Subject: [PATCH] media: meson: fix zalloc-simple.cocci warnings Message-ID: <20181106120724.GA79146@athens> References: <20181106075926.19269-3-mjourdan@baylibre.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20181106075926.19269-3-mjourdan@baylibre.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181106_070938_424557_2739C34B X-CRM114-Status: GOOD ( 15.07 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Neil Armstrong , Martin Blumenstingl , Kevin Hilman , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Hans Verkuil , kbuild-all@01.org, linux-amlogic@lists.infradead.org, Mauro Carvalho Chehab , linux-arm-kernel@lists.infradead.org, Jerome Brunet Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: kbuild test robot drivers/media/platform/meson/vdec/esparser.c:148:13-31: WARNING: dma_zalloc_coherent should be used for eos_vaddr, instead of dma_alloc_coherent/memset Use zeroing allocator rather than allocator followed by memset with 0 This considers some simple cases that are common and easy to validate Note in particular that there are no ...s in the rule, so all of the matched code has to be contiguous Generated by: scripts/coccinelle/api/alloc/zalloc-simple.cocci Fixes: 3ab8ea56b2f6 ("media: meson: add v4l2 m2m video decoder driver") CC: Maxime Jourdan Signed-off-by: kbuild test robot --- url: https://github.com/0day-ci/linux/commits/Maxime-Jourdan/dt-bindings-media-add-Amlogic-Video-Decoder-Bindings/20181106-162646 base: git://linuxtv.org/media_tree.git master Please take the patch only if it's a positive warning. Thanks! esparser.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) --- a/drivers/media/platform/meson/vdec/esparser.c +++ b/drivers/media/platform/meson/vdec/esparser.c @@ -145,13 +145,11 @@ int esparser_queue_eos(struct amvdec_cor dma_addr_t eos_paddr; int ret; - eos_vaddr = dma_alloc_coherent(dev, - len + SEARCH_PATTERN_LEN, - &eos_paddr, GFP_KERNEL); + eos_vaddr = dma_zalloc_coherent(dev, len + SEARCH_PATTERN_LEN, + &eos_paddr, GFP_KERNEL); if (!eos_vaddr) return -ENOMEM; - memset(eos_vaddr, 0, len + SEARCH_PATTERN_LEN); memcpy(eos_vaddr, data, len); ret = esparser_write_data(core, eos_paddr, len); dma_free_coherent(dev, len + SEARCH_PATTERN_LEN,