All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] coresight: stm: remove set but not used variable 'res_size'
@ 2018-12-01  8:39 ` YueHaibing
  0 siblings, 0 replies; 9+ messages in thread
From: YueHaibing @ 2018-12-01  8:39 UTC (permalink / raw)
  To: Mathieu Poirier, Suzuki K Poulose, Alexander Shishkin,
	Maxime Coquelin, Alexandre Torgue
  Cc: YueHaibing, linux-arm-kernel, linux-stm32, linux-kernel, kernel-janitors

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/hwtracing/coresight/coresight-stm.c: In function 'stm_probe':
drivers/hwtracing/coresight/coresight-stm.c:796:9: warning:
 variable 'res_size' set but not used [-Wunused-but-set-variable]

It never used since introduction in commit
237483aa5cf4 ("coresight: stm: adding driver for CoreSight STM component")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/hwtracing/coresight/coresight-stm.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/hwtracing/coresight/coresight-stm.c b/drivers/hwtracing/coresight/coresight-stm.c
index ef339ff..f07825d 100644
--- a/drivers/hwtracing/coresight/coresight-stm.c
+++ b/drivers/hwtracing/coresight/coresight-stm.c
@@ -793,7 +793,7 @@ static int stm_probe(struct amba_device *adev, const struct amba_id *id)
 	struct stm_drvdata *drvdata;
 	struct resource *res = &adev->res;
 	struct resource ch_res;
-	size_t res_size, bitmap_size;
+	size_t bitmap_size;
 	struct coresight_desc desc = { 0 };
 	struct device_node *np = adev->dev.of_node;
 
@@ -833,15 +833,11 @@ static int stm_probe(struct amba_device *adev, const struct amba_id *id)
 
 	drvdata->write_bytes = stm_fundamental_data_size(drvdata);
 
-	if (boot_nr_channel) {
+	if (boot_nr_channel)
 		drvdata->numsp = boot_nr_channel;
-		res_size = min((resource_size_t)(boot_nr_channel *
-				  BYTES_PER_CHANNEL), resource_size(res));
-	} else {
+	else
 		drvdata->numsp = stm_num_stimulus_port(drvdata);
-		res_size = min((resource_size_t)(drvdata->numsp *
-				 BYTES_PER_CHANNEL), resource_size(res));
-	}
+
 	bitmap_size = BITS_TO_LONGS(drvdata->numsp) * sizeof(long);
 
 	guaranteed = devm_kzalloc(dev, bitmap_size, GFP_KERNEL);




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

* [PATCH -next] coresight: stm: remove set but not used variable 'res_size'
@ 2018-12-01  8:39 ` YueHaibing
  0 siblings, 0 replies; 9+ messages in thread
From: YueHaibing @ 2018-12-01  8:39 UTC (permalink / raw)
  To: Mathieu Poirier, Suzuki K Poulose, Alexander Shishkin,
	Maxime Coquelin, Alexandre Torgue
  Cc: kernel-janitors, YueHaibing, linux-stm32, linux-arm-kernel, linux-kernel

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/hwtracing/coresight/coresight-stm.c: In function 'stm_probe':
drivers/hwtracing/coresight/coresight-stm.c:796:9: warning:
 variable 'res_size' set but not used [-Wunused-but-set-variable]

It never used since introduction in commit
237483aa5cf4 ("coresight: stm: adding driver for CoreSight STM component")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/hwtracing/coresight/coresight-stm.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/hwtracing/coresight/coresight-stm.c b/drivers/hwtracing/coresight/coresight-stm.c
index ef339ff..f07825d 100644
--- a/drivers/hwtracing/coresight/coresight-stm.c
+++ b/drivers/hwtracing/coresight/coresight-stm.c
@@ -793,7 +793,7 @@ static int stm_probe(struct amba_device *adev, const struct amba_id *id)
 	struct stm_drvdata *drvdata;
 	struct resource *res = &adev->res;
 	struct resource ch_res;
-	size_t res_size, bitmap_size;
+	size_t bitmap_size;
 	struct coresight_desc desc = { 0 };
 	struct device_node *np = adev->dev.of_node;
 
@@ -833,15 +833,11 @@ static int stm_probe(struct amba_device *adev, const struct amba_id *id)
 
 	drvdata->write_bytes = stm_fundamental_data_size(drvdata);
 
-	if (boot_nr_channel) {
+	if (boot_nr_channel)
 		drvdata->numsp = boot_nr_channel;
-		res_size = min((resource_size_t)(boot_nr_channel *
-				  BYTES_PER_CHANNEL), resource_size(res));
-	} else {
+	else
 		drvdata->numsp = stm_num_stimulus_port(drvdata);
-		res_size = min((resource_size_t)(drvdata->numsp *
-				 BYTES_PER_CHANNEL), resource_size(res));
-	}
+
 	bitmap_size = BITS_TO_LONGS(drvdata->numsp) * sizeof(long);
 
 	guaranteed = devm_kzalloc(dev, bitmap_size, GFP_KERNEL);

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

* [PATCH -next] coresight: stm: remove set but not used variable 'res_size'
@ 2018-12-01  8:39 ` YueHaibing
  0 siblings, 0 replies; 9+ messages in thread
From: YueHaibing @ 2018-12-01  8:39 UTC (permalink / raw)
  To: Mathieu Poirier, Suzuki K Poulose, Alexander Shishkin,
	Maxime Coquelin, Alexandre Torgue
  Cc: kernel-janitors, YueHaibing, linux-stm32, linux-arm-kernel, linux-kernel

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/hwtracing/coresight/coresight-stm.c: In function 'stm_probe':
drivers/hwtracing/coresight/coresight-stm.c:796:9: warning:
 variable 'res_size' set but not used [-Wunused-but-set-variable]

It never used since introduction in commit
237483aa5cf4 ("coresight: stm: adding driver for CoreSight STM component")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/hwtracing/coresight/coresight-stm.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/hwtracing/coresight/coresight-stm.c b/drivers/hwtracing/coresight/coresight-stm.c
index ef339ff..f07825d 100644
--- a/drivers/hwtracing/coresight/coresight-stm.c
+++ b/drivers/hwtracing/coresight/coresight-stm.c
@@ -793,7 +793,7 @@ static int stm_probe(struct amba_device *adev, const struct amba_id *id)
 	struct stm_drvdata *drvdata;
 	struct resource *res = &adev->res;
 	struct resource ch_res;
-	size_t res_size, bitmap_size;
+	size_t bitmap_size;
 	struct coresight_desc desc = { 0 };
 	struct device_node *np = adev->dev.of_node;
 
@@ -833,15 +833,11 @@ static int stm_probe(struct amba_device *adev, const struct amba_id *id)
 
 	drvdata->write_bytes = stm_fundamental_data_size(drvdata);
 
-	if (boot_nr_channel) {
+	if (boot_nr_channel)
 		drvdata->numsp = boot_nr_channel;
-		res_size = min((resource_size_t)(boot_nr_channel *
-				  BYTES_PER_CHANNEL), resource_size(res));
-	} else {
+	else
 		drvdata->numsp = stm_num_stimulus_port(drvdata);
-		res_size = min((resource_size_t)(drvdata->numsp *
-				 BYTES_PER_CHANNEL), resource_size(res));
-	}
+
 	bitmap_size = BITS_TO_LONGS(drvdata->numsp) * sizeof(long);
 
 	guaranteed = devm_kzalloc(dev, bitmap_size, GFP_KERNEL);




_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH -next] coresight: stm: remove set but not used variable 'res_size'
  2018-12-01  8:39 ` YueHaibing
  (?)
@ 2018-12-05  0:39   ` leo.yan
  -1 siblings, 0 replies; 9+ messages in thread
From: leo.yan @ 2018-12-05  0:39 UTC (permalink / raw)
  To: YueHaibing
  Cc: Mathieu Poirier, Suzuki K Poulose, Alexander Shishkin,
	Maxime Coquelin, Alexandre Torgue, linux-arm-kernel, linux-stm32,
	linux-kernel, kernel-janitors

On Sat, Dec 01, 2018 at 08:39:45AM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/hwtracing/coresight/coresight-stm.c: In function 'stm_probe':
> drivers/hwtracing/coresight/coresight-stm.c:796:9: warning:
>  variable 'res_size' set but not used [-Wunused-but-set-variable]
> 
> It never used since introduction in commit
> 237483aa5cf4 ("coresight: stm: adding driver for CoreSight STM component")
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

FWIW, Tested-by: Leo Yan <leo.yan@linaro.org>

> ---
>  drivers/hwtracing/coresight/coresight-stm.c | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/hwtracing/coresight/coresight-stm.c b/drivers/hwtracing/coresight/coresight-stm.c
> index ef339ff..f07825d 100644
> --- a/drivers/hwtracing/coresight/coresight-stm.c
> +++ b/drivers/hwtracing/coresight/coresight-stm.c
> @@ -793,7 +793,7 @@ static int stm_probe(struct amba_device *adev, const struct amba_id *id)
>  	struct stm_drvdata *drvdata;
>  	struct resource *res = &adev->res;
>  	struct resource ch_res;
> -	size_t res_size, bitmap_size;
> +	size_t bitmap_size;
>  	struct coresight_desc desc = { 0 };
>  	struct device_node *np = adev->dev.of_node;
>  
> @@ -833,15 +833,11 @@ static int stm_probe(struct amba_device *adev, const struct amba_id *id)
>  
>  	drvdata->write_bytes = stm_fundamental_data_size(drvdata);
>  
> -	if (boot_nr_channel) {
> +	if (boot_nr_channel)
>  		drvdata->numsp = boot_nr_channel;
> -		res_size = min((resource_size_t)(boot_nr_channel *
> -				  BYTES_PER_CHANNEL), resource_size(res));
> -	} else {
> +	else
>  		drvdata->numsp = stm_num_stimulus_port(drvdata);
> -		res_size = min((resource_size_t)(drvdata->numsp *
> -				 BYTES_PER_CHANNEL), resource_size(res));
> -	}
> +
>  	bitmap_size = BITS_TO_LONGS(drvdata->numsp) * sizeof(long);
>  
>  	guaranteed = devm_kzalloc(dev, bitmap_size, GFP_KERNEL);
> 
> 
> 

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

* Re: [PATCH -next] coresight: stm: remove set but not used variable 'res_size'
@ 2018-12-05  0:39   ` leo.yan
  0 siblings, 0 replies; 9+ messages in thread
From: leo.yan @ 2018-12-05  0:39 UTC (permalink / raw)
  To: YueHaibing
  Cc: Alexandre Torgue, Mathieu Poirier, Suzuki K Poulose,
	Alexander Shishkin, kernel-janitors, linux-kernel,
	Maxime Coquelin, linux-stm32, linux-arm-kernel

On Sat, Dec 01, 2018 at 08:39:45AM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/hwtracing/coresight/coresight-stm.c: In function 'stm_probe':
> drivers/hwtracing/coresight/coresight-stm.c:796:9: warning:
>  variable 'res_size' set but not used [-Wunused-but-set-variable]
> 
> It never used since introduction in commit
> 237483aa5cf4 ("coresight: stm: adding driver for CoreSight STM component")
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

FWIW, Tested-by: Leo Yan <leo.yan@linaro.org>

> ---
>  drivers/hwtracing/coresight/coresight-stm.c | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/hwtracing/coresight/coresight-stm.c b/drivers/hwtracing/coresight/coresight-stm.c
> index ef339ff..f07825d 100644
> --- a/drivers/hwtracing/coresight/coresight-stm.c
> +++ b/drivers/hwtracing/coresight/coresight-stm.c
> @@ -793,7 +793,7 @@ static int stm_probe(struct amba_device *adev, const struct amba_id *id)
>  	struct stm_drvdata *drvdata;
>  	struct resource *res = &adev->res;
>  	struct resource ch_res;
> -	size_t res_size, bitmap_size;
> +	size_t bitmap_size;
>  	struct coresight_desc desc = { 0 };
>  	struct device_node *np = adev->dev.of_node;
>  
> @@ -833,15 +833,11 @@ static int stm_probe(struct amba_device *adev, const struct amba_id *id)
>  
>  	drvdata->write_bytes = stm_fundamental_data_size(drvdata);
>  
> -	if (boot_nr_channel) {
> +	if (boot_nr_channel)
>  		drvdata->numsp = boot_nr_channel;
> -		res_size = min((resource_size_t)(boot_nr_channel *
> -				  BYTES_PER_CHANNEL), resource_size(res));
> -	} else {
> +	else
>  		drvdata->numsp = stm_num_stimulus_port(drvdata);
> -		res_size = min((resource_size_t)(drvdata->numsp *
> -				 BYTES_PER_CHANNEL), resource_size(res));
> -	}
> +
>  	bitmap_size = BITS_TO_LONGS(drvdata->numsp) * sizeof(long);
>  
>  	guaranteed = devm_kzalloc(dev, bitmap_size, GFP_KERNEL);
> 
> 
> 

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

* Re: [PATCH -next] coresight: stm: remove set but not used variable 'res_size'
@ 2018-12-05  0:39   ` leo.yan
  0 siblings, 0 replies; 9+ messages in thread
From: leo.yan @ 2018-12-05  0:39 UTC (permalink / raw)
  To: YueHaibing
  Cc: Alexandre Torgue, Mathieu Poirier, Suzuki K Poulose,
	Alexander Shishkin, kernel-janitors, linux-kernel,
	Maxime Coquelin, linux-stm32, linux-arm-kernel

On Sat, Dec 01, 2018 at 08:39:45AM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/hwtracing/coresight/coresight-stm.c: In function 'stm_probe':
> drivers/hwtracing/coresight/coresight-stm.c:796:9: warning:
>  variable 'res_size' set but not used [-Wunused-but-set-variable]
> 
> It never used since introduction in commit
> 237483aa5cf4 ("coresight: stm: adding driver for CoreSight STM component")
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

FWIW, Tested-by: Leo Yan <leo.yan@linaro.org>

> ---
>  drivers/hwtracing/coresight/coresight-stm.c | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/hwtracing/coresight/coresight-stm.c b/drivers/hwtracing/coresight/coresight-stm.c
> index ef339ff..f07825d 100644
> --- a/drivers/hwtracing/coresight/coresight-stm.c
> +++ b/drivers/hwtracing/coresight/coresight-stm.c
> @@ -793,7 +793,7 @@ static int stm_probe(struct amba_device *adev, const struct amba_id *id)
>  	struct stm_drvdata *drvdata;
>  	struct resource *res = &adev->res;
>  	struct resource ch_res;
> -	size_t res_size, bitmap_size;
> +	size_t bitmap_size;
>  	struct coresight_desc desc = { 0 };
>  	struct device_node *np = adev->dev.of_node;
>  
> @@ -833,15 +833,11 @@ static int stm_probe(struct amba_device *adev, const struct amba_id *id)
>  
>  	drvdata->write_bytes = stm_fundamental_data_size(drvdata);
>  
> -	if (boot_nr_channel) {
> +	if (boot_nr_channel)
>  		drvdata->numsp = boot_nr_channel;
> -		res_size = min((resource_size_t)(boot_nr_channel *
> -				  BYTES_PER_CHANNEL), resource_size(res));
> -	} else {
> +	else
>  		drvdata->numsp = stm_num_stimulus_port(drvdata);
> -		res_size = min((resource_size_t)(drvdata->numsp *
> -				 BYTES_PER_CHANNEL), resource_size(res));
> -	}
> +
>  	bitmap_size = BITS_TO_LONGS(drvdata->numsp) * sizeof(long);
>  
>  	guaranteed = devm_kzalloc(dev, bitmap_size, GFP_KERNEL);
> 
> 
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH -next] coresight: stm: remove set but not used variable 'res_size'
  2018-12-01  8:39 ` YueHaibing
  (?)
@ 2018-12-05 17:24   ` Mathieu Poirier
  -1 siblings, 0 replies; 9+ messages in thread
From: Mathieu Poirier @ 2018-12-05 17:24 UTC (permalink / raw)
  To: yuehaibing
  Cc: Suzuki K. Poulose, Alexander Shishkin, Maxime Coquelin,
	Alexandre TORGUE, linux-arm-kernel, linux-stm32,
	Linux Kernel Mailing List, kernel-janitors

On Sat, 1 Dec 2018 at 01:31, YueHaibing <yuehaibing@huawei.com> wrote:
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/hwtracing/coresight/coresight-stm.c: In function 'stm_probe':
> drivers/hwtracing/coresight/coresight-stm.c:796:9: warning:
>  variable 'res_size' set but not used [-Wunused-but-set-variable]
>
> It never used since introduction in commit
> 237483aa5cf4 ("coresight: stm: adding driver for CoreSight STM component")
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Applied - thanks,
Mathieu

> ---
>  drivers/hwtracing/coresight/coresight-stm.c | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-stm.c b/drivers/hwtracing/coresight/coresight-stm.c
> index ef339ff..f07825d 100644
> --- a/drivers/hwtracing/coresight/coresight-stm.c
> +++ b/drivers/hwtracing/coresight/coresight-stm.c
> @@ -793,7 +793,7 @@ static int stm_probe(struct amba_device *adev, const struct amba_id *id)
>         struct stm_drvdata *drvdata;
>         struct resource *res = &adev->res;
>         struct resource ch_res;
> -       size_t res_size, bitmap_size;
> +       size_t bitmap_size;
>         struct coresight_desc desc = { 0 };
>         struct device_node *np = adev->dev.of_node;
>
> @@ -833,15 +833,11 @@ static int stm_probe(struct amba_device *adev, const struct amba_id *id)
>
>         drvdata->write_bytes = stm_fundamental_data_size(drvdata);
>
> -       if (boot_nr_channel) {
> +       if (boot_nr_channel)
>                 drvdata->numsp = boot_nr_channel;
> -               res_size = min((resource_size_t)(boot_nr_channel *
> -                                 BYTES_PER_CHANNEL), resource_size(res));
> -       } else {
> +       else
>                 drvdata->numsp = stm_num_stimulus_port(drvdata);
> -               res_size = min((resource_size_t)(drvdata->numsp *
> -                                BYTES_PER_CHANNEL), resource_size(res));
> -       }
> +
>         bitmap_size = BITS_TO_LONGS(drvdata->numsp) * sizeof(long);
>
>         guaranteed = devm_kzalloc(dev, bitmap_size, GFP_KERNEL);
>
>
>

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

* Re: [PATCH -next] coresight: stm: remove set but not used variable 'res_size'
@ 2018-12-05 17:24   ` Mathieu Poirier
  0 siblings, 0 replies; 9+ messages in thread
From: Mathieu Poirier @ 2018-12-05 17:24 UTC (permalink / raw)
  To: yuehaibing
  Cc: Alexandre TORGUE, Suzuki K. Poulose, Alexander Shishkin,
	kernel-janitors, Linux Kernel Mailing List, Maxime Coquelin,
	linux-stm32, linux-arm-kernel

On Sat, 1 Dec 2018 at 01:31, YueHaibing <yuehaibing@huawei.com> wrote:
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/hwtracing/coresight/coresight-stm.c: In function 'stm_probe':
> drivers/hwtracing/coresight/coresight-stm.c:796:9: warning:
>  variable 'res_size' set but not used [-Wunused-but-set-variable]
>
> It never used since introduction in commit
> 237483aa5cf4 ("coresight: stm: adding driver for CoreSight STM component")
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Applied - thanks,
Mathieu

> ---
>  drivers/hwtracing/coresight/coresight-stm.c | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-stm.c b/drivers/hwtracing/coresight/coresight-stm.c
> index ef339ff..f07825d 100644
> --- a/drivers/hwtracing/coresight/coresight-stm.c
> +++ b/drivers/hwtracing/coresight/coresight-stm.c
> @@ -793,7 +793,7 @@ static int stm_probe(struct amba_device *adev, const struct amba_id *id)
>         struct stm_drvdata *drvdata;
>         struct resource *res = &adev->res;
>         struct resource ch_res;
> -       size_t res_size, bitmap_size;
> +       size_t bitmap_size;
>         struct coresight_desc desc = { 0 };
>         struct device_node *np = adev->dev.of_node;
>
> @@ -833,15 +833,11 @@ static int stm_probe(struct amba_device *adev, const struct amba_id *id)
>
>         drvdata->write_bytes = stm_fundamental_data_size(drvdata);
>
> -       if (boot_nr_channel) {
> +       if (boot_nr_channel)
>                 drvdata->numsp = boot_nr_channel;
> -               res_size = min((resource_size_t)(boot_nr_channel *
> -                                 BYTES_PER_CHANNEL), resource_size(res));
> -       } else {
> +       else
>                 drvdata->numsp = stm_num_stimulus_port(drvdata);
> -               res_size = min((resource_size_t)(drvdata->numsp *
> -                                BYTES_PER_CHANNEL), resource_size(res));
> -       }
> +
>         bitmap_size = BITS_TO_LONGS(drvdata->numsp) * sizeof(long);
>
>         guaranteed = devm_kzalloc(dev, bitmap_size, GFP_KERNEL);
>
>
>

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

* Re: [PATCH -next] coresight: stm: remove set but not used variable 'res_size'
@ 2018-12-05 17:24   ` Mathieu Poirier
  0 siblings, 0 replies; 9+ messages in thread
From: Mathieu Poirier @ 2018-12-05 17:24 UTC (permalink / raw)
  To: yuehaibing
  Cc: Alexandre TORGUE, Suzuki K. Poulose, Alexander Shishkin,
	kernel-janitors, Linux Kernel Mailing List, Maxime Coquelin,
	linux-stm32, linux-arm-kernel

On Sat, 1 Dec 2018 at 01:31, YueHaibing <yuehaibing@huawei.com> wrote:
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/hwtracing/coresight/coresight-stm.c: In function 'stm_probe':
> drivers/hwtracing/coresight/coresight-stm.c:796:9: warning:
>  variable 'res_size' set but not used [-Wunused-but-set-variable]
>
> It never used since introduction in commit
> 237483aa5cf4 ("coresight: stm: adding driver for CoreSight STM component")
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Applied - thanks,
Mathieu

> ---
>  drivers/hwtracing/coresight/coresight-stm.c | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-stm.c b/drivers/hwtracing/coresight/coresight-stm.c
> index ef339ff..f07825d 100644
> --- a/drivers/hwtracing/coresight/coresight-stm.c
> +++ b/drivers/hwtracing/coresight/coresight-stm.c
> @@ -793,7 +793,7 @@ static int stm_probe(struct amba_device *adev, const struct amba_id *id)
>         struct stm_drvdata *drvdata;
>         struct resource *res = &adev->res;
>         struct resource ch_res;
> -       size_t res_size, bitmap_size;
> +       size_t bitmap_size;
>         struct coresight_desc desc = { 0 };
>         struct device_node *np = adev->dev.of_node;
>
> @@ -833,15 +833,11 @@ static int stm_probe(struct amba_device *adev, const struct amba_id *id)
>
>         drvdata->write_bytes = stm_fundamental_data_size(drvdata);
>
> -       if (boot_nr_channel) {
> +       if (boot_nr_channel)
>                 drvdata->numsp = boot_nr_channel;
> -               res_size = min((resource_size_t)(boot_nr_channel *
> -                                 BYTES_PER_CHANNEL), resource_size(res));
> -       } else {
> +       else
>                 drvdata->numsp = stm_num_stimulus_port(drvdata);
> -               res_size = min((resource_size_t)(drvdata->numsp *
> -                                BYTES_PER_CHANNEL), resource_size(res));
> -       }
> +
>         bitmap_size = BITS_TO_LONGS(drvdata->numsp) * sizeof(long);
>
>         guaranteed = devm_kzalloc(dev, bitmap_size, GFP_KERNEL);
>
>
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2018-12-05 17:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-01  8:39 [PATCH -next] coresight: stm: remove set but not used variable 'res_size' YueHaibing
2018-12-01  8:39 ` YueHaibing
2018-12-01  8:39 ` YueHaibing
2018-12-05  0:39 ` leo.yan
2018-12-05  0:39   ` leo.yan
2018-12-05  0:39   ` leo.yan
2018-12-05 17:24 ` Mathieu Poirier
2018-12-05 17:24   ` Mathieu Poirier
2018-12-05 17:24   ` Mathieu Poirier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.