Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1433310ybb; Thu, 9 Apr 2020 01:58:19 -0700 (PDT) X-Google-Smtp-Source: APiQypJlthfBCJ7C4ChbCLO5Vwm9pJqcFalVSE+spQUXnwrIjStDhce5CX0xlEQ82Em9XAufBbBI X-Received: by 2002:a9d:6e02:: with SMTP id e2mr8665312otr.366.1586422699682; Thu, 09 Apr 2020 01:58:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586422699; cv=none; d=google.com; s=arc-20160816; b=Oza+w6a2O2RWA/0xUxpeBKpQT8sGaAUbgaNG0nkS42akz679S3DM2f33lCdZJUg4pR K8RGt0PJlPPG1u/bwd7cXb5jN/EJ69kSPBml5tiboaAjUFq3js43bWNYvaWE8DK/fkaZ t0KOohYklfPWUCxJc7rPTVSyiIsc03UhDxml48+T6S6YBlrf9DEA8dc+oP2fBXii4Gqy IdVb7zkOsdFTG0yVaqS4FIN5/V9wBs3ZFlwIbx3M2aCJ7+zh7m1ufO740OvStCD7pE5W ZKF9iN3vrKM6estu9xrMnXnTYXNFSq0w77BP2wlAGyVEkpk9GVM6+RgR/2hWdVK5fzyl T2Qw== 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:cc:to:from; bh=MmubDlKyynkHdJAJK74tsE+W4Z+0bdQGzT9Idwjww3c=; b=WRrJw4m3AmUCKqzta8RIo/p7H0iMAaWOzKygH5HyZwiZBEkWTWXVrt4alEU36d4osF R20lm6RQT6MBhwWL/xGfTZ9OpBLl5rjGS1/jAMSZKOWIp6IkWFslKf5Hrao40UqUi1qm WG2Krb08qYi3uRj2m/tJEUQrLahXBwXPFPGCA7JM7PFE4pzkM4tNNVEIAGHkwcIwPTrc ZWmCHuF9YmVb647ompempq3jcNzHj4fDXahkV/iQo8xwD5dCqyiyzeEaQiFnjx1YXh64 NBwzm9nhR+yD6VhostJcQXI+S4ZhbLKtq7eNNq0mgvO9ZnO1dj6/wibBHMwSLTt+7uIc 2Raw== 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 l13si3715194otl.78.2020.04.09.01.58.04; Thu, 09 Apr 2020 01:58:19 -0700 (PDT) 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 S1726678AbgDIIz5 (ORCPT + 99 others); Thu, 9 Apr 2020 04:55:57 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:12630 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725783AbgDIIz4 (ORCPT ); Thu, 9 Apr 2020 04:55:56 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 644F0354B5BE8CDD8761; Thu, 9 Apr 2020 16:55:53 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.487.0; Thu, 9 Apr 2020 16:55:42 +0800 From: Jason Yan To: , , CC: Jason Yan Subject: [PATCH] md/r5cache: remove set but not used 'offset' Date: Thu, 9 Apr 2020 16:54:16 +0800 Message-ID: <20200409085416.47724-1-yanaijie@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 Fix the following gcc warning: drivers/md/raid5-cache.c:198:11: warning: variable ‘offset’ set but not used [-Wunused-but-set-variable] sector_t offset; ^~~~~~ Reported-by: Hulk Robot Signed-off-by: Jason Yan --- drivers/md/raid5-cache.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/md/raid5-cache.c b/drivers/md/raid5-cache.c index 9b6da759dca2..eea14fa9e59b 100644 --- a/drivers/md/raid5-cache.c +++ b/drivers/md/raid5-cache.c @@ -195,9 +195,7 @@ struct r5l_log { static inline sector_t r5c_tree_index(struct r5conf *conf, sector_t sect) { - sector_t offset; - - offset = sector_div(sect, conf->chunk_sectors); + sector_div(sect, conf->chunk_sectors); return sect; } -- 2.17.2