]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd/osd_connection_priv: make get_osd_priv() inline
authorYingxin Cheng <yingxin.cheng@intel.com>
Mon, 25 Sep 2023 02:22:49 +0000 (10:22 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Thu, 2 Nov 2023 07:29:08 +0000 (15:29 +0800)
To address warning:
/root/ceph/src/crimson/osd/osd_connection_priv.h:89:27: warning:
‘crimson::osd::OSDConnectionPriv&
crimson::osd::get_osd_priv(crimson::net::Connection*)’ defined but not
used [-Wunused-function]
   89 | static OSDConnectionPriv &get_osd_priv(crimson::net::Connection
      *conn) { |                           ^~~~~~~~~~~~

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/crimson/osd/osd_connection_priv.h

index 69edf94b88fe5c0d9aa6ca18835b9efffb95c140..99f394b1e83f7bfbb0b4e2ac37c1db0c40c9ce88 100644 (file)
@@ -17,7 +17,7 @@ struct OSDConnectionPriv : public crimson::net::Connection::user_private_t {
   ConnectionPipeline replicated_request_conn_pipeline;
 };
 
-static OSDConnectionPriv &get_osd_priv(crimson::net::Connection *conn) {
+static inline OSDConnectionPriv &get_osd_priv(crimson::net::Connection *conn) {
   if (!conn->has_user_private()) {
     conn->set_user_private(std::make_unique<OSDConnectionPriv>());
   }