From: Andrew Murray Date: Thu, 29 Aug 2019 20:28:34 +0000 (-0600) Subject: coresight: etm4x: Remove superfluous setting of os_unlock X-Git-Tag: v5.4-rc1~133^2~37 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6d7651015c16e1ee3576edbb5e88ba24f0f1fe7a;p=platform%2Fkernel%2Flinux-rpi.git coresight: etm4x: Remove superfluous setting of os_unlock In addition to unlocking the OS lock, etm4_os_unlock will also set the os_unlock flag. Therefore let's avoid unnecessarily setting os_unlock flag outside of this function. Signed-off-by: Andrew Murray Reviewed-by: Suzuki K Poulose [Fixed capital letter for "remove" in the title] Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20190829202842.580-10-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c index 28bcc0e..7ad1565 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.c +++ b/drivers/hwtracing/coresight/coresight-etm4x.c @@ -1047,10 +1047,8 @@ static int etm4_starting_cpu(unsigned int cpu) return 0; spin_lock(&etmdrvdata[cpu]->spinlock); - if (!etmdrvdata[cpu]->os_unlock) { + if (!etmdrvdata[cpu]->os_unlock) etm4_os_unlock(etmdrvdata[cpu]); - etmdrvdata[cpu]->os_unlock = true; - } if (local_read(&etmdrvdata[cpu]->mode)) etm4_enable_hw(etmdrvdata[cpu]);