Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp6635086imm; Wed, 27 Jun 2018 10:38:12 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKFG073gjAQnfyyPj8W9OmSluMT72Vwei1yGQFWwOOwBl1Upzl4wwoxteCoQ2bPy1yuNSPw X-Received: by 2002:a17:902:70ca:: with SMTP id l10-v6mr7076503plt.174.1530121092762; Wed, 27 Jun 2018 10:38:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530121092; cv=none; d=google.com; s=arc-20160816; b=vq3MICVne6EYuHf5VQ9o/bbTjTdYtIXSfnjOs+cQoktlWDwRIuosa9pf5iC07ZlJtt wUcXzE8PM5BKKu/fWezyS/xYyJNxhTyVSPcLwmgd3Ejf2V8efWOv4WtZu1g3IcSg8SAh hIqZvBy+fDKbOawmCBi42fN+SoplK604CZSyEWdBJs2mILlwyn1OeDUWTEXPsH6nnP19 tUeQbA51ieidrOPGiZxTJdF4XZ+w5WAHhgreQsoJ1URUiBzz+wHrhjGROfV/5vsG+Lkc 9aW1D6NY1xzdhzb9xZlFfTO0Eg6xLy4wFhXKtVg5zS9IhMWi+8QPF7FSk9BlLB5s/qIM Jo+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=Eb2CDgcTxJ/3wGjZRxkI3B7IMLAzT9G+KhUVn1k1mnk=; b=vTnQBql2VP3OCwFUVD5QkTWop8ctfTZmUWXT1AKI18wtQhOwqZ/Dsol5OhWSPkhkD8 VKANdOxxtRAwcmi8S0fcH9kwKHAUndJaIOMz0n3/rID0jiMCoTlUUTtFYYHV1iPfoa5W lWq6CWepvlxucZfgzT0YoxSyGTAGzlWZ9pFY8V8hVa7MSoLxItMCcnXOGQI/TpI/LJP6 YzUHURb0h6UJ5wSFQk0qWK2Q5yExJ7c59E1bFxcXZ/xPZSeu9njlXBnnfGB2723HFViu 1Nylsn9CsEA4c7FcQ9WcOWQS+6F7ElbSstjObHPmVUaf1mtTa6l4tFO5v2EdElGMT1ef cdKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HrXIKl+J; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j66-v6si4539844pfc.243.2018.06.27.10.37.58; Wed, 27 Jun 2018 10:38:12 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HrXIKl+J; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934760AbeF0REY (ORCPT + 99 others); Wed, 27 Jun 2018 13:04:24 -0400 Received: from mail-vk0-f65.google.com ([209.85.213.65]:37337 "EHLO mail-vk0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934411AbeF0REV (ORCPT ); Wed, 27 Jun 2018 13:04:21 -0400 Received: by mail-vk0-f65.google.com with SMTP id h22-v6so1604737vke.4; Wed, 27 Jun 2018 10:04:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Eb2CDgcTxJ/3wGjZRxkI3B7IMLAzT9G+KhUVn1k1mnk=; b=HrXIKl+JXN44kBDxaS1ExBwgmRd7rO/eCeWT1gIsfXNd5g0Do+r9n5UwjGBaam7JA0 8Go5H03JNi5HsfI0E0+RvFQxSNHvHlzYRWVLEW5/FXVnqrRHFUT8dxqGu2kFFIxGnFVT PI6HcDrSUP9xsgvL3ejRlKfETPN0Wisz/2WIrm2nMnW6a82R4O8CxtIsOOLz4XZWAd6v HNJzoluCTQjZgvXp6xeFWV+ylyI2LtK8SE/5OC0osr1WJ9Vp6zj9bX+eTQIEVyajAV6x xbVMYsxttSaP80Uo+3Ru6wq1DnoiEp/N8Xs4hd8wL4VORIo1681teDG5PiMsPqzGWKEQ ymYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Eb2CDgcTxJ/3wGjZRxkI3B7IMLAzT9G+KhUVn1k1mnk=; b=L47RyggVN7E2/bfT9wwAcC/3sKn4IsIYvHclNp1O/OMiXeYcHeStYv019WNdsRgiwC T6YRXxbC4P8dOBK08foE7PTwlydfV15Ev8dtjSXlvdoWPFwl2NGdTwZHdYNpdBApJwse bYXInSSEOm1iS1ePtCA5YSB9H+l5L0SLwUigUSYUEgMQOe7DfMnsrf+0AmJKLJbcVE3p 6hS/DMs72nYzD1LTW4tnNKpjooSIMrthIXIGQB+fAWbPafsUYX0f6tZsMP/8m6vUeNb5 Qv9A3WGDRKQxI02tqSr5UTyWmqnbHz7ub8hgcq3uol5TyPkb7+Pgen91RBeFa5LGLJG/ S4gQ== X-Gm-Message-State: APt69E3QUBi8hSpj/C0sP9+AMgLWAFqEoumJsjovPbYFwQ3C8ys9fEob NpzRBulsiO48U76ZGw0ONhYzKEw5UR2WA0N1EVE= X-Received: by 2002:a1f:8e0f:: with SMTP id q15-v6mr4428918vkd.161.1530119060260; Wed, 27 Jun 2018 10:04:20 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a67:8b02:0:0:0:0:0 with HTTP; Wed, 27 Jun 2018 10:04:19 -0700 (PDT) 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" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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