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 61FC2ECAAD1 for ; Wed, 31 Aug 2022 16:59:46 +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=sGHbZIgCSBa33CdRZPSfYiQUYX/8xCfZj0RpnjbGCoM=; b=05gsqcwB7u/pkf UtblMmu3Wk4fH9J3g1c0P5lXkfI9pqnLdxXHpjPXv1+PI35rGYhc/gfSKpe1wmdxLtjBOafSHyKWi qF+wZNDBlZEEtfYZeXJOjTTrbHF2OcP7XjkB7ztugCLui9fCIWtwUFtBWpqBFFV8hf5eT7SQNGl9y mlj8MOTkF23l8wgCKYDFHJFv6epnv/MAEb7N+yumLC2AKXMeRwkQuLDKSdk8KTOVZHWfaARqupyLk UppIrPVsfRxWLQhUjX6WG/vwmqlXWjb+CZOtL/vsQ1P4zuYvuhJOg17HXIzSCAnEXsOjh0oxjhl09 LsKwJ//18Kb3NBfpRjtQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oTR2t-007HdB-R0; Wed, 31 Aug 2022 16:58:31 +0000 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oTR2q-007Hc4-Vy for linux-arm-kernel@lists.infradead.org; Wed, 31 Aug 2022 16:58:30 +0000 Received: by mail-pj1-x1033.google.com with SMTP id j9-20020a17090a3e0900b001fd9568b117so11933246pjc.3 for ; Wed, 31 Aug 2022 09:58:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc; bh=TupKKvR6dZz/3iGpRAyOcguuOG/Q6iuwOMieQ0bzyVU=; b=uSF2CEdt7dbN626BZ+yeyXPs6NUKow3AXH68ik8oWTc9KRrPdpTHY0tvt4iy05cXPo Gjf098D8/sguiFHNa5vvueI29pc24OwxK9+oZLZHGj40yyewW47G7GEUu1nZr1HJvsgR Vx7uhEjIqSLjUdpTvFnC/Y+8sbJZhb2biBPPm+R8vc8zAiIat69QzHj2M4lRPFWMu2nR 2sg+Ak8gYSSbZXxEAYFBHTmJuPxQJkTmcjUGgc5GVn5zxukfragxRf9Rw7gEhoSjyNm1 ghvd5lGDw882s+erKsZyb+B+U8/31I96vFEjc383BYQPVJMtPuZEcgPycgx6i39+8yvp 9Hjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc; bh=TupKKvR6dZz/3iGpRAyOcguuOG/Q6iuwOMieQ0bzyVU=; b=QoYcIq8kITfWJ3EtCrxNKVFyQbfp2NQbRimOWaQHXb32rVOw4FJ+3KSx2P/HC1rKpj 7FKvkFo9oTR9LfmoIbct3OQ2iP6KKz58KArKpdqc3izdAlVFencFMBrF5DRPu+7B4PCs nMU5+b3SDYoLzvIPiR3fwEmp+KVV3MfSnHd2xUvkjByM2OhZGfeQCKdBPONB7ZLA9Bz0 TKRYaDN9dlboSOTHWKG4DV7zGtJsK8LtNfLPmt6UJPc3gU34uByVW559xyRbU09S65yv 2cDbid56gxIW1e+2KPjV97FmovA6oAud5lUgxyEQql/hQH3L13xRiwCucLTh4317qa4j /rjw== X-Gm-Message-State: ACgBeo1EF6K1ieusn4s4iaHNX1QhoheMY4F6haddmTdXUCJFWJJzdlTz 8vVG/869h5bMnGeWra+Kd2JXSw== X-Google-Smtp-Source: AA6agR5FlvqIoK70Z7dfClOiW6h6rYHmf/RXsXy9uD7rsP6YWnHuqz4j0rhpNDTbM5Jw0ZJxIvHe9g== X-Received: by 2002:a17:902:d509:b0:16f:1e1:2067 with SMTP id b9-20020a170902d50900b0016f01e12067mr26137455plg.140.1661965107344; Wed, 31 Aug 2022 09:58:27 -0700 (PDT) Received: from p14s (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id p12-20020a635b0c000000b0042a713dd68csm3590306pgb.53.2022.08.31.09.58.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Aug 2022 09:58:26 -0700 (PDT) Date: Wed, 31 Aug 2022 10:58:23 -0600 From: Mathieu Poirier To: James Clark Cc: suzuki.poulose@arm.com, coresight@lists.linaro.org, mike.leach@linaro.org, leo.yan@linaro.org, linux-kernel@vger.kernel.org, german.gomez@arm.com, Alexander Shishkin , Maxime Coquelin , Alexandre Torgue , linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: Re: [PATCH v2 0/5] coresight: Reduce duplicated sysfs accessors Message-ID: <20220831165823.GB217472@p14s> References: <20220830172614.340962-1-james.clark@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220830172614.340962-1-james.clark@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220831_095829_062630_F219286A X-CRM114-Status: GOOD ( 22.48 ) 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 I have applied this set. Thanks, Mathieu On Tue, Aug 30, 2022 at 06:26:08PM +0100, James Clark wrote: > Changes since v1: > > * Keep existing signed offset value types until the very last commit > and then remove them all at once > > * Also split out usages of read_pair() and read32() into separate > functions in the last commit > > * Whitespace fixes > > * Replaced any touched scnprintf() with sysfs_emit() > > ====== > > The intent of this change is to reduce the large number identical of > functions created by macros for sysfs accessors. It's possible to re-use > the same function but pass in the register to access as an argument. > This reduces the size of the coresight modules folder by 244KB. > > The first two patches are refactors to simplify and remove some dead > code, and the second two are the changes to use a shared function. > > Testing > ======= > > No changes in any of the outputs: > > cat /sys/bus/coresight/devices/*/mgmt/* > before.txt > cat /sys/bus/coresight/devices/*/mgmt/* > after.txt > diff before.txt after.txt > > With the following modules loaded: > > ls /sys/bus/coresight/devices/ > etm0 etm2 funnel0 funnel2 replicator0 tmc_etf0 tmc_etf2 tpiu0 > etm1 etm3 funnel1 funnel3 stm0 tmc_etf1 tmc_etr0 > > > James Clark (5): > coresight: Remove unused function parameter > coresight: Simplify sysfs accessors by using csdev_access abstraction > coresight: Re-use same function for similar sysfs register accessors > coresight: cti-sysfs: Re-use same functions for similar sysfs register > accessors > coresight: Make new csdev_access offsets unsigned > > drivers/hwtracing/coresight/coresight-catu.c | 27 +-- > drivers/hwtracing/coresight/coresight-catu.h | 8 +- > drivers/hwtracing/coresight/coresight-core.c | 28 +++ > .../hwtracing/coresight/coresight-cti-sysfs.c | 213 +++++++----------- > drivers/hwtracing/coresight/coresight-etb10.c | 28 +-- > .../coresight/coresight-etm3x-sysfs.c | 34 +-- > drivers/hwtracing/coresight/coresight-priv.h | 74 +++--- > .../coresight/coresight-replicator.c | 10 +- > drivers/hwtracing/coresight/coresight-stm.c | 40 +--- > .../hwtracing/coresight/coresight-tmc-core.c | 48 ++-- > drivers/hwtracing/coresight/coresight-tmc.h | 4 +- > include/linux/coresight.h | 23 ++ > 12 files changed, 227 insertions(+), 310 deletions(-) > > -- > 2.28.0 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel