From patchwork Tue Nov 29 16:47:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 84874 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp1677638qgi; Tue, 29 Nov 2016 08:49:28 -0800 (PST) X-Received: by 10.84.175.234 with SMTP id t97mr63446894plb.145.1480438167914; Tue, 29 Nov 2016 08:49:27 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 133si60595479pgh.252.2016.11.29.08.49.27; Tue, 29 Nov 2016 08:49:27 -0800 (PST) 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=pass header.i=@linaro.org; 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=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933341AbcK2QtK (ORCPT + 25 others); Tue, 29 Nov 2016 11:49:10 -0500 Received: from mail-oi0-f48.google.com ([209.85.218.48]:34987 "EHLO mail-oi0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756572AbcK2Qr3 (ORCPT ); Tue, 29 Nov 2016 11:47:29 -0500 Received: by mail-oi0-f48.google.com with SMTP id b126so196902240oia.2 for ; Tue, 29 Nov 2016 08:47:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Hiv+x0+PiI+ibUgaDA9ul0i+cXmUSpPpAVsiY17oQjk=; b=deiKtOFphwL8A9Zu3AOawAc7Mpe+GqE4aqLkagNPFWS93f8MZL/FovJrbztaAvSvGJ CznTVncUEs2KxEK0db7a4okj38QW4gzrqj0uzQkN1itErqIeqkHgl6znUlUog2FqEVUD SbF5byNrV70DlvpuCxb71EtavAnrlUcq5SIVs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Hiv+x0+PiI+ibUgaDA9ul0i+cXmUSpPpAVsiY17oQjk=; b=DEWGVqCPSUgNYD9TtZZi+mpOjmau+bBnLbIIHQEdwohlIrBITdY4dB3e7vSKDkWCv/ urbRR8lFGbyDYKnwN5b+fi8vetZFlG2ZAMSzU20OmxzoRmq5ylADamd7kkqhQ/JIwT58 8pZ71YYplkMz9II+JMaTekfrVW4QJu58JeMexPqZlZqFagEtUq3a6ygKDFlgC98+HcBA De2NCoHZabxbqrblvn+hUCtfkiWy9ux2lvS5VeDXeMcWccWmEY/sJueDl6V0YbZDPn9w f4k891T63OwjilnpfWvhRzoxTYz33nBJ9QpDaXZn++0RrU4hfn85e07J6GOBsh3dR1+l MLFA== X-Gm-Message-State: AKaTC0210WdZvYsWNpVZBK7UAhY47cK3lHicDSH/5g4nrP7+zMhaVmaa1a9fLZy207yVRINO X-Received: by 10.36.13.82 with SMTP id 79mr24456016itx.66.1480438047897; Tue, 29 Nov 2016 08:47:27 -0800 (PST) Received: from t430.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id l3sm21810442ioa.7.2016.11.29.08.47.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 29 Nov 2016 08:47:27 -0800 (PST) From: Mathieu Poirier To: gregkh@linuxfoundation.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 7/9] coresight: tmc: Remove duplicate memset Date: Tue, 29 Nov 2016 09:47:17 -0700 Message-Id: <1480438039-24960-8-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1480438039-24960-1-git-send-email-mathieu.poirier@linaro.org> References: <1480438039-24960-1-git-send-email-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Suzuki K. Poulose" The tmc_etr_enable_hw() fills the buffer with 0's before enabling the hardware. So, we don't need an explicit memset() in tmc_enable_etr_sink_sysfs() before calling the tmc_etr_enable_hw(). This patch removes the explicit memset from tmc_enable_etr_sink_sysfs. Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-tmc-etr.c | 2 -- 1 file changed, 2 deletions(-) -- 2.7.4 diff --git a/drivers/hwtracing/coresight/coresight-tmc-etr.c b/drivers/hwtracing/coresight/coresight-tmc-etr.c index 3b84d0d38c22..5d312699b3b9 100644 --- a/drivers/hwtracing/coresight/coresight-tmc-etr.c +++ b/drivers/hwtracing/coresight/coresight-tmc-etr.c @@ -150,8 +150,6 @@ static int tmc_enable_etr_sink_sysfs(struct coresight_device *csdev) drvdata->buf = drvdata->vaddr; } - memset(drvdata->vaddr, 0, drvdata->size); - drvdata->mode = CS_MODE_SYSFS; tmc_etr_enable_hw(drvdata); out: