Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp7114362imm; Wed, 27 Jun 2018 20:42:48 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLrekhR2bInbeIEsAI7TtfqV0aq7BPqYfrnW72lXD5eRc636Y8U5vmREWOfApe9GGJr2oIb X-Received: by 2002:a63:7e1a:: with SMTP id z26-v6mr7397709pgc.278.1530157368300; Wed, 27 Jun 2018 20:42:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530157368; cv=none; d=google.com; s=arc-20160816; b=rBcqGI74375WmxRGVYO38obU/PfAoQUCGOgrL2KDPeyQx2O7m7TkoDmJjNDqpg6egl TeqHuTixe2ATEq9Do5QSVa+yRYeyDGjdPxE33LHu4r/cAvM4sbqPxE5jW24uwjV1A5UP B/FIz1/8S+lU/PKcvQWdrWU9TxDsG6oDUZEVMmyd7+xB/J80/rbTZOinuK2vvyoctIL5 Vz4t/wRj74vx/DqsXEaic62Cj+JbOnFhPatqZZCXSa+cM/Ed4XaIXwpqbcwoen/VMXsr ZW3rIOiUso5oAu9Txk+5yPN2QlpI4N46Xkpej8KsZwR4oMw9RIJoPjYdZUfiHMiL/fk3 aWiQ== 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 :arc-authentication-results; bh=8YyjRE7LV5neDPjvWqttPIYs1Siawucb/c6XvJj0sTE=; b=EV05sT+KLxnXLUYkZgYyuaeiyDN/2QjhGdPLBEyh6A9XIoBt6XDPXZxBkqhquxX7x2 2dpLH3pn//KqjI+yUUO7Ww785RbQbEDgRTMUyP0YZWRIlvgJNwiV8uDZjZKCbgsvjmKh 1eG3NELShVRr4+p/i+MqoMIYL4PpjKYmD5jt+lbR7v8CIJCLzIr0mOWyqNSXAV1eqaZ2 TeBtDhcIqTJIEcN18gdRMHFZUsx8+/My6Ewk1aOnF+RZxW+677A9Ge5YgBy1kBtdGMgD 5pRHsxtgxxvb3xcK9nnMOJCtuLes4u/WUwkDllp3H041rr0uCHYXcUSmtgl0JC4Dy5xR I7vg== 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 t69-v6si4942100pgd.271.2018.06.27.20.42.34; Wed, 27 Jun 2018 20:42:48 -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 S932203AbeF1DGU (ORCPT + 99 others); Wed, 27 Jun 2018 23:06:20 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:27293 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752610AbeF1DGS (ORCPT ); Wed, 27 Jun 2018 23:06:18 -0400 X-UUID: 976c98b87fa54939b2a0233404fe0f52-20180628 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1259776088; Thu, 28 Jun 2018 11:06:15 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs02n1.mediatek.inc (172.21.101.77) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Thu, 28 Jun 2018 11:06:13 +0800 Received: from [172.21.77.33] (172.21.77.33) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Thu, 28 Jun 2018 11:06:13 +0800 Message-ID: <1530155173.29697.48.camel@mtkswgap22> Subject: Re: [PATCH v4 6/7] Bluetooth: mediatek: Add protocol support for MediaTek serial devices From: Sean Wang To: Andy Shevchenko CC: Rob Herring , Mark Rutland , Marcel Holtmann , Johan Hedberg , devicetree , , linux-arm Mailing List , "moderated list:ARM/Mediatek SoC support" , Linux Kernel Mailing List Date: Thu, 28 Jun 2018 11:06:13 +0800 In-Reply-To: References: <48215a1276c36af7ad581c3d83759fe9f55e3c4b.1530004712.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 On Wed, 2018-06-27 at 20:04 +0300, Andy Shevchenko wrote: > 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. > > Sure, the default y will be removed > > > >> +#include > >> +#include > >> +#include > >> +#include > >> +#include > >> +#include > >> +#include > > Perhaps alphabetically ordered? > They seem already in alphabetically ordered > + blank line. > A blank line will be added here > > > >> +#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. Label err_pm1 and err_pm2 can be swapped for the readability and this doesn't have any effect on the logic. > 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) > Thanks for your pointing out. I also found that the macro is not being used by anyone, it can be removed freely. > >> +struct mtk_stp_hdr { > >> + __u8 prefix; > >> + __u8 dlen1:4; > >> + __u8 type:4; > > >> + __u8 dlen2:8; > > u8 already 8 bit. > the superfluous :8 for dlen2 will be removed > >> + __u8 cs; > >> +} __packed; >