Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3698524ybi; Sun, 14 Jul 2019 20:20:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqxe4B8VgILPKsTxTK40fSbnU8lQksWEFobt3SYNUL9nGv5rjNkVinjggw8+uvqwvZlD7yaL X-Received: by 2002:a63:e251:: with SMTP id y17mr24347289pgj.8.1563160804561; Sun, 14 Jul 2019 20:20:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563160804; cv=none; d=google.com; s=arc-20160816; b=UN57hw4EEfUeQEAnBPFxVmk6YHXB9ds8D6fAwmOfv8elJ5uETykd2cVzYETS+oqwwl u/xAEf7TYaSXobKjfc4Ot/EwjBN9Z9/Ox3KIq3+1of1rHXUv6bcUiA2U622Gf3uuyjpp YgbyOE4emFr/kqY5OZ1wN4m8ixF1zlHtKTW5WtcC0ZvnJi0v9xMbmVskQBbCSZoHI9/c c7TzLZVkM5/YLq7GmzhepLal6IsiQnG1iGo3LaD7NYPC4Vekwf4DKxQmu8fWrdPx9551 K3hLcJ+pUtiw6IZ+HhqlqArnrYowbKhNL1+9c2gc+Srd0idHH+MTvvbjYP9uNZOWOHs5 F6cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:message-id:date:subject:cc:from :dkim-signature; bh=H/7gtO6yAtm6xFL2cscvQSgUmzdc7tC2HnfEMXV/YyM=; b=lVSCj3LiMxdoEIisc0cEa/1u2jktWeMnPiGP3zA7QWRzyCOJ9BOEnooGRrIw5xqk3u 10hFakwjKhnEizr8qa0Ihfqsha/Zih9orzDTfG9KY6snnJR99qp3FOGCEajl+SEmfvXJ Cx7Rzymu4JJ0BwtUEI/9llu43w4mJJ+jAVm3cL76zN46ux/7FOQGptsYOtyZgXFb36MK IDwqC/KM/SzItSK+xT26WeYQMV6ZtKpJfEDLlVDSPF9M+/Pfm7u7NnRppyy6IENkVjaQ 6v4UePpTR2MwFLyN/a/vARC9l7oLY4ACmCkEShbxqfbbyacXKQOvVM6jrGfTCP2AOpkw 8lEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=hgn+MjbW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 5si14911586plx.200.2019.07.14.20.19.45; Sun, 14 Jul 2019 20:20:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=hgn+MjbW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729264AbfGODSv (ORCPT + 99 others); Sun, 14 Jul 2019 23:18:51 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:33540 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727006AbfGODSu (ORCPT ); Sun, 14 Jul 2019 23:18:50 -0400 Received: by mail-pf1-f195.google.com with SMTP id g2so6745826pfq.0; Sun, 14 Jul 2019 20:18:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=H/7gtO6yAtm6xFL2cscvQSgUmzdc7tC2HnfEMXV/YyM=; b=hgn+MjbW6pNToyTKhz/eCffftAp1rR+duFKQ3fhgUOCXYVcJqfOPliyonw3sn0wlPy O8GB1VWq6GNtjVBMfa52WZqtoPAw2vhcUviajJUOeA1GHd/VEdn1E42sHzOkY/i96oOh ueu1SLDUhHmBZg6BBUuLdtOaDErgWVXhHA5+CGCXWskYS6Ob01g3ML68j3Vd8AT2ALf4 SHRNe6Gp2XwVNPPXnD/kblNsg0O9Rp95v1F3Pd/lFVCWq751YuPICsMpP0a73vSspMCJ +Kri0hOVysQwbRcdpAVrvcOEJZvHMP5wNZ7wAbF1yynuM6wiNIQCT07+MW2KAdCeTuYG zotA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=H/7gtO6yAtm6xFL2cscvQSgUmzdc7tC2HnfEMXV/YyM=; b=qNXpX5/sOiKaWvv18g6QGB6Gw0TkJmj6nTwLY82e9vdYvEdBvv4OLf/ZCWTR5ZzvRq V4qdnfBkYvl/JBA488rflFj0vw9J9tTJa0pmMcm9OCFFQ11igmmldtx1lwh1lCXkhWZL UCqvbjjdqJuWcxehnsLaa0T9LYrvpZZd0XPWhr0dfPrDNKQGE9J32FYoZKtfO+iw2JHV E8j4bXqoy3k+cANJwRmYT+F5CpPeZ0vOLOpXyVx9OVV9AjVWiiYNg2qr2Sa9LQaQHiCs C7cPL8jHr5MXoTdLWWDdqrHEgLqNQfIFuk25Gj8ZmMGYwbwOoFV8oo18+HfQXiEzaVQS oSiw== X-Gm-Message-State: APjAAAWfCdwUeAsRiUZUz1mgZEUZZWkJBX5bkOYMy7H4J83yVfHev2Lr CL7pcP3SFULm45ZXpM4gL7YskPbzMOE= X-Received: by 2002:a63:181:: with SMTP id 123mr25145338pgb.63.1563160730158; Sun, 14 Jul 2019 20:18:50 -0700 (PDT) Received: from hfq-skylake.ipads-lab.se.sjtu.edu.cn ([202.120.40.82]) by smtp.googlemail.com with ESMTPSA id 124sm16878956pfw.142.2019.07.14.20.18.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Jul 2019 20:18:49 -0700 (PDT) From: Fuqian Huang Cc: Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Fuqian Huang Subject: [PATCH v3 14/24] media: ngene: Remove call to memset after pci_alloc_consistent Date: Mon, 15 Jul 2019 11:18:44 +0800 Message-Id: <20190715031844.6844-1-huangfq.daxian@gmail.com> X-Mailer: git-send-email 2.11.0 To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org pci_alloc_consistent calls dma_alloc_coherent directly. In commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*"), dma_alloc_coherent has already zeroed the memory. So memset is not needed. Signed-off-by: Fuqian Huang --- Changes in v3: - Use actual commit rather than the merge commit in the commit message drivers/media/pci/ngene/ngene-core.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/media/pci/ngene/ngene-core.c b/drivers/media/pci/ngene/ngene-core.c index b75ab7d29226..af15ca1c501b 100644 --- a/drivers/media/pci/ngene/ngene-core.c +++ b/drivers/media/pci/ngene/ngene-core.c @@ -854,8 +854,6 @@ static int create_ring_buffer(struct pci_dev *pci_dev, if (!Head) return -ENOMEM; - memset(Head, 0, MemSize); - PARingBufferCur = PARingBufferHead; Cur = Head; @@ -907,8 +905,6 @@ static int AllocateRingBuffers(struct pci_dev *pci_dev, if (SCListMem == NULL) return -ENOMEM; - memset(SCListMem, 0, SCListMemSize); - pRingBuffer->SCListMem = SCListMem; pRingBuffer->PASCListMem = PASCListMem; pRingBuffer->SCListMemSize = SCListMemSize; -- 2.11.0