Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp655418img; Mon, 18 Mar 2019 11:11:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqwNZu3ZimCqIeFQevAvDnVUIdsLLGo2io2dvoZw9hgwNwxFmouvbWpErUsg+izYfZvl9BXm X-Received: by 2002:a17:902:8d97:: with SMTP id v23mr20523786plo.274.1552932695783; Mon, 18 Mar 2019 11:11:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552932695; cv=none; d=google.com; s=arc-20160816; b=FSWvSTy4vu5/MT6tl/0qKCCB4X68wwn6EwOKlHAJX5MaFYYf98joJCfiHRKfHArNAE X+XrQaFatpPZY22pqmKt+8VoxYcHK2CnlawYxr5uu7w1DFk2fuK6GcR4Jd0puj8gscgX xOFbswIvaERsVcQkfW2rcPc1Yq0W86TfB+uU5uymRxbvcyv8Ei8UliTl2B1h8669Tg1T fstGJVAkWAXbtvNMUtNLqDuS9lceMyQ3+P2e71Is0Hw7gO+MMtvD0qoFU9WhfAhaQAJt +i6c6ihOCInhO2qYTXuPYxnpJgxcYuwQGePSczkGdWSjrpEMEHqwGq0ZpVTowIDSgPBE h0jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id; bh=UjhvQowzrO2YkWoJcQjzJW+7orD58jjPX5Fl7D8NirY=; b=Fj0adCgJ/X1LhVrYSXSRB96QhX4sR4XcGUtlIMvB/r6xL2TL2k/lD5xeotyDksEb+m SAZontJ7RLK6M87Kf+4UePTxCJH15LjD5jmfICh4szzPuBs3D3v/ILxOOUJRmqegIcK7 hJrbTcBk/ciJ3WHgFdZpEfUyoRPQadp0kLud+SGGThO0D3NAABIa6dL3WSbAV7v+B0iW KNi7hN6PJTRMMTSTyDGyOmpdlhfwTEn5MZHrmWv/xxUjPO+E/NAfl1eDpNuvKrWGdYgz rOexGkW2lN7ta8FP5NzoznYbVAXrJbXD3d7fJxCdyLXyf/UwFVlXv/PiTTDiDsUwDElq Y56Q== 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 71si9724274pga.16.2019.03.18.11.11.20; Mon, 18 Mar 2019 11:11:35 -0700 (PDT) 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 S1727430AbfCRSKB (ORCPT + 99 others); Mon, 18 Mar 2019 14:10:01 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:42957 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726623AbfCRSKB (ORCPT ); Mon, 18 Mar 2019 14:10:01 -0400 X-UUID: 20acd802dfe1416aba12753549c69d15-20190319 X-UUID: 20acd802dfe1416aba12753549c69d15-20190319 Received: from mtkmrs01.mediatek.inc [(172.21.131.159)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 695494746; Tue, 19 Mar 2019 02:09:54 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs05n2.mediatek.inc (172.21.101.140) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 19 Mar 2019 02:09:53 +0800 Received: from [172.21.77.33] (172.21.77.33) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 19 Mar 2019 02:09:52 +0800 Message-ID: <1552932593.24944.14.camel@mtkswgap22> Subject: Re: [PATCH] Bluetooth: mediatek: Fixed incorrect type in assignment From: Sean Wang To: CC: , , , Date: Tue, 19 Mar 2019 02:09:53 +0800 In-Reply-To: <64582ec6b953c055bc3cf18e7bba18d578f03b0a.1551744635.git.sean.wang@mediatek.com> References: <64582ec6b953c055bc3cf18e7bba18d578f03b0a.1551744635.git.sean.wang@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org this is just a gentle ping On Tue, 2019-03-05 at 08:14 +0800, sean.wang@mediatek.com wrote: > 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; >