From patchwork Wed Oct 17 19:20:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Dryomov X-Patchwork-Id: 10646005 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 246C03B73 for ; Wed, 17 Oct 2018 19:21:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 15C48286AA for ; Wed, 17 Oct 2018 19:21:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0A61428829; Wed, 17 Oct 2018 19:21:04 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 958A4287C6 for ; Wed, 17 Oct 2018 19:21:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728398AbeJRDSJ (ORCPT ); Wed, 17 Oct 2018 23:18:09 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:39294 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728149AbeJRDSJ (ORCPT ); Wed, 17 Oct 2018 23:18:09 -0400 Received: by mail-wr1-f67.google.com with SMTP id 61-v6so30955827wrb.6 for ; Wed, 17 Oct 2018 12:21:01 -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=8jjUmS6zHWzxuw1YmizCOxm6nHa1WKVCXcZTSh9HkW4=; b=UKoDLyDovbCd9KQikeIx3AXEIg6AJHDZrvJJNaRl4tPnBdx0Kghx+mJ97431u54sPw VlJe9KfBfQdvJ8Ke1V0Tq6PlCxkxJNHcEzud6IZUA1LjhkYkOc3qx1a47iD2SryxCx3b r2NSJnFnkfX4I+8Gn+iTqxR1Bx43OB3+6ZQh0RM68rO/FWa0kRXF1d9bSbsfQRYeaPuh kdf2ZQgYD58Q8XH0/N5YHEKd5VvS1Yup2W5EkGOb1io+V+kwxNwq7Rsuq8iZ+nF7/YVp B33c0xkR4zObx20xjVrW4gXZhYp0s7Uk1CENCKrT+fTG2FiiqKgcedwGwq7I+a/8zQMH 5N2Q== 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=8jjUmS6zHWzxuw1YmizCOxm6nHa1WKVCXcZTSh9HkW4=; b=s1yQpdSU2VXUccO+SK+V09MvQ8MDmoN83jFDsIBBSRadHgPUS5Kl+YpFR+3zSWBc4E ebzl9IEIMLv2z2Ua69rPP1KD5ID48Lx3y8aP84dVfgCsJ00koE8LXOI4RX01QKbp8VK9 r0GLmR5aOCG1yldW47JgcOvk+e1EjiPGiYpgpF0IIKRR/c5R2IC0XmF/93ohY8b1RkXo JuhW6N8vdtRyvCwzebYuS1NNLmPhEViM1dZs6dIhFj+73QYyAy+1PurRmxKrFhFiWlYl z8aUz1P3CavCxpOVi0sdsnM7iGoabPZ3M4OHS22YTIsMsKQmBN1XBENGpPmJ8WSgjBkB 6D3g== X-Gm-Message-State: ABuFfoipiowY+PMBJV57RBmABSdGR7mwk9qVIS72sQE5Pw5qjZYC3bvf ByL13VK4dNZJNX3O2f068M6Wz9n6 X-Google-Smtp-Source: ACcGV60BnbsvoRn1h4lfrEB2fFrTC6LSYmcF1v8CFbZitENoLtqWpW72XonYZz+RcKknMgYq5rvpxw== X-Received: by 2002:adf:8382:: with SMTP id 2-v6mr24372980wre.13.1539804060604; Wed, 17 Oct 2018 12:21:00 -0700 (PDT) Received: from orange.redhat.com ([213.175.37.12]) by smtp.gmail.com with ESMTPSA id f7-v6sm16059501wrr.68.2018.10.17.12.20.59 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Oct 2018 12:20:59 -0700 (PDT) From: Ilya Dryomov To: ceph-devel@vger.kernel.org Subject: [PATCH 03/10] libceph: no need to call osd_req_opcode_valid() in osd_req_encode_op() Date: Wed, 17 Oct 2018 21:20:22 +0200 Message-Id: <20181017192029.23294-4-idryomov@gmail.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20181017192029.23294-1-idryomov@gmail.com> References: <20181017192029.23294-1-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 Any uninitialized or unknown ops will be caught by the default clause anyway. Signed-off-by: Ilya Dryomov --- net/ceph/osd_client.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index ad00495dbd39..f403a483d51d 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c @@ -903,12 +903,6 @@ static void ceph_osdc_msg_data_add(struct ceph_msg *msg, static u32 osd_req_encode_op(struct ceph_osd_op *dst, const struct ceph_osd_req_op *src) { - if (WARN_ON(!osd_req_opcode_valid(src->op))) { - pr_err("unrecognized osd opcode %d\n", src->op); - - return 0; - } - switch (src->op) { case CEPH_OSD_OP_STAT: break;