From: Suzuki K. Poulose Date: Tue, 29 Nov 2016 16:47:17 +0000 (-0700) Subject: coresight: tmc: Remove duplicate memset X-Git-Tag: v4.10-rc1~146^2~25 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=675a502305c49c6778a53ac47061783defc386ad;p=karo-tx-linux.git coresight: tmc: Remove duplicate memset 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 Signed-off-by: Greg Kroah-Hartman --- 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: