* [PATCH] Bluetooth: mediatek: Fixed incorrect type in assignment
@ 2019-03-05 0:14 ` sean.wang
0 siblings, 0 replies; 5+ messages in thread
From: sean.wang @ 2019-03-05 0:14 UTC (permalink / raw)
To: marcel, johan.hedberg
Cc: linux-bluetooth, linux-mediatek, linux-kernel, Sean Wang
From: Sean Wang <sean.wang@mediatek.com>
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 <lkp@intel.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] Bluetooth: mediatek: Fixed incorrect type in assignment
@ 2019-03-05 0:14 ` sean.wang
0 siblings, 0 replies; 5+ messages in thread
From: sean.wang @ 2019-03-05 0:14 UTC (permalink / raw)
To: marcel, johan.hedberg
Cc: linux-bluetooth, linux-mediatek, linux-kernel, Sean Wang
From: Sean Wang <sean.wang@mediatek.com>
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 <lkp@intel.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Bluetooth: mediatek: Fixed incorrect type in assignment
2019-03-05 0:14 ` sean.wang
@ 2019-03-18 18:09 ` Sean Wang
-1 siblings, 0 replies; 5+ messages in thread
From: Sean Wang @ 2019-03-18 18:09 UTC (permalink / raw)
To: marcel; +Cc: johan.hedberg, linux-bluetooth, linux-mediatek, linux-kernel
this is just a gentle ping
On Tue, 2019-03-05 at 08:14 +0800, sean.wang@mediatek.com wrote:
> From: Sean Wang <sean.wang@mediatek.com>
>
> 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 <lkp@intel.com>
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> ---
> 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;
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Bluetooth: mediatek: Fixed incorrect type in assignment
@ 2019-03-18 18:09 ` Sean Wang
0 siblings, 0 replies; 5+ messages in thread
From: Sean Wang @ 2019-03-18 18:09 UTC (permalink / raw)
To: marcel; +Cc: johan.hedberg, linux-bluetooth, linux-mediatek, linux-kernel
this is just a gentle ping
On Tue, 2019-03-05 at 08:14 +0800, sean.wang@mediatek.com wrote:
> From: Sean Wang <sean.wang@mediatek.com>
>
> 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 <lkp@intel.com>
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> ---
> 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;
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Bluetooth: mediatek: Fixed incorrect type in assignment
2019-03-05 0:14 ` sean.wang
(?)
(?)
@ 2019-03-19 6:58 ` Marcel Holtmann
-1 siblings, 0 replies; 5+ messages in thread
From: Marcel Holtmann @ 2019-03-19 6:58 UTC (permalink / raw)
To: Sean Wang; +Cc: Johan Hedberg, linux-bluetooth, linux-mediatek, linux-kernel
Hi Sean,
> 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 <lkp@intel.com>
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> ---
> drivers/bluetooth/btmtkuart.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-03-19 6:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-05 0:14 [PATCH] Bluetooth: mediatek: Fixed incorrect type in assignment sean.wang
2019-03-05 0:14 ` sean.wang
2019-03-18 18:09 ` Sean Wang
2019-03-18 18:09 ` Sean Wang
2019-03-19 6:58 ` Marcel Holtmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.