From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3360B385500 for ; Mon, 2 Mar 2026 09:08:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772442519; cv=none; b=lo0VLlnQukMjUA2kmfBp2geOjDryUdFQs+iphoaIYzS4a0dR8CxqeZxl8U6NmGtbhMBK3VCwVboaFrBIe/fRHWeRBV2ZGOkEjy/420SFaOlBjx5XVzNCY4C+sUNv8wTgp+yjJcITX81cwMMgyz6S0GgU8daxK/f+zDnDoPEruS0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772442519; c=relaxed/simple; bh=vC1j4RzAJ2hYhiH5NZ5smrDNcoBbD5laPcO+lt6MDFg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CcYrj9bxZ519saMMfVyeNnrdmvbmfocKO3g/aqqpWIypgjwUZUfL6I+TzH+i9rxxtVC1XRaNMnGfP3/93j0IxlrTy2PGxCnOjvZRYBcBqwnY51562XlNJ+h1DPlDXNqhqkA77LdgWkrYDiw7QUB08QJDnloyY6M7a4txgk78qgw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5720C14BF; Mon, 2 Mar 2026 01:08:31 -0800 (PST) Received: from localhost (e132581.arm.com [10.1.196.87]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3F08E3F73B; Mon, 2 Mar 2026 01:08:37 -0800 (PST) Date: Mon, 2 Mar 2026 09:08:35 +0000 From: Leo Yan To: Elsanti Cc: suzuki.poulose@arm.com, mike.leach@linaro.org, james.clark@linaro.org, alexander.shishkin@linux.intel.com, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drivers/hwtracing/coresight: remove unneeded variable in tmc_crashdata_release() Message-ID: <20260302090835.GD1098637@e132581.arm.com> References: <20260228222344.288639-1-santiagojoseleal27@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260228222344.288639-1-santiagojoseleal27@gmail.com> On Sat, Feb 28, 2026 at 06:23:44PM -0400, Elsanti wrote: > The variable 'ret' is initialized to 0, never modified, and returned > directly. Remove it and return 0 explicitly. > > Signed-off-by: Elsanti Reviewed-by: Leo Yan > --- > 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 > >