Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp2852406imb; Mon, 4 Mar 2019 16:17:00 -0800 (PST) X-Google-Smtp-Source: APXvYqztcU2R7Rri+5RfXLjYAMyX5jskJ2GgwKGHo9MSOdkbVOGWt+XuGFFrh15rg05R3axV4sRi X-Received: by 2002:a17:902:d20b:: with SMTP id t11mr5777823ply.318.1551745020348; Mon, 04 Mar 2019 16:17:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551745020; cv=none; d=google.com; s=arc-20160816; b=PDHbjFenqEsV3Buz56lC0JgTD/EWFfCAg/cwtzf4hnsUel5HsHnJqJXNzRSQ6/ggNJ VHtKqKLV0UYdW0vOltZzExIibLHyXSSgDGSF2D5knwZYtn5V0jjq5cxliSJ1NMh5rMRK 74/00Gs85xtm4/OOYGZoyjDvNBcZXgudGNm71RR/Q6hde6T0af2WntM71KT2NIQd/0kY zTfBnNOd40DI7JKaRCr+OEmMayTfzJCdraJ7h32mAP44V47gUl6485DmVTBgFZ/jb3+P PurRlffBqUWPTAsjL9rDxY5kUcVZ0qeyWUbi2DNvxGuQN0ZXsjhVd/PXQ0DYjIaAh3Yb DDVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=k9eUstHK831JrHfJc8nMm1ssayaFVkrfXX98XXtnf/0=; b=KeGHWDJmFDCaf+VE/v7uf2VpU1nFPUDlFFguAqPxjqQjnamDFqdky0LwNBA0PGv146 atXi5MjvgrWvstIns5uoPTc2y/UGh3T0w1591z2ZjW2JfEXXgfqZSQcnVN6DnKCzBv9g a//B9jFmRXg5GV4DQS8wrG662XOlV1UiC6b8mVzOXa8+QPZxMmbFq+1r9uf/sAya3KTB Wjj7xEwoMn4YqIQCsNAZzwNSvjlzVcY2P3i8sAPdGxGVR7l++NTxMkGsUCDWTt9QcqRc UkWVvrN7tF8OGhDFAadthk5YJDmOwMkd7vhKXhFCakRj06Hx1JHvOeARr7N3gCeCyKFv hu2A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 u69si6415400pgd.161.2019.03.04.16.16.44; Mon, 04 Mar 2019 16:17:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726716AbfCEAOj (ORCPT + 99 others); Mon, 4 Mar 2019 19:14:39 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:19635 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726080AbfCEAOj (ORCPT ); Mon, 4 Mar 2019 19:14:39 -0500 X-UUID: be3e14bc7c32431289a16721a5bc2951-20190305 X-UUID: be3e14bc7c32431289a16721a5bc2951-20190305 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1835173269; Tue, 05 Mar 2019 08:14:28 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 5 Mar 2019 08:14:26 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 5 Mar 2019 08:14:26 +0800 From: To: , CC: , , , Sean Wang Subject: [PATCH] Bluetooth: mediatek: Fixed incorrect type in assignment Date: Tue, 5 Mar 2019 08:14:25 +0800 Message-ID: <64582ec6b953c055bc3cf18e7bba18d578f03b0a.1551744635.git.sean.wang@mediatek.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 83DDCD9DC19CF944796B647AB9E57D80D8BF860060EB7E1CE02B58FE7FC15B492000:8 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sean Wang Fixed warning: incorrect type in assignment reported by kbuild test robot. The detailed warning is shown as below. make ARCH=x86_64 allmodconfig make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' All warnings (new ones prefixed by >>): btmtkuart.c:671:18: sparse: warning: incorrect type in assignment (different base types) btmtkuart.c:671:18: sparse: expected unsigned int [usertype] baudrate btmtkuart.c:671:18: sparse: got restricted __le32 [usertype] sparse warnings: (new ones prefixed by >>) btmtkuart.c:671:18: sparse: warning: incorrect type in assignment (different base types) btmtkuart.c:671:18: sparse: expected unsigned int [usertype] baudrate btmtkuart.c:671:18: sparse: got restricted __le32 [usertype] vim +671 drivers/bluetooth/btmtkuart.c 659 660 static int btmtkuart_change_baudrate(struct hci_dev *hdev) 661 { 662 struct btmtkuart_dev *bdev = hci_get_drvdata(hdev); 663 struct btmtk_hci_wmt_params wmt_params; 664 u32 baudrate; 665 u8 param; 666 int err; 667 668 /* Indicate the device to enter the probe state the host is 669 * ready to change a new baudrate. 670 */ > 671 baudrate = cpu_to_le32(bdev->desired_speed); 672 wmt_params.op = MTK_WMT_HIF; Fixes: 22eaf6c9946a ("Bluetooth: mediatek: add support for MediaTek MT7663U and MT7668U UART devices") Reported-by: kernel test robot Signed-off-by: Sean Wang --- drivers/bluetooth/btmtkuart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bluetooth/btmtkuart.c b/drivers/bluetooth/btmtkuart.c index b0b680dd69f4..f5dbeec8e274 100644 --- a/drivers/bluetooth/btmtkuart.c +++ b/drivers/bluetooth/btmtkuart.c @@ -661,7 +661,7 @@ static int btmtkuart_change_baudrate(struct hci_dev *hdev) { struct btmtkuart_dev *bdev = hci_get_drvdata(hdev); struct btmtk_hci_wmt_params wmt_params; - u32 baudrate; + __le32 baudrate; u8 param; int err; -- 2.18.0