Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4685157imu; Sat, 1 Dec 2018 00:32:21 -0800 (PST) X-Google-Smtp-Source: AFSGD/V9/GO7tTBKStLJ1Srhcdat5ZL96a9feSPRywsmKFa+eXEEPf3B4QS4xK5g7+ZeT+fgiF16 X-Received: by 2002:a63:2e88:: with SMTP id u130mr7460302pgu.9.1543653141262; Sat, 01 Dec 2018 00:32:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543653141; cv=none; d=google.com; s=arc-20160816; b=uM4aVN6LVb3w0rHShIHBIzMnOh1A1cAeTrEE8ABE+mZrQ18M4+yB7e7s1vmfw+ID40 bxnR/2cdMKsVl2Dy/I4AE6FBHYhSDNeS12GQi9MHil9lvE6Kh7tM+wqZNrJxgZk2+cDz JhCBve9fKmcy6rYChjH02zo/CsuZI2/zBIkZi/h8qXvDDYbxjTCyQfuDJxDveWs4ewBg QL2vkzBloGfCXbbLcpWDHzPMdQUSXzzUdqdEgsGtv3jMpXrRVAbmCiQTrh7w6F9mkKWY +kgZs7/87BLyUZl9GLQa3EuOSTq3Jh/CELm21cBFGHJlDZfdKCHKGmb3r3haeSKmhRZZ QwZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from; bh=WWUXMdaQRC1p3kQ82J6GZkAOU2nRx7vFAavErTG5lXk=; b=CU4qSwFf8xqF2YcaKfu2Y8SH9UIJ4vAyou1swvl3Xspa/lQMMjzpjCvIRFkrDpjcvs 7KeUhrD5evUam4Ip+7aeUlt5T6RofL0MwY94WoVFNx0p/rIczcbUUCjjewKP8ApZb2xc kJd5WYTjH5xG4FwivYm2C7eMw80qteTWZo47dS33odcwAYHx26j5CB9FRZ3eAtJCBh2B /DklnXGtqd+8IKbQOXlHUpzE7S9vFDvakpKyD0ZX9f+Nwj64wE3vJGYp063H/pO+lOE1 ltLwTuisgKEpu84f5OWF5USLFnvp/vlsMbiqNzp95yRBHMleneQs5OI83rV4yhAXerTW kovA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b131si6818774pga.51.2018.12.01.00.32.04; Sat, 01 Dec 2018 00:32:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726279AbeLATnY (ORCPT + 99 others); Sat, 1 Dec 2018 14:43:24 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:15622 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726124AbeLATnY (ORCPT ); Sat, 1 Dec 2018 14:43:24 -0500 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 429468E462846; Sat, 1 Dec 2018 16:31:21 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.408.0; Sat, 1 Dec 2018 16:31:14 +0800 From: YueHaibing To: Mathieu Poirier , Suzuki K Poulose , Alexander Shishkin , Maxime Coquelin , Alexandre Torgue CC: YueHaibing , , , , Subject: [PATCH -next] coresight: stm: remove set but not used variable 'res_size' Date: Sat, 1 Dec 2018 08:39:45 +0000 Message-ID: <1543653585-108277-1-git-send-email-yuehaibing@huawei.com> X-Mailer: git-send-email 1.8.3.1 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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);