Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp808685ybl; Wed, 11 Dec 2019 07:50:30 -0800 (PST) X-Google-Smtp-Source: APXvYqyx3OQaUgE+a2QYpGZ9nwEx4NZStnwWnC0qCzw+4KJ5TeLd7yOVCeZzJ4oO/2ownF08m3jG X-Received: by 2002:aca:cf58:: with SMTP id f85mr3394562oig.6.1576079430228; Wed, 11 Dec 2019 07:50:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576079430; cv=none; d=google.com; s=arc-20160816; b=GTy3QIA8dghCT0LYENe7J4X1tJIU2usfArXiUB3qjazChR0Hid/2y3nicajv5bTK0i 6rdjfDo2AUZTl3w8z7NMh8HQ8cxN4ZBtpMnjlgLpEr/VtDL2ARY1Hde5RZ8FhQbzi5Zi ErIvgrTig8vhkW/dqC1DuvRCgsQI7P+9BTmc4+j82IBwMGsQX6J793Oe/+3lIQpshiMg x1VDN0e2+K4lalQbQBP7ixhGECLd5gvvajoy2zsPYuUVS2AbijEzcelQWVcPgkWg1nRt NJmYbA7NjUMIJYkSvWZq/LnJujCQsS7/mRo/Ynf5Xob4nHkVl+gVkrNCcb417WORtQLb XCAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:date:from :dkim-signature; bh=sTBB2t6rKSXBONEhd/znnnhumhrJUK9npg8h8UNSDc8=; b=PhNOuq/+5TDD9IT2LufZ5OR3TWb6CEfOq6cyPooB3ZFX8VlHNdbn+aFHIn19ca5wWm Jg0wT/Ybnjq4ZqLTkPbP1swl5qt4Xigjm0fVxADfdKg/2CYT0WpZA5pdI0mUNmLaGTzR kIYqKpBBVQS3oxcP0/39I4YKu6O7PJmJb/6BRBMTIHEZPYRSx2FdrEaMdBkC+oQrxx78 K1XSxLJdUgjzEjNw/+Zz3UNoVN+AAIOO3MP1GKEprCdWUTOlrNnTwgUC3qmqYnTz3NW1 nTXBmkGBSE9iZPj8Xww7/mHscu4QKPW/WDy0f5Fmc6KQ89En9PihSQzpx5mk210vB73Y eHyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=JjnZAH5O; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n2si1264479otk.177.2019.12.11.07.50.17; Wed, 11 Dec 2019 07:50:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=JjnZAH5O; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730107AbfLKPs3 (ORCPT + 99 others); Wed, 11 Dec 2019 10:48:29 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:46659 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732172AbfLKPs2 (ORCPT ); Wed, 11 Dec 2019 10:48:28 -0500 Received: by mail-lj1-f196.google.com with SMTP id z17so24555034ljk.13 for ; Wed, 11 Dec 2019 07:48:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silvair-com.20150623.gappssmtp.com; s=20150623; h=from:date:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=sTBB2t6rKSXBONEhd/znnnhumhrJUK9npg8h8UNSDc8=; b=JjnZAH5O8aHDzEgg9j5GVnPpAPmLgw46304TfjEUFDSC0/gB7iGvxnKQefnlNMrhO+ 7Z4aMZAZha4IyS7mNhcN15BC74zooXPMD4TrsVLiWWosKIv9HhtitZF0ntub94enCeKp ILtoOwWwZHuTZ4EyX1RyfTrOMN+TsLEwZZnGXFFCX8I/YYHbZzlAAqsxYlJQADt3JnCr MfF541gRrHT78Qyfmc9bO5MU6xgV+xJJHC2Y4nassMT6Yl8Z43jGfvx+06rsg7BEpTZF j7MCZN3+YVSQwU3reFQY4AN0slggrrvyo5TWZNwJdh3UoldW/k4RGEKQjz+dj8TKUrin LcWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=sTBB2t6rKSXBONEhd/znnnhumhrJUK9npg8h8UNSDc8=; b=Qohc8KII84Sw2TCro2ByJckDdPP+UZ5Iey5n+pLlOcJApgqJaPgrcbOuzNNtmXGb0l uRFVkPsKxUbFd9/4SyahFCyqeKSeC7I5PeRZXegeG9tC86ga+izYZvaEqjADyxTC6g9C fsUYjNrUK83NWaSoYYaldGi0NIxxFeUIRX+r1sPJo/N2tYLfVETDCPk3+/L6x212exJb AezDf5nFnv6IqGrQuvraYwYQ8aGjl/V2n5T7ju2+iI+7Nzwzo2lFC2vXY37hPb7Jy7sO bSljyAqyrXPIj8+lLwOoWQNMCqTciwd+Qm2o8AtaPU4cOm2Okm/bF6ruZQ2FfVkmQs7Q Eg4w== X-Gm-Message-State: APjAAAV5ojPNjD3egtZMt8Zu7rTAHaOSMZNy4eNyFRTD4AWLnPfVKjTn TXMW5W6z0Smt7v91G+DazrDGtNUsO9QZuQ== X-Received: by 2002:a2e:9987:: with SMTP id w7mr2569122lji.107.1576079305615; Wed, 11 Dec 2019 07:48:25 -0800 (PST) Received: from mlowasrzechonek2133 ([217.153.94.18]) by smtp.gmail.com with ESMTPSA id a9sm1395663lfk.23.2019.12.11.07.48.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 07:48:25 -0800 (PST) From: "=?utf-8?Q?Micha=C5=82?= Lowas-Rzechonek" X-Google-Original-From: =?utf-8?Q?Micha=C5=82?= Lowas-Rzechonek Date: Wed, 11 Dec 2019 16:48:23 +0100 To: Inga Stotland Cc: linux-bluetooth@vger.kernel.org, brian.gix@intel.com Subject: Re: [PATCH BlueZ 2/3] mesh: Clean up node.c Message-ID: <20191211154823.b4hwkqor5awnxpat@mlowasrzechonek2133> Mail-Followup-To: Inga Stotland , linux-bluetooth@vger.kernel.org, brian.gix@intel.com References: <20191206205749.12918-1-inga.stotland@intel.com> <20191206205749.12918-3-inga.stotland@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20191206205749.12918-3-inga.stotland@intel.com> User-Agent: NeoMutt/20180716 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Inga, On 12/06, Inga Stotland wrote: > @@ -876,8 +902,6 @@ uint16_t node_generate_comp(struct mesh_node *node, uint8_t *buf, uint16_t sz) > { > uint16_t n, features; > uint16_t num_ele = 0; > - uint8_t *cfgmod_idx = NULL; > - > const struct l_queue_entry *ele_entry; > > if (!node || !node->comp || sz < MIN_COMP_SIZE) > @@ -940,9 +964,6 @@ uint16_t node_generate_comp(struct mesh_node *node, uint8_t *buf, uint16_t sz) > mod_id = mesh_model_get_model_id( > (const struct mesh_model *) mod); > > - if (mod_id == CONFIG_SRV_MODEL) > - cfgmod_idx = &ele->idx; > - > if ((mod_id & VENDOR_ID_MASK) == VENDOR_ID_MASK) { > if (n + 2 > sz) > goto element_done; > @@ -988,9 +1009,6 @@ element_done: > if (!num_ele) > return 0; > > - if (!cfgmod_idx || *cfgmod_idx != PRIMARY_ELE_IDX) > - return 0; > - > return n; > } Note that this cause the daemon to no longer reject applications that declare presence of Config Server Model on non-primary element. -- Michał Lowas-Rzechonek Silvair http://silvair.com Jasnogórska 44, 31-358 Krakow, POLAND