Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4870133ybl; Mon, 13 Jan 2020 22:53:40 -0800 (PST) X-Google-Smtp-Source: APXvYqwosbScOOgEmb42eHGA5xBPQxBYED0pdnUOb305EpwvgUo4INBSy9ZxHzMT6WcVrG8B5t9q X-Received: by 2002:a9d:6f85:: with SMTP id h5mr16192773otq.19.1578984820622; Mon, 13 Jan 2020 22:53:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578984820; cv=none; d=google.com; s=arc-20160816; b=DDMVndvBNA/yaLNATQkR2NiMxJBgIGg93Er1/Dy+cCN1aOSAlyo1xa9WwQCCNyfPKl PZ5Om5NQO3X4pIzibKDUNZHw469xBN92T9k8GThi5+uCyW8nWAHFOWUvIgm1k1S47fo8 8UQnFSeO/+cJEuSWj+ZTvDiggMdjqC0fssevOK9OnbpnuN00qvx5BcChZ3m8soEW6oTB lNox//waQmgpW+ysYwYy+hGavirPm7LH5DczS2lBiVqKMkGSDWV/yLMB67e3j7wIxgh9 Cs8y9o6ALn8mVzHksYXvg6nJGkxCjZwC8IwmmqfZaiPmCJ/f+Yyygy/Wucnpl0L3mqxa uyqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:to:from; bh=+QmfIEXbHD0JK0z+CmfCdI4cv3mup1i1bd/w8JN0YNI=; b=FbipUAsABUIy9XDAVWP71g/MjysLqeF2m4LAenURERn8wDA4jWutFjvrZakAzYIaYG BIy+m7BzzGyfi1DAQlAx8KK6JGPP4Ypa8bHW5iqRtEFq6Hb6DkVxKFj754fjS1fTydAa k8yGExrGf68zSO0Izn8QbHbf+f4KG3hcE7hu91N9FlSG1+4CPJmig0z+RWO7UVvxnY4z vfAg/acjkqwsJQ2O22kyXctHHPR26EHVNzquz8dvGHuBcoQIrOQeeKtAYOKVaFxiE4G/ 8p4+AY8W6tZYHSsitmfxjlhQqxsx8ImM3HQFM0Jg7gCIDM2wjPDfAWNfwXcRLdCwAgte jqSg== 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 r202si7271169oie.247.2020.01.13.22.53.28; Mon, 13 Jan 2020 22:53:40 -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 S1728689AbgANGwd (ORCPT + 99 others); Tue, 14 Jan 2020 01:52:33 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:45066 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726995AbgANGwd (ORCPT ); Tue, 14 Jan 2020 01:52:33 -0500 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id DCB5CAEB169531A42777 for ; Tue, 14 Jan 2020 14:52:30 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.439.0; Tue, 14 Jan 2020 14:52:24 +0800 From: Sun Ke To: , , , Subject: [PATCH] core: remove set but not used variable 'checksum' Date: Tue, 14 Jan 2020 14:50:28 +0800 Message-ID: <20200114065028.616-1-sunke32@huawei.com> X-Mailer: git-send-email 2.17.2 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.175.124.28] 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/pnp/isapnp/core.c: In function ‘isapnp_build_device_list’: drivers/pnp/isapnp/core.c:777:27: warning: variable ‘checksum’ set but not used [-Wunused-but-set-variable] It is never used, so can be removed. Signed-off-by: Sun Ke --- drivers/pnp/isapnp/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c index 179b737280e1..e39d49bceae0 100644 --- a/drivers/pnp/isapnp/core.c +++ b/drivers/pnp/isapnp/core.c @@ -774,7 +774,7 @@ static unsigned char __init isapnp_checksum(unsigned char *data) static int __init isapnp_build_device_list(void) { int csn; - unsigned char header[9], checksum; + unsigned char header[9]; struct pnp_card *card; u32 eisa_id; char id[8]; @@ -784,7 +784,6 @@ static int __init isapnp_build_device_list(void) for (csn = 1; csn <= isapnp_csn_count; csn++) { isapnp_wake(csn); isapnp_peek(header, 9); - checksum = isapnp_checksum(header); eisa_id = header[0] | header[1] << 8 | header[2] << 16 | header[3] << 24; pnp_eisa_id_to_string(eisa_id, id); -- 2.17.2