From patchwork Thu Nov 15 14:27:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chengguang Xu X-Patchwork-Id: 10684439 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1E8CF14BA for ; Thu, 15 Nov 2018 14:27:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C87D2C836 for ; Thu, 15 Nov 2018 14:27:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 00EF12C844; Thu, 15 Nov 2018 14:27:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9D90F2C836 for ; Thu, 15 Nov 2018 14:27:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388239AbeKPAfc (ORCPT ); Thu, 15 Nov 2018 19:35:32 -0500 Received: from mout.gmx.net ([212.227.17.22]:35813 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729034AbeKPAfc (ORCPT ); Thu, 15 Nov 2018 19:35:32 -0500 Received: from localhost.localdomain ([116.30.193.214]) by mail.gmx.com (mrgmx102 [212.227.17.174]) with ESMTPSA (Nemesis) id 0MB1C4-1gDRGB0LBc-009yF9; Thu, 15 Nov 2018 15:27:24 +0100 From: Chengguang Xu To: zyan@redhat.com, idryomov@gmail.com Cc: ceph-devel@vger.kernel.org, Chengguang Xu Subject: [PATCH 1/2] ceph: remove redundant assignment Date: Thu, 15 Nov 2018 22:27:01 +0800 Message-Id: <20181115142702.15893-1-cgxu519@gmx.com> X-Mailer: git-send-email 2.17.2 X-Provags-ID: V03:K1:e9JtfQ+z8JoYmmU+VxmDvB15iYpoLOBzpBmUkMKzNWI3xXF8Jex i8wK9MD9+RepAEeLD/5YctqkDtJGcoZ4Gp11iMHlr6Qu9FfUOI1/YSgWCG3dYTjmToNp2uL kVUk6Q5j+4EhNXc2X8L0Wp9L6bs7zv1gb+v07xudxeN0sChJTTBY2j+6PDVJj4Dmy9Pton5 0SthewmA4DYmFj0sjtYSA== X-UI-Out-Filterresults: notjunk:1;V01:K0:5mQknBA82qA=:tgWhwY/SCPCBoyoTBHC9eS iw/sXh0had0dJC89xj6U/POLU56xUofYQSNYlsMUa5Z3kGoS2vcBrF5M79N/xWv5MT3i6MNsA MeRzUIE8gGWxH/nAygUTphABlPPw0QEmfOBkaVS8HbJ9fgNM9r4JF2HO5FPVfesSjd1BFhRqf XgO59kc2l6vqPJ0Dx1GsfG24xYjRMqzTo0d7zYoCY+Y9c5suO5LzkR4+Fp1AGzKqNeAbObxOv ejZXHn8vISDOU+e87PHcPodrLJHvA9BiIH3VafhYZXx9O5zrl/gZeMWy658OyuJ9zZyZshMzP oRVP9PaJs4b+NYBxLh6hCMs+uxt8lw3HVZm58WvEsHKobk7/gJ4/4qQZUeNFidj9yUWEznh4s ZtLQkDb5el2TqiEEtqpN8NIpMI8eLVlEeP+vIEjU4NqCMGgBrT4PnFsNHNTozDQ38gQlhpolc kbzLInY/7t946aBu0X9PacB5bD75SuIl48ogkmZmoZHNTfkGr/mZYv6kgUN8gQiIXd5yJniRn h07o3vAbgB41q20JzOFyl0AB4povAx/I0lYaJK7yzff0HylYrZNAaId/8e8gojpMxiy5tYLRS 8z8YyFf2FPnwTSeKxq4L7FpZwRx8C77UCkIhTLr9956IEswhiI3X2iX+5A8Pqy+WvYJ4inWAY Y/kOQdxgb6WUeii0V1AEDjU2/mO596bReFdQLLtjc4cysO9d1VwOEmTgf1hKejXmz53+kH/nZ LVBS6jzgzS+J4rwHEgXkJvPFmDdQQT5gwCNf5UQGlrLKZg4peKi0FC2NzNM2S9I5ROm4TlBFP v/hpfNkpcpEuSd3kmAE7RJ3OzZPtKSToEwT9rclw3eFdH8cdw7IgyuxyYy+82LMlZvofVaZ7C ISQFMHl1zc4MJamvl3EQsK6qmm8fqodx5rSX8eU00= Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is redundant assighment of variable i in ceph_mdsmap_get_random_mds(), just remvoe it. Signed-off-by: Chengguang Xu --- fs/ceph/mdsmap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/ceph/mdsmap.c b/fs/ceph/mdsmap.c index 44e53abeb32a..1a2c5d390f7f 100644 --- a/fs/ceph/mdsmap.c +++ b/fs/ceph/mdsmap.c @@ -35,7 +35,6 @@ int ceph_mdsmap_get_random_mds(struct ceph_mdsmap *m) /* pick */ n = prandom_u32() % n; - i = 0; for (i = 0; n > 0; i++, n--) while (m->m_info[i].state <= 0) i++;