public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 08/12] coresight tmc: Handle configuration types properly
Date: Wed, 14 Jun 2017 11:59:16 -0600	[thread overview]
Message-ID: <20170614175916.GD22030@xps15> (raw)
In-Reply-To: <1497278211-5001-9-git-send-email-suzuki.poulose@arm.com>

On Mon, Jun 12, 2017 at 03:36:47PM +0100, Suzuki K Poulose wrote:
> Coresight SoC 600 defines a new configuration for TMC, Embedded Trace
> Streamer (ETS), indicated by 0x3 in MODE:CONFIG_TYPE. Make sure
> the driver handles the new type properly.

>From what I see below this patch only improves readability by moving the if/else
compound to a case statement - there is no trace of the new ETS block.
Readability enhancement are good but the changelog must match the code.
 
> 
> Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
> ---
>  drivers/hwtracing/coresight/coresight-tmc.c | 14 +++++++++++---
>  1 file changed, 11 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/hwtracing/coresight/coresight-tmc.c b/drivers/hwtracing/coresight/coresight-tmc.c
> index fd5a2e0..7152656 100644
> --- a/drivers/hwtracing/coresight/coresight-tmc.c
> +++ b/drivers/hwtracing/coresight/coresight-tmc.c
> @@ -358,11 +358,13 @@ static int tmc_probe(struct amba_device *adev, const struct amba_id *id)
>  	desc.dev = dev;
>  	desc.groups = coresight_tmc_groups;
>  
> -	if (drvdata->config_type == TMC_CONFIG_TYPE_ETB) {
> +	switch (drvdata->config_type) {
> +	case TMC_CONFIG_TYPE_ETB:
>  		desc.type = CORESIGHT_DEV_TYPE_SINK;
>  		desc.subtype.sink_subtype = CORESIGHT_DEV_SUBTYPE_SINK_BUFFER;
>  		desc.ops = &tmc_etb_cs_ops;
> -	} else if (drvdata->config_type == TMC_CONFIG_TYPE_ETR) {
> +		break;
> +	case TMC_CONFIG_TYPE_ETR:
>  		desc.type = CORESIGHT_DEV_TYPE_SINK;
>  		desc.subtype.sink_subtype = CORESIGHT_DEV_SUBTYPE_SINK_BUFFER;
>  		desc.ops = &tmc_etr_cs_ops;
> @@ -373,10 +375,16 @@ static int tmc_probe(struct amba_device *adev, const struct amba_id *id)
>  		ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(40));
>  		if (ret)
>  			goto out;
> -	} else {
> +		break;
> +	case TMC_CONFIG_TYPE_ETF:
>  		desc.type = CORESIGHT_DEV_TYPE_LINKSINK;
>  		desc.subtype.link_subtype = CORESIGHT_DEV_SUBTYPE_LINK_FIFO;
>  		desc.ops = &tmc_etf_cs_ops;
> +		break;
> +	default:
> +		pr_err("%s: Unsupported TMC config\n", pdata->name);
> +		ret = -EINVAL;
> +		goto out;
>  	}
>  
>  	drvdata->csdev = coresight_register(&desc);
> -- 
> 2.7.4
> 

  reply	other threads:[~2017-06-14 17:59 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-12 14:36 [PATCH 00/12] coresight: Support for ARM Coresight SoC-600 Suzuki K Poulose
2017-06-12 14:36 ` [PATCH 01/12] coresight replicator: Cleanup programmable replicator naming Suzuki K Poulose
2017-06-13 16:55   ` Mathieu Poirier
2017-06-13 17:56     ` Suzuki K Poulose
2017-06-18 14:04     ` Rob Herring
2017-06-20 16:44       ` Mathieu Poirier
2017-06-22  3:21         ` Rob Herring
2017-06-12 14:36 ` [PATCH 02/12] arm64: dts: juno: Use the new coresight replicator string Suzuki K Poulose
2017-06-12 14:36 ` [PATCH 03/12] coresight: Extend the PIDR mask to cover relevant bits in PIDR2 Suzuki K Poulose
2017-06-13 17:53   ` Mathieu Poirier
2017-06-13 17:55     ` Suzuki K Poulose
2017-06-13 19:06       ` Mathieu Poirier
2017-06-12 14:36 ` [PATCH 04/12] coresight: Add support for reading 64bit registers Suzuki K Poulose
2017-06-13 17:45   ` Mathieu Poirier
2017-06-13 17:57     ` Suzuki K Poulose
2017-06-12 14:36 ` [PATCH 05/12] coresight tmc: Add helpers for accessing " Suzuki K Poulose
2017-06-14 17:49   ` Mathieu Poirier
2017-06-15 10:13     ` Suzuki K Poulose
2017-06-15 13:29       ` Mike Leach
2017-06-15 14:24       ` Mathieu Poirier
2017-06-12 14:36 ` [PATCH 06/12] coresight tmc: Expose DBA and AXICTL Suzuki K Poulose
2017-06-14 17:50   ` Mathieu Poirier
2017-06-15 10:19     ` Suzuki K Poulose
2017-06-12 14:36 ` [PATCH 07/12] coresight replicator: Expose replicator management registers Suzuki K Poulose
2017-06-14 17:54   ` Mathieu Poirier
2017-06-15 10:23     ` Suzuki K Poulose
2017-06-12 14:36 ` [PATCH 08/12] coresight tmc: Handle configuration types properly Suzuki K Poulose
2017-06-14 17:59   ` Mathieu Poirier [this message]
2017-06-15 10:25     ` Suzuki K Poulose
2017-06-15 14:33       ` Mathieu Poirier
2017-06-12 14:36 ` [PATCH 09/12] coresight tmc: Add capability information Suzuki K Poulose
2017-06-14 18:22   ` Mathieu Poirier
2017-06-15 10:30     ` Suzuki K Poulose
2017-06-15 14:37       ` Mathieu Poirier
2017-06-12 14:36 ` [PATCH 10/12] coresight tmc: Support for save-restore in ETR Suzuki K Poulose
2017-06-12 14:36 ` [PATCH 11/12] coresight tmc: Add support for Coresight SoC 600 TMC Suzuki K Poulose
2017-06-14 18:25   ` Mathieu Poirier
2017-06-15 10:31     ` Suzuki K Poulose
2017-06-12 14:36 ` [PATCH 12/12] coresight: Add support for Coresight SoC 600 components Suzuki K Poulose

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170614175916.GD22030@xps15 \
    --to=mathieu.poirier@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=suzuki.poulose@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox