From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DDC81C433EF for ; Thu, 21 Apr 2022 16:43:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Q7RaW8ew8NcBNXrV91XH9XqMumb39tNDdKCXu833pBs=; b=KCcK+L5rq/UAP6 lVz0CHC27TVFEkEXqZR0DUOzEwrLUJwZdhunzDO5M4rQ3ZuztIa4NfMYqA6exAhUiCaxwKhAm61G8 YIs/0XcDPatwi0TvB56E7hesW2VJxp5Ud4zLqG5b0+4WUovgTFExlf2Kf6njmIFlB5ssomeFu9Nk4 RkVFRdjxtejUrrUudXIxvitLuMYg5mSAEfTD3+/XhDJLHy9Xbg85s1EnUsaEKWJ1utlcq3PNz/eHY xrSpBU6AtkfpQsq+f8duDQUqolj3Q+7oCqRmn9U14yFXmcq3zFnVe8YC+2HvEJYoLH4ZteVy5bsIQ CX03Tuo9bQMNjakrHemQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhZsv-00EHXF-9y; Thu, 21 Apr 2022 16:42:25 +0000 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhZss-00EHWe-Lf for linux-arm-kernel@lists.infradead.org; Thu, 21 Apr 2022 16:42:24 +0000 Received: by mail-pj1-x102c.google.com with SMTP id 2so5469763pjw.2 for ; Thu, 21 Apr 2022 09:42:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=qbXJR1djQgxa6TrlOtwgsjSJ8tDtC1+6qifGCseQujY=; b=p/qcBQ024iPBDy86b29SfnQ6QDHnFxMHbW90KQv5gXjXBOH9/QUu2PFZNzPNVhufIj 61mRVy4hfTcqTikxY4XMY+pjlkAryLHlo2lc7xq9kncDQygFZggRa/94EyYICbA91mN8 EXJVIIvyD3ZjTqKJetM0Gl4snDpuGBqmvOQDxndIj7iU96hY3ytHrPkzk68fAUiARHs2 lbW0Ep7LD7+vcg6flzZKG+khPSTjsbr5cPs1Q02D40m5643W0jeRGBKl/trmBwZfKuBe vdn1pmW+RwCYQHF6nEZ3DrYw5YAPOrR2/z6SOSDz/+HsXoj5hYhelAZ6jnCbbGiymW2J 39UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=qbXJR1djQgxa6TrlOtwgsjSJ8tDtC1+6qifGCseQujY=; b=S6PPxKU1cAr7POrrGUjGcpWkKc+4nSkdGT/eN1oweq1NRF8VNStDF118UvfEVDRssO BC5aQ0QqFZfInkZ1Vzrn+5+Xnh52tm4/T3NlLmcSy9PozGTU5YM2Y8VJ9ed8WW190dss F57oUsX2vY4zawm/2MaKVF/rN7O63Prucecla1VdKI/wSrkB0HzfoXZGPUdEpBQuk50B fZLgsX1NuazxIcGH25lNDyQiWAnt+4+T+g+mDKJ4BHCoSN2QewTlbpVEEgZKhActaMyz I/qM4ABLzC6npdFfz0ymzJ4HKy5Pa1fXfavU7oyjy07ygPU/t9X/EO5bHXboM9BbfTMb hRyA== X-Gm-Message-State: AOAM530sMoOG2CuMamsubgmlwJVqbUf2s+Isw1sHbKlX4XSdmwHvmhH6 34B4Aggi3BQsST+LhASi7PSW1g== X-Google-Smtp-Source: ABdhPJw9Xvi5hFFoEgJBfd/Sp7l2Sz62ZvlWYSyCVwqgD7TERHSH/X8WTURN9/JGHznOjRwiZWH//A== X-Received: by 2002:a17:902:bc8b:b0:158:ac00:cca0 with SMTP id bb11-20020a170902bc8b00b00158ac00cca0mr407519plb.102.1650559340291; Thu, 21 Apr 2022 09:42:20 -0700 (PDT) Received: from p14s (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id q10-20020a056a00088a00b004f7ceff389esm26691762pfj.152.2022.04.21.09.42.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Apr 2022 09:42:19 -0700 (PDT) Date: Thu, 21 Apr 2022 10:42:17 -0600 From: Mathieu Poirier To: Shile Zhang Cc: Suzuki K Poulose , Alexander Shishkin , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] coresight: etm4x: return 0 instead of using local ret variable Message-ID: <20220421164217.GB1596562@p14s> References: <20220420052831.78566-1-shile.zhang@linux.alibaba.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220420052831.78566-1-shile.zhang@linux.alibaba.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220421_094222_744462_62CCC9C8 X-CRM114-Status: GOOD ( 26.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Shile, On Wed, Apr 20, 2022 at 01:28:31PM +0800, Shile Zhang wrote: > The etm4_remove function (now it's rename to etm4_remove_dev) always > return 0, and it has been changed to void in commit 4fd269e74f2f > ("amba: Make the remove callback return void"). But its weird that the > changes is gone in mainline. which is remained in 5.10.y branch. Commit 4fd269e74f2f is not valid upstream. Changes that don't have a critical impact on user experience or fix a bug aren't backported to longterm kernels. > > Just backport the changes of etm4_remove_dev and return 0 directly in it's > caller function etm4_remove_platform_dev. I'm not sure why the work "backport" is used here since this patch is destine for mainline. > > Signed-off-by: Shile Zhang > --- > drivers/hwtracing/coresight/coresight-etm4x-core.c | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) > > diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c > index 7f416a12000e..141f8209a152 100644 > --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c > +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c > @@ -2104,7 +2104,7 @@ static void clear_etmdrvdata(void *info) > etmdrvdata[cpu] = NULL; > } > > -static int __exit etm4_remove_dev(struct etmv4_drvdata *drvdata) > +static void __exit etm4_remove_dev(struct etmv4_drvdata *drvdata) > { > etm_perf_symlink(drvdata->csdev, false); > /* > @@ -2125,8 +2125,6 @@ static int __exit etm4_remove_dev(struct etmv4_drvdata *drvdata) > > cscfg_unregister_csdev(drvdata->csdev); > coresight_unregister(drvdata->csdev); > - > - return 0; > } > > static void __exit etm4_remove_amba(struct amba_device *adev) > @@ -2139,13 +2137,14 @@ static void __exit etm4_remove_amba(struct amba_device *adev) > > static int __exit etm4_remove_platform_dev(struct platform_device *pdev) > { > - int ret = 0; > struct etmv4_drvdata *drvdata = dev_get_drvdata(&pdev->dev); > > if (drvdata) > - ret = etm4_remove_dev(drvdata); > + etm4_remove_dev(drvdata); > + > pm_runtime_disable(&pdev->dev); > - return ret; > + > + return 0; I'm fine with the code but the changelog needs to be re-worked. The only rational for this patch is that the return value for function etm4_remove_dev() is never used and as such being removed. Thanks, Mathieu > } > > static const struct amba_id etm4_ids[] = { > -- > 2.33.0.rc2 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel