Return-Path: MIME-Version: 1.0 In-Reply-To: References: <48215a1276c36af7ad581c3d83759fe9f55e3c4b.1530004712.git.sean.wang@mediatek.com> From: Andy Shevchenko Date: Wed, 27 Jun 2018 20:04:19 +0300 Message-ID: Subject: Re: [PATCH v4 6/7] Bluetooth: mediatek: Add protocol support for MediaTek serial devices To: sean.wang@mediatek.com Cc: Rob Herring , Mark Rutland , Marcel Holtmann , Johan Hedberg , devicetree , linux-bluetooth@vger.kernel.org, linux-arm Mailing List , "moderated list:ARM/Mediatek SoC support" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" List-ID: On Wed, Jun 27, 2018 at 7:59 PM, Andy Shevchenko wrote: > On Wed, Jun 27, 2018 at 8:43 AM, wrote: >> From: Sean Wang >> > >> +config BT_HCIBTUART_MTK >> + tristate "MediaTek HCI UART driver" >> + depends on BT_HCIBTUART > >> + default y > > Perhaps it's an overkill for users which would like to have less > amount on stuff in kernel. > > >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include Perhaps alphabetically ordered? + blank line. > >> +#include >> +#include >> + /* Enable the power domain and clock the device requires. */ >> + pm_runtime_enable(dev); >> + err = pm_runtime_get_sync(dev); >> + if (err < 0) >> + goto err_pm2; Should be err_pm1 here. Yes, that's correct. >> +err_pm1: >> + pm_runtime_put_sync(dev); >> +err_pm2: >> + pm_runtime_disable(dev); >> +#define MTK_WMT_CMD_SIZE (MTK_WMT_HDR_SIZE + MTK_STP_HDR_SIZE + \ >> + MTK_STP_TLR_SIZE + HCI_ACL_HDR_SIZE) It would look slightly better if you start on new line like #define FOO \ (BAR + BAZ) >> +struct mtk_stp_hdr { >> + __u8 prefix; >> + __u8 dlen1:4; >> + __u8 type:4; >> + __u8 dlen2:8; u8 already 8 bit. >> + __u8 cs; >> +} __packed; -- With Best Regards, Andy Shevchenko