Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp3928883ioo; Wed, 25 May 2022 10:50:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFGZ5ev6vTYmDmDSRYj+bm2Gpr3rUhUL4vPMnpy6xXiNlyaULOjeg2o3+8iP2ZEtl1bpny X-Received: by 2002:a17:902:6b83:b0:15d:1ea2:4f80 with SMTP id p3-20020a1709026b8300b0015d1ea24f80mr33153567plk.41.1653501036462; Wed, 25 May 2022 10:50:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653501036; cv=none; d=google.com; s=arc-20160816; b=lGU0tc69WUGSG2mSrhJ3XHJtT2WVV/RMs49AWIY56g8/q8xouhOS+J/sZj9E71S8bQ qbWIplxCTR0qQc0LeCqae7pChfU5GqWB378oxpx8oQ0U4eWHAR5HMP1pijKtVDmxPIJW O1GrhgHcpoQZ+GMGXdk2pW3ESUezt6Gj1ZPi8yFFIyAvvuUGoVfn588rX2dQEx9vSAHL zNxuWiuv1EWoUncbznGsDv/ixwBAcNr7SR0woaFU8H6/ibdJDZ63zUppBypNCUHg9M9n uK+OujKyY4MRo6uZCpYQydi7RubDz5jarfclAQ3O9V3WgOi+9/5B63H589jKPmmBkGP4 s1ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=4IgoemSf4P0Q+sZB949nWjsqW2Oj7zfMbdF3zDZvmb0=; b=QengJPydBBAjOLZuo9ZItc8RCajTfoxi6oymGa24p9SwuqimFKbFX+1TJ/7nLpC0XR ht4X+ENBgJh76VdYk4BFrWr5YOoz47gZrgw7cNDe/74ewsGqdcy/MLDsppRwUpmj0iJc Sj/cn86IBUb+RYW3ar5gxJdbUO8fe/6ztzaVnuuS4I8sKXd0YpJL9t0cwSbwC50gn+Ms Ahz/lHBVG6mv3EEyLautckgYlyRlXNHomUhwEox1NJQoR4B9OGifV973mnLzO6lWyo05 kW3FrbIVRU+ruN/SxpSgAjMRynBFFN75kyhha3wHJsGS0SwgdnvuHErmFvWOBGtBIaE/ Afog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h63-20020a638342000000b003fa4034ade2si12186155pge.799.2022.05.25.10.50.24; Wed, 25 May 2022 10:50:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233467AbiEYInM (ORCPT + 99 others); Wed, 25 May 2022 04:43:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229812AbiEYInL (ORCPT ); Wed, 25 May 2022 04:43:11 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F4012459A for ; Wed, 25 May 2022 01:43:09 -0700 (PDT) Received: from kwepemi500014.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4L7Pgz4fv7zgY8l; Wed, 25 May 2022 16:42:07 +0800 (CST) Received: from huawei.com (10.67.174.157) by kwepemi500014.china.huawei.com (7.221.188.232) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 25 May 2022 16:43:07 +0800 From: Li Zhengyu To: CC: Subject: [PATCH] intel_th: Remove unused variable Date: Wed, 25 May 2022 16:41:29 +0800 Message-ID: <20220525084129.105609-1-lizhengyu3@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.174.157] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemi500014.china.huawei.com (7.221.188.232) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since commit a753bfcfdb1f ("intel_th: Make the switch allocate its subdevices") factored out intel_th_subdevice_alloc() from intel_th_populate(), (!req) is always true. When (!req) is been removed, variable 'req' is unused. Signed-off-by: Li Zhengyu --- After commit a753bfcfdb1f, whether intel_th_request_hub_module() has been called or not, it will always been called when (subdev->type == INTEL_TH_SWITCH) is true. I'm not sure if it's fine. drivers/hwtracing/intel_th/core.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/hwtracing/intel_th/core.c b/drivers/hwtracing/intel_th/core.c index 7e753a75d23b..59885b05220e 100644 --- a/drivers/hwtracing/intel_th/core.c +++ b/drivers/hwtracing/intel_th/core.c @@ -618,7 +618,6 @@ intel_th_subdevice_alloc(struct intel_th *th, { struct intel_th_device *thdev; struct resource res[3]; - unsigned int req = 0; int r, err; thdev = intel_th_device_alloc(th, subdev->type, subdev->name, @@ -686,11 +685,8 @@ intel_th_subdevice_alloc(struct intel_th *th, goto fail_free_res; /* need switch driver to be loaded to enumerate the rest */ - if (subdev->type == INTEL_TH_SWITCH && !req) { - err = intel_th_request_hub_module(th); - if (!err) - req++; - } + if (subdev->type == INTEL_TH_SWITCH) + intel_th_request_hub_module(th); return thdev; -- 2.17.1