From patchwork Wed Apr 8 07:29:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 11480135 X-Patchwork-Delegate: snitzer@redhat.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C351D912 for ; Wed, 8 Apr 2020 13:44:46 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 12D4B20780 for ; Wed, 8 Apr 2020 13:44:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="YAWTtmAx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 12D4B20780 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dm-devel-bounces@redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586353484; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=vM2jHuuxyjdXnggp4Nd1ZJ+azSb5uAEk31SWb7LYnjg=; b=YAWTtmAxQutxcXtG5Biwn0qXTysV9EQl0XH26+t2saqBBwPuUcmzki/UMxNXEyCJCxOH2H 67FcQXaTc2xMwkVONSgT5QzMdvR4gLw3mk9mD9n5HREUWXy8W3W0x5scRnV5oQf3ssH70f FCbElQsq6rHclCiz/OW8VUzmoPWGCeU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-16-oBJ1sClbMl-Kk3dFj5uc4g-1; Wed, 08 Apr 2020 09:44:38 -0400 X-MC-Unique: oBJ1sClbMl-Kk3dFj5uc4g-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0C018DB60; Wed, 8 Apr 2020 13:44:33 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 836DB9DD70; Wed, 8 Apr 2020 13:44:31 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 8B88318089C8; Wed, 8 Apr 2020 13:44:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0387RijT019231 for ; Wed, 8 Apr 2020 03:27:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7B490108BED; Wed, 8 Apr 2020 07:27:44 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 76D03108BE9 for ; Wed, 8 Apr 2020 07:27:41 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DA66980029A for ; Wed, 8 Apr 2020 07:27:41 +0000 (UTC) Received: from huawei.com (szxga05-in.huawei.com [45.249.212.191]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-376-2g3ysYhfPIqDPrfrl8NtrA-1; Wed, 08 Apr 2020 03:27:39 -0400 X-MC-Unique: 2g3ysYhfPIqDPrfrl8NtrA-1 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 7CF5A5AEDFCA8666080F; Wed, 8 Apr 2020 15:27:35 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.487.0; Wed, 8 Apr 2020 15:27:27 +0800 From: YueHaibing To: Alasdair Kergon , Mike Snitzer Date: Wed, 8 Apr 2020 07:29:48 +0000 Message-ID: <20200408072948.156175-1-yuehaibing@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 0387RijT019231 X-loop: dm-devel@redhat.com X-Mailman-Approved-At: Wed, 08 Apr 2020 09:37:20 -0400 Cc: kernel-janitors@vger.kernel.org, dm-devel@redhat.com, YueHaibing , linux-kernel@vger.kernel.org, Hulk Robot Subject: [dm-devel] [PATCH -next] dm integrity: remove set but not used variables X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Fixes gcc '-Wunused-but-set-variable' warning: drivers/md/dm-integrity.c: In function 'integrity_metadata': drivers/md/dm-integrity.c:1557:12: warning: variable 'save_metadata_offset' set but not used [-Wunused-but-set-variable] drivers/md/dm-integrity.c:1556:12: warning: variable 'save_metadata_block' set but not used [-Wunused-but-set-variable] They are never used, so remove it. Reported-by: Hulk Robot Signed-off-by: YueHaibing --- drivers/md/dm-integrity.c | 4 ---- 1 file changed, 4 deletions(-) -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c index b989d109d55d..94fb584854b8 100644 --- a/drivers/md/dm-integrity.c +++ b/drivers/md/dm-integrity.c @@ -1553,8 +1553,6 @@ static void integrity_metadata(struct work_struct *w) char checksums_onstack[max((size_t)HASH_MAX_DIGESTSIZE, MAX_TAG_SIZE)]; sector_t sector; unsigned sectors_to_process; - sector_t save_metadata_block; - unsigned save_metadata_offset; if (unlikely(ic->mode == 'R')) goto skip_io; @@ -1605,8 +1603,6 @@ static void integrity_metadata(struct work_struct *w) goto skip_io; } - save_metadata_block = dio->metadata_block; - save_metadata_offset = dio->metadata_offset; sector = dio->range.logical_sector; sectors_to_process = dio->range.n_sectors;