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++; From patchwork Thu Nov 15 14:27:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chengguang Xu X-Patchwork-Id: 10684441 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 323D913B5 for ; Thu, 15 Nov 2018 14:27:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 242A22C836 for ; Thu, 15 Nov 2018 14:27:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 18E6A2C844; Thu, 15 Nov 2018 14:27:50 +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 DDC322C836 for ; Thu, 15 Nov 2018 14:27:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388317AbeKPAfu (ORCPT ); Thu, 15 Nov 2018 19:35:50 -0500 Received: from mout.gmx.net ([212.227.17.20]:60013 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729034AbeKPAfu (ORCPT ); Thu, 15 Nov 2018 19:35:50 -0500 Received: from localhost.localdomain ([116.30.193.214]) by mail.gmx.com (mrgmx102 [212.227.17.174]) with ESMTPSA (Nemesis) id 0MKbZD-1gMTff3lDz-0021lQ; Thu, 15 Nov 2018 15:27:42 +0100 From: Chengguang Xu To: zyan@redhat.com, idryomov@gmail.com Cc: ceph-devel@vger.kernel.org, Chengguang Xu Subject: [PATCH 2/2] ceph: fix coding style for pointer parameter Date: Thu, 15 Nov 2018 22:27:02 +0800 Message-Id: <20181115142702.15893-2-cgxu519@gmx.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181115142702.15893-1-cgxu519@gmx.com> References: <20181115142702.15893-1-cgxu519@gmx.com> X-Provags-ID: V03:K1:cQYOoO5Aau+xjXi6WWhNFDRNeFSrTp7PwdKCGES00pW6H8tbzhi i5AU43nKRKaioFGvu+iZ5Lu3CREYSktFm9vw8s2mqsRomHdE0Wy+DgSqcZlkQtjVMtmL5hS 9BjAM4lVxiVDb5L5rGZ5I1blyxC3s+mT7bFM/iC+JB18ZhoiUyfSPd1RxrC53fZolqFuicd tpXTw3uKYbiZDRsvkcLFQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:cnyfKgZbtUc=:XXD61kNjtLkXKoxNMN6pPk /g5K//RhU/Z8dsVVe4vhXoba4ZNpd3yCPZXJuPD4CGWZ9gXVn86TPjTJprLihAEFMAcrmJfUP CCRmRBf7csNNaOnVN39kvh6Ezf2ad7Y141yd7ubqlptE/WC0tfuYPvZ9nDQXN61aZAFNuEBNr hNG1cRd3JrbbVM/yhu95OYhcPQTwAB88lCx5QNIepYZhHpzSISuzF4R0oSp2fYah34b0tzXNi DVrlWIXMjSNz+aimo6wtDCBodVS7MIfgB6hUF9tHbarEy4JOKudpraZ7kleFKZU95oFUzUjtK EJ/jbLwXsI71ygoMWeL/kme163UQi6sO1nXSnG5Ym/DGfrO8wmPARmfpXorafBwiBN+0cQM9t UOfc416ltStRa3tI5xsMwthbHZ5HTyyhynRvbutpHysQ4VYk0O8NBUMHsZVSxZqTl2TzJlbui 6EUlYYElRQX1P+evGmT+fXDct7WRVql3QppFNDycKOVV56idSFq1NGvxGCleYn/mZ2HDsDMP7 A7sRmLJwlh4ToyFPEejcgnRjOvt/+Gmw9Ygu1OmzEmSbecC8DusVXSc5h6wQDeDNGjcqgLjo8 AcA36l9lMBneyjEpWTvGs/vJLVrEhiXsbjLRV/qE87/Wd9tXF26+YTn31yU0XnmKUbaCTaNjf 5eS6TOapajYg85YWN37og6cKHNODtbLoW1qVXh0Z/gIRc6Eo6hl5r8dYndYfd0NGDS5YD3nIp Z0WoUSANgGF8p9fM/p5NLOeOwqv4B2DQbvDFP/qKIBIsV1/ZfMBPizvHwN47OaXftvcM5JlG2 EwXQHDvzv4APQ3grgCHGqebwWgkXpSWRsgEt4Zv7SPMf2ZghQ3+tKcxxxrj9CFfcaVTttPH/3 QePADkHmoUtfwONCPIXH9bTmpDM9INvK9puVeGZx8= 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 Change coding style of pointer parameter to 'void *end' from 'void* end'. Signed-off-by: Chengguang Xu --- fs/ceph/mdsmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ceph/mdsmap.c b/fs/ceph/mdsmap.c index 1a2c5d390f7f..977cacd3825f 100644 --- a/fs/ceph/mdsmap.c +++ b/fs/ceph/mdsmap.c @@ -70,7 +70,7 @@ int ceph_mdsmap_get_random_mds(struct ceph_mdsmap *m) } while (0) -static int __decode_and_drop_compat_set(void **p, void* end) +static int __decode_and_drop_compat_set(void **p, void *end) { int i; /* compat, ro_compat, incompat*/