Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5228341pxv; Tue, 20 Jul 2021 23:53:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqzyZWto+qnmO06/EMcUp0eUxne6YmT+MvVnH9WNhLPPOfAnyDe+s+cGmnqoPLUIWmq1Go X-Received: by 2002:a17:907:724b:: with SMTP id ds11mr38176407ejc.192.1626850311292; Tue, 20 Jul 2021 23:51:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626850311; cv=none; d=google.com; s=arc-20160816; b=mfk9gTuoDfp71moLj3Pn9a1AiQrhr9+w0Ag2Fuo4k3de6oexfvU13L77LoF7vwKc/d acnnIzA++Hehu6Hdht7EuGdE38MbxNRbfTVEBuN9j5Fyk/RtP++nqXLzsSfRj7ZPsALL +RbULEgExTWNUGxKx0Wtymw5VAgOHt9ptufNvJ8vpIH4OdigIo2Co1ANSHBhzc7QDJJc jBv2cl/3Tw7VBPOCy/sCvqXrIgezvkzmxf1jz2MxtN9AYQxXVkr+1OPfgYQkkhqhA2xX bKfKJc0fteJ59wfcO/H+6Y03UNKChAkJskSNyiCJhB0lSXl1iKJqz6FZQPNfQDFk6Pkc ZMDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=C2FarTYNvA1qUZhf+FlQcfSBhf5aztfYWSW31p415yQ=; b=KYxyzAce5gGhSuv6D0TwgsDfVU/6XFd5UodKF9NKp46AdFry4XbRZDLbwY4qZkeu+H GLs2TibNqj+9AIRj/FcWcci1pEXKYcW+Gn9V31+7rjRtqCYRs9tXfQKGPjydlocQQngj rWEvj+s//+mnfkm7Wn6dsGiExDSBunle8NFRAr62gJVOLFBjIyGunh6c/g7BPopebOv/ 0/eJHJd1sOLo9Xw7Tvt4FXoIUGEFp5qIMywrSaZy6dSgU0EEIcUVG2tG1T3fHcoH8YFy liFIgC0pKx5TFyn1L0QU2c0pCe6z3zFbp+lc7y7laA19Ye3yLb3/8i2YxwZWh5gjLqRv ASLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=aTxk7GDq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z9si2936307edd.553.2021.07.20.23.51.28; Tue, 20 Jul 2021 23:51:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=aTxk7GDq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233923AbhGUGJb (ORCPT + 99 others); Wed, 21 Jul 2021 02:09:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233487AbhGUGIb (ORCPT ); Wed, 21 Jul 2021 02:08:31 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE952C061762; Tue, 20 Jul 2021 23:49:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=C2FarTYNvA1qUZhf+FlQcfSBhf5aztfYWSW31p415yQ=; b=aTxk7GDqctKlM/nDPBx4it64IF ITMxHV9QLblGHVJoAqfBhrGZk8Oa6OwjLd57+vnRjGrHT3vcEHwwB9sSVmTQDqK0rqzM9b0y4ib2w kbk4t4H1XAFvRk0HKXcwWYCHGO9CeNVbl5EulYOJzfVLEePdwvpSUJULOhmtFzwyslxgkHFiAq5Rj OHXCrbJ/cKe1L7KEXp6PdTlkrpDLNkZVu1V57bXTnafDZSv1bg80LaN1WfdZc59SZLnRJu9D14uH0 P3lKV5dvsh4iv6NzKRQJ5D1q2tT7O6sL5pf1sBJKWUFstunshOGpRZ+Yj42shc1y4sWKckW6oXpwX rlWHWwvQ==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m662C-008tXx-LD; Wed, 21 Jul 2021 06:48:49 +0000 Date: Wed, 21 Jul 2021 07:48:48 +0100 From: Christoph Hellwig To: Leon Romanovsky Cc: Doug Ledford , Jason Gunthorpe , Leon Romanovsky , linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, Mark Zhang Subject: Re: [PATCH rdma-next 7/7] RDMA/core: Create clean QP creations interface for uverbs Message-ID: References: <8eaf125d3bfb463e1641b6f2794203cc93d76c90.1626846795.git.leonro@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8eaf125d3bfb463e1641b6f2794203cc93d76c90.1626846795.git.leonro@nvidia.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +struct ib_qp *ib_create_qp_user(struct ib_device *dev, struct ib_pd *pd, > + struct ib_qp_init_attr *attr, > + struct ib_udata *udata, > + struct ib_uqp_object *uobj, const char *caller); > +static inline struct ib_qp *ib_create_qp_uverbs(struct ib_device *dev, > + struct ib_pd *pd, > + struct ib_qp_init_attr *attr, > + struct ib_udata *udata, > + struct ib_uqp_object *uobj) > +{ > + if (attr->qp_type == IB_QPT_XRC_TGT) > + return ib_create_qp_user(dev, pd, attr, NULL, uobj, > + KBUILD_MODNAME); > + > + return ib_create_qp_user(dev, pd, attr, udata, uobj, NULL); Why not always pass along the udata and caller and just not use them in the low-level code?