From patchwork Tue May 23 16:33:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Dryomov X-Patchwork-Id: 9743031 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 919C760380 for ; Tue, 23 May 2017 16:34:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 84D2B28450 for ; Tue, 23 May 2017 16:34:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 79F05287AB; Tue, 23 May 2017 16:34:21 +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=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 23B7A28450 for ; Tue, 23 May 2017 16:34:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937096AbdEWQeS (ORCPT ); Tue, 23 May 2017 12:34:18 -0400 Received: from mail-qk0-f195.google.com ([209.85.220.195]:35438 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937079AbdEWQeO (ORCPT ); Tue, 23 May 2017 12:34:14 -0400 Received: by mail-qk0-f195.google.com with SMTP id k74so23495477qke.2 for ; Tue, 23 May 2017 09:34:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=xUkXxHuf4ZJ66+XU9zHp/0i2gcpHxpKIsOw9jce+MiU=; b=LcFNtqO1wHBnzEyIbV3S40oj3YZjiY3yYUK+l5+7lCaNPoA3P7qveW8E+xy56sGei5 +aJm1cBSswsr3fq/HRtCaCqHt0rKjk0lOJ47XGbwSdIdufe8MNHAmPbg0/vTv7W6+2/M ANORCievwZeOQMLJLySEia93MTBjAUf45+UaAtY/brB5jOjI8im0qIwYj/S0BbHpUIg/ 9GayGcAOWOvy/+VCDYBtcdiXTP2rUuu7Xx9r1Bl2EnfJsosQlz/sHFSl33zWIp6gtYbH ENEvki1u4mBnwD2Yi1lKbOW/R1/EvmMUXdqxnccDfQyVPSmNic7X/JFzdHP3UchslkzK D+dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=xUkXxHuf4ZJ66+XU9zHp/0i2gcpHxpKIsOw9jce+MiU=; b=MdpLGKeF38eZKZVNaK5SAN1BNd21L0uMpK86wAueeMDtWMFy30d1KQOveu0+2MuVM9 KpS2a/alduG6dYA7WklRCSKAQjDYTm1xyimV17Xt9xSX9IK0bNPFzb1jzi8WPiY1DziZ UOQMNQXd/Qfj9UJ74zIS/O6g8Y159hmMfsC9MUU1ke+EeOTqD3iQonqvdjudxAV0zMl/ 4MvnbozB4dfHp3YBStmVhOQim0z2U0PRP2pDR9EhDEAywRUJByrtnhn98gwPPj5QPXWc Bk6gciYJuXjvjHoRJo6PodFL/v6WYMTyB3GQKRbwzFdWZA1JMvLM3vwnx/Hl7MGEvJSF WWtw== X-Gm-Message-State: AODbwcD+UVbEr3YWoI4H/GOmBwyV9eWlBta/P1LF/qkWoYsrDhLna+EZ 26hCmZU8550sVufFOGk= X-Received: by 10.55.188.135 with SMTP id m129mr26079977qkf.226.1495557253584; Tue, 23 May 2017 09:34:13 -0700 (PDT) Received: from orange.brq.redhat.com. (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id o15sm784055qki.47.2017.05.23.09.34.12 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 May 2017 09:34:13 -0700 (PDT) From: Ilya Dryomov To: ceph-devel@vger.kernel.org Subject: [PATCH 3/5] libceph: drop version variable from ceph_monmap_decode() Date: Tue, 23 May 2017 18:33:56 +0200 Message-Id: <1495557238-1077-4-git-send-email-idryomov@gmail.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1495557238-1077-1-git-send-email-idryomov@gmail.com> References: <1495557238-1077-1-git-send-email-idryomov@gmail.com> 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 It's set but not used: CEPH_FEATURE_MONNAMES feature bit isn't advertised, which guarantees a v1 MonMap. Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder --- net/ceph/mon_client.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/net/ceph/mon_client.c b/net/ceph/mon_client.c index 29a0ef351c5e..250f11f78609 100644 --- a/net/ceph/mon_client.c +++ b/net/ceph/mon_client.c @@ -43,15 +43,13 @@ struct ceph_monmap *ceph_monmap_decode(void *p, void *end) int i, err = -EINVAL; struct ceph_fsid fsid; u32 epoch, num_mon; - u16 version; u32 len; ceph_decode_32_safe(&p, end, len, bad); ceph_decode_need(&p, end, len, bad); dout("monmap_decode %p %p len %d\n", p, end, (int)(end-p)); - - ceph_decode_16_safe(&p, end, version, bad); + p += sizeof(u16); /* skip version */ ceph_decode_need(&p, end, sizeof(fsid) + 2*sizeof(u32), bad); ceph_decode_copy(&p, &fsid, sizeof(fsid));