public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] drivers/hwtracing/coresight: remove unneeded variable in tmc_crashdata_release()
@ 2026-02-28 22:23 Elsanti
  2026-03-02  9:08 ` Leo Yan
  2026-03-02  9:24 ` Suzuki K Poulose
  0 siblings, 2 replies; 4+ messages in thread
From: Elsanti @ 2026-02-28 22:23 UTC (permalink / raw)
  To: suzuki.poulose
  Cc: mike.leach, james.clark, alexander.shishkin, coresight,
	linux-arm-kernel, linux-kernel, Elsanti

The variable 'ret' is initialized to 0, never modified, and returned
directly. Remove it and return 0 explicitly.

Signed-off-by: Elsanti <santiagojoseleal27@gmail.com>
---
 drivers/hwtracing/coresight/coresight-tmc-core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/hwtracing/coresight/coresight-tmc-core.c b/drivers/hwtracing/coresight/coresight-tmc-core.c
index 36599c431be6..e29012c451c5 100644
--- a/drivers/hwtracing/coresight/coresight-tmc-core.c
+++ b/drivers/hwtracing/coresight/coresight-tmc-core.c
@@ -401,7 +401,6 @@ static ssize_t tmc_crashdata_read(struct file *file, char __user *data,
 
 static int tmc_crashdata_release(struct inode *inode, struct file *file)
 {
-	int ret = 0;
 	unsigned long flags;
 	struct tmc_resrv_buf *rbuf;
 	struct tmc_drvdata *drvdata = container_of(file->private_data,
@@ -414,7 +413,7 @@ static int tmc_crashdata_release(struct inode *inode, struct file *file)
 	raw_spin_unlock_irqrestore(&drvdata->spinlock, flags);
 
 	dev_dbg(&drvdata->csdev->dev, "%s: released\n", __func__);
-	return ret;
+	return 0;
 }
 
 static const struct file_operations tmc_crashdata_fops = {
-- 
2.53.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [PATCH] drivers/hwtracing/coresight: remove unneeded variable in tmc_crashdata_release()
@ 2026-02-27 23:33 Elsanti
  0 siblings, 0 replies; 4+ messages in thread
From: Elsanti @ 2026-02-27 23:33 UTC (permalink / raw)
  To: suzuki.poulose
  Cc: mike.leach, james.clark, alexander.shishkin, coresight,
	linux-arm-kernel, linux-kernel, Elsanti

The variable 'ret' is initialized to 0, never modified, and returned
directly. Remove it and return 0 explicitly.

Signed-off-by: Elsanti <santiagojoseleal27@gmail.com>
---
 drivers/hwtracing/coresight/coresight-tmc-core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/hwtracing/coresight/coresight-tmc-core.c b/drivers/hwtracing/coresight/coresight-tmc-core.c
index 36599c431be6..e29012c451c5 100644
--- a/drivers/hwtracing/coresight/coresight-tmc-core.c
+++ b/drivers/hwtracing/coresight/coresight-tmc-core.c
@@ -401,7 +401,6 @@ static ssize_t tmc_crashdata_read(struct file *file, char __user *data,
 
 static int tmc_crashdata_release(struct inode *inode, struct file *file)
 {
-	int ret = 0;
 	unsigned long flags;
 	struct tmc_resrv_buf *rbuf;
 	struct tmc_drvdata *drvdata = container_of(file->private_data,
@@ -414,7 +413,7 @@ static int tmc_crashdata_release(struct inode *inode, struct file *file)
 	raw_spin_unlock_irqrestore(&drvdata->spinlock, flags);
 
 	dev_dbg(&drvdata->csdev->dev, "%s: released\n", __func__);
-	return ret;
+	return 0;
 }
 
 static const struct file_operations tmc_crashdata_fops = {
-- 
2.53.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-03-02  9:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-28 22:23 [PATCH] drivers/hwtracing/coresight: remove unneeded variable in tmc_crashdata_release() Elsanti
2026-03-02  9:08 ` Leo Yan
2026-03-02  9:24 ` Suzuki K Poulose
  -- strict thread matches above, loose matches on Subject: below --
2026-02-27 23:33 Elsanti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox