Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp542758imn; Wed, 3 Aug 2022 14:56:51 -0700 (PDT) X-Google-Smtp-Source: AA6agR7DI0lxwRHoZu3eG/l7PrpwFA9O+9bLYNwEcMCIhe5Pzb7GCkCkMbxAVResZRVoVtLk4lGv X-Received: by 2002:aa7:8e91:0:b0:52d:8ebf:29a4 with SMTP id a17-20020aa78e91000000b0052d8ebf29a4mr14958963pfr.1.1659563811143; Wed, 03 Aug 2022 14:56:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659563811; cv=none; d=google.com; s=arc-20160816; b=EPRooZCy6+VRXkTVfRJ698pjIUgNXJbTmt2qnxpzLbgQdEwzuRnJatOicVtsuNh/Ij 2WCoqyytkeBo7CMj92iBvRxaI+axMADThIvyGl40m/0RZNC0Y119tacI/TzamsVySXq1 gr86/n76AHbesPYhGh77QVEP7PfeIqX9HdpiDClCwRCwfuIiEmsT3grfHkKqA4xwoH5h aTnJkSKmSZsDu/ap2JKPUpdjtKUUdUJrzgclKzHQ+gduBnmPuIV0R/lTiufXBa/GFprL cJg9p2NnoFDNCxpnAnmwa0AOXxtlGV9T+5z73alX8Uyln9JmjS5dR1On5o8mXNpd3OoB QQLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=PsUSfkdOdDKpa8omJPWs9MsLgFr8medtUzHBSM7BWGg=; b=j8K5PLXvQl8/iUojYTJrXLy9ilzYnupyEcnf8GrOiegjyonyduPjOwUtGrymyKFBYF KxY+SBrxxBlLjFAxqQmca+kWw+uyz8cCNnaXU6U3eyEJrqO4FuZh2mqv9M8xeQYKLDwO kseWU0ph/NoM5vK4e0HYew/FFtM3Qn/qTn6MWJI4r68Go/6ZxeKBkj89kzJdyPST8f39 DxCcp63/k55wSLzu9xcODOYnFbuEURfrvbb/l6gW3jQTM70/gnYcVrPazFdllMuePW0U slnMMLCURazWwjDyLGH6SidPVD9e+DYNJkZo2BSPXY5+E7pO1WNG/svODmW6fwZouB8T Y6jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=E86Z+P5Y; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x185-20020a6386c2000000b00408c2891a4fsi12224602pgd.710.2022.08.03.14.56.37; Wed, 03 Aug 2022 14:56:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=E86Z+P5Y; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237792AbiHCVzh (ORCPT + 99 others); Wed, 3 Aug 2022 17:55:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230499AbiHCVzd (ORCPT ); Wed, 3 Aug 2022 17:55:33 -0400 Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B94EE6353 for ; Wed, 3 Aug 2022 14:55:32 -0700 (PDT) Received: by mail-pg1-x534.google.com with SMTP id i71so10745737pge.9 for ; Wed, 03 Aug 2022 14:55:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=PsUSfkdOdDKpa8omJPWs9MsLgFr8medtUzHBSM7BWGg=; b=E86Z+P5YSuk1F8py8B1T+80ZDJrJUUxt19WSwk9r4lcBpPVyF8B4nLEmgHOzouRsrP mNICLUNvVIsPYv5bBIbnzhsAjQG3j+Ob3+D7B2TM+MfOHjjntnNISPOOrXMsR2bYfH/o DxFJKm7KY0KujjIKOxbstePhHopvNro4Y1/e37M4GVFKTp4sqqgGJgO/4zgLzVb1bvpV GOrt2NyS8mOpQ4pkoufM31pGAsqNMsLL+D27bL5pjJxhO1axzz+X/Xv6ZRVW4uNGRm/q i59WYOuUYqYQ19SCNdMsM5otGrxMgv0kNcqz/ErgsXK9tIpWOjSJZR4DdIFZ3fLBZU67 aMfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PsUSfkdOdDKpa8omJPWs9MsLgFr8medtUzHBSM7BWGg=; b=XB6tQdC5s/O0k7usGVS/e44Ffry1FOYwSmx6vS3X28UBbIWurHVqGMAKO9ZIsDXGml b4qhcA0VGCCdTuZV7ZZkNDoVZYXXa8qe/7BgtX+cT8zUU5E92wGQabTJ4kGc8JD1mBmt Oiwg48B/gMmiccstQey13vgYFZQqbItxWReSp8aR5loVZ6Enw2Fr4h5JkCsDLcZHgieO 49n+i8MISGQI7unI7l4rWg/6rW1xJMw3oB0oH4WbxgKxyDF20q5KJEX4heTpuHL3AQ6Z TfJ6Qc0Ng/DSHU/VgV/pqk0p8L7llQSBAKH/XC3eAkfbhc0vGrioMYeo/ySi8wJxzWPD jigQ== X-Gm-Message-State: AJIora+gqmRRdfHXmpiepCqoNFl3Mkn5bJhLTho7IuXIzmhk5Qm6w53a Zdj4z/eIb8dcJHqZYS2ub4EoEC6+2zSW0Q== X-Received: by 2002:a63:1259:0:b0:41b:5589:fa8f with SMTP id 25-20020a631259000000b0041b5589fa8fmr22260178pgs.481.1659563731714; Wed, 03 Aug 2022 14:55:31 -0700 (PDT) Received: from lvondent-mobl4.. (c-71-56-157-77.hsd1.or.comcast.net. [71.56.157.77]) by smtp.gmail.com with ESMTPSA id l11-20020a170903244b00b0016bedcced2fsm2494052pls.35.2022.08.03.14.55.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Aug 2022 14:55:30 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH 2/2] Bluetooth: MGMT: Fixes build warnings with C=1 Date: Wed, 3 Aug 2022 14:55:27 -0700 Message-Id: <20220803215527.3070932-2-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220803215527.3070932-1-luiz.dentz@gmail.com> References: <20220803215527.3070932-1-luiz.dentz@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Luiz Augusto von Dentz This fixes the following warning when building with make C=1: net/bluetooth/mgmt.c:3821:29: warning: restricted __le16 degrades to integer net/bluetooth/mgmt.c:4625:9: warning: cast to restricted __le32 Fixes: 600a87490ff98 ("Bluetooth: Implementation of MGMT_OP_SET_BLOCKED_KEYS.") Fixes: 4c54bf2b093bb ("Bluetooth: Add get/set device flags mgmt op") Signed-off-by: Luiz Augusto von Dentz --- net/bluetooth/mgmt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 11eb6e538518..cf393d7c6e87 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -3818,7 +3818,7 @@ static int set_blocked_keys(struct sock *sk, struct hci_dev *hdev, void *data, hci_blocked_keys_clear(hdev); - for (i = 0; i < keys->key_count; ++i) { + for (i = 0; i < key_count; ++i) { struct blocked_key *b = kzalloc(sizeof(*b), GFP_KERNEL); if (!b) { @@ -4623,8 +4623,7 @@ static int set_device_flags(struct sock *sk, struct hci_dev *hdev, void *data, u32 current_flags = __le32_to_cpu(cp->current_flags); bt_dev_dbg(hdev, "Set device flags %pMR (type 0x%x) = 0x%x", - &cp->addr.bdaddr, cp->addr.type, - __le32_to_cpu(current_flags)); + &cp->addr.bdaddr, cp->addr.type, current_flags); // We should take hci_dev_lock() early, I think.. conn_flags can change supported_flags = hdev->conn_flags; -- 2.37.1