mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 08:44:21 +08:00
coresight: stm: Remove set but not used variable 'res_size'
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 237483aa5c
("coresight: stm:
adding driver for CoreSight STM component")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Tested-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
a0f890aba2
commit
a7325a6ca4
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user