Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp736117pxa; Wed, 12 Aug 2020 12:07:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+PNcj7NqfMcogpKZEbWMnaLxSjjC+4rEH6ruj2WZGfVOsmI4rx712UV003IivRmTH0wQ7 X-Received: by 2002:a17:906:1589:: with SMTP id k9mr1263709ejd.115.1597259252328; Wed, 12 Aug 2020 12:07:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597259252; cv=none; d=google.com; s=arc-20160816; b=egDnis4nDvDi7fx8sBQ3WIzRZ8StHDX+ehbmTiA/OQynZpINY8qAgCQEa2+PhW9LRB rkFzbLbXjmsagHk0o399zVKCMgc3PqArmzYPVgtMcQY1leknsVwK81gGTpus469bP5Ye ATHgJv1raNqFXG0GT695Iu7JIBsgY/ziDwckLNLij8psbX/D46Gaf9pxnqIpHnjatc47 die3qM03k9FRDxUq3ZD0a0fWH8VCSn7sww6FGnZcUOWHBTxBYsqnJiYAaoolxbSGQJ/F /uMKh9dETcMGAa3l4GonHJbKUZ3e3UqH4D2jYiz4FIfQ/R9HCW7H/aKWI7gXMxsL4SVO AgEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=Djj0t66GFCX7xolgqFHh9wXftS0xv3wsI5JZeDZYrB4=; b=G3P8W1pwvm0OQ6me4t6IuyBnOJPiC0xTgFVIQshNhwzUXGGOSeEQBDzzEAxhn1F+3H xgxpzLS+y+CDRn5QfuYLA2g3v+YE/blnkMkbjddqBVfxigQwKh/95BDL5TDbIfsl/uO8 o55tCAhDhJyewNUMAHLfJayww0UwQMoQnaFwpps1VsysLsM+mHeQqCICqfV9OljDXKc5 5Jn8+rYxq1p2NZrFPutOPRZ9liXLFRm85kMYnVynvncPJ+ToE29bbXLiBnsAu3kiPX+/ H3uUUeVnQ7CwuxNtib0Xa46DezcJk6uIycgqo2MUk2ecnui3fchXu6L1QIrMSV87rTP8 71Eg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s15si1839928edy.237.2020.08.12.12.07.08; Wed, 12 Aug 2020 12:07:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726512AbgHLTDV (ORCPT + 99 others); Wed, 12 Aug 2020 15:03:21 -0400 Received: from mga02.intel.com ([134.134.136.20]:7248 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726576AbgHLTDT (ORCPT ); Wed, 12 Aug 2020 15:03:19 -0400 IronPort-SDR: 4hNE40jw6QyNOteiIJKrIFCH2ZT2NeSweAdVNAyBhbUDi4MyUzrGLRyG/GEraA7y5VZDF+Sni+ uKkfhjjTYP3w== X-IronPort-AV: E=McAfee;i="6000,8403,9711"; a="141885369" X-IronPort-AV: E=Sophos;i="5.76,305,1592895600"; d="scan'208";a="141885369" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2020 12:03:19 -0700 IronPort-SDR: vf0iPNKsKqaJT5Cu8JQZg+nFMQARb4+we36Bh5bjIp2PkPyKvIT+VcOO1AV1u6Y+IlHgYlhk7K S8LOWtFKYI4A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,305,1592895600"; d="scan'208";a="295161216" Received: from vsriva1-mobl1.amr.corp.intel.com (HELO ingas-nuc1.intel.com) ([10.255.229.126]) by orsmga006.jf.intel.com with ESMTP; 12 Aug 2020 12:03:19 -0700 From: Inga Stotland To: linux-bluetooth@vger.kernel.org Cc: brian.gix@intel.com, michal.lowas-rzechonek@silvair.com, Inga Stotland Subject: [PATCH BlueZ 2/2] mesh: Make mesh config model binding API consistent Date: Wed, 12 Aug 2020 12:03:17 -0700 Message-Id: <20200812190317.102140-2-inga.stotland@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200812190317.102140-1-inga.stotland@intel.com> References: <20200812190317.102140-1-inga.stotland@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org This changes the order of function arguments in mesh_config_model_binding_add() and mesh_config_model_binding_del() to make them consistent with the rest of mesh_config_model... APIs --- mesh/mesh-config-json.c | 4 ++-- mesh/mesh-config.h | 4 ++-- mesh/model.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mesh/mesh-config-json.c b/mesh/mesh-config-json.c index 086d618b1..a145388d6 100644 --- a/mesh/mesh-config-json.c +++ b/mesh/mesh-config-json.c @@ -837,7 +837,7 @@ bool mesh_config_app_key_del(struct mesh_config *cfg, uint16_t net_idx, } bool mesh_config_model_binding_add(struct mesh_config *cfg, uint16_t ele_addr, - bool vendor, uint32_t mod_id, + uint32_t mod_id, bool vendor, uint16_t app_idx) { json_object *jnode, *jmodel, *jstring, *jarray = NULL; @@ -882,7 +882,7 @@ bool mesh_config_model_binding_add(struct mesh_config *cfg, uint16_t ele_addr, } bool mesh_config_model_binding_del(struct mesh_config *cfg, uint16_t ele_addr, - bool vendor, uint32_t mod_id, + uint32_t mod_id, bool vendor, uint16_t app_idx) { json_object *jnode, *jmodel, *jarray; diff --git a/mesh/mesh-config.h b/mesh/mesh-config.h index f15f3f376..50a55d51e 100644 --- a/mesh/mesh-config.h +++ b/mesh/mesh-config.h @@ -152,10 +152,10 @@ bool mesh_config_comp_page_add(struct mesh_config *cfg, uint8_t page, uint8_t *data, uint16_t size); bool mesh_config_comp_page_mv(struct mesh_config *cfg, uint8_t old, uint8_t nw); bool mesh_config_model_binding_add(struct mesh_config *cfg, uint16_t ele_addr, - bool vendor, uint32_t mod_id, + uint32_t mod_id, bool vendor, uint16_t app_idx); bool mesh_config_model_binding_del(struct mesh_config *cfg, uint16_t ele_addr, - bool vendor, uint32_t mod_id, + uint32_t mod_id, bool vendor, uint16_t app_idx); bool mesh_config_model_pub_add(struct mesh_config *cfg, uint16_t ele_addr, uint32_t mod_id, bool vendor, diff --git a/mesh/model.c b/mesh/model.c index 136edb194..961391f13 100644 --- a/mesh/model.c +++ b/mesh/model.c @@ -659,7 +659,7 @@ static int update_binding(struct mesh_node *node, uint16_t addr, uint32_t id, model_unbind_idx(node, ele_idx, mod, app_idx); if (!mesh_config_model_binding_del(node_config_get(node), - addr, vendor, id, + addr, id, vendor, app_idx)) return MESH_STATUS_STORAGE_FAIL; @@ -671,7 +671,7 @@ static int update_binding(struct mesh_node *node, uint16_t addr, uint32_t id, return MESH_STATUS_INSUFF_RESOURCES; if (!mesh_config_model_binding_add(node_config_get(node), addr, - vendor, id, app_idx)) + id, vendor, app_idx)) return MESH_STATUS_STORAGE_FAIL; model_bind_idx(node, ele_idx, mod, app_idx); -- 2.26.2