Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4783090ybb; Tue, 14 Apr 2020 14:06:19 -0700 (PDT) X-Google-Smtp-Source: APiQypLb+zhLiIbmaqW0ouodj1oKs5ytR/S9raYQkjnUFWmeXwvzUexjBDbuhxS66leMV1B6oB0S X-Received: by 2002:a17:906:54cd:: with SMTP id c13mr1887990ejp.307.1586898379378; Tue, 14 Apr 2020 14:06:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586898379; cv=none; d=google.com; s=arc-20160816; b=baAtwOMivgwqxVXAK12ptPHCRhMTnjWZbRmfXdhDUCQQLZfBGLSrDJY0t8TAtuSsAW 2KxZ7MsLX8FyYzHMAOaLD+lCASiFN7dNa9o6SNEtU1SQ0nuCVs7IAN9aoTFoKX4K3X1C Y7s5DwVWVaOP26NQkBQ1DEUe13Iw1uPj3/l3jPw6637+l7yt9qp2SSD9wFagmi706Wmb fcmTB/x2OTRfIYpwJPVCSW5uJzxihQLO57NtSfjkJu6eowUL+8O81sLJdiBhbFx1UVfu r3sN8QdH5YDPmtXKvs45XcQOzkRpD2uqJJvfReKaMhncPkeX/yWjq6M6bvUuWlQ1dACn LJLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=FrPpZW/67FvMCf81HynQ34ZVElAUVoMxfBwwvRHldqc=; b=C6EwhFPWg7c4eGOPlJpFd9CqWLyQS4r4AHBgHgzOBr926B35H5Nq2bajxO3mW+aevR e3f9PbR/PhMFlCvwfAPbm7vpbGzFskQnGm7CrIbk1m96el5qSiXGkzbbN6Wptk806IS4 EEoRnOy9PMIwRlCCfAD21Q3omiGSYbkhRQkkns7WhqJWm0NPE1LJAdPFeBReLQ/56rCm ZIzndnd6Fo6AdeoKCP2YEmZU6MtjdlD9cG1zw9Iuc7dPRQ9zZEXbWOtaRvPoEwPMhNao qagfMFUOF+VkSxnUbNGpS7dK9ypgfbV2mwFoFNQc2PcVP1jG+SUf1p24CSonLG572fIm NNMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="H5NA28x/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v1si4918636edw.530.2020.04.14.14.05.41; Tue, 14 Apr 2020 14:06:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="H5NA28x/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732551AbgDMRMv (ORCPT + 99 others); Mon, 13 Apr 2020 13:12:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727981AbgDMRMu (ORCPT ); Mon, 13 Apr 2020 13:12:50 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C483EC0A3BDC for ; Mon, 13 Apr 2020 10:12:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=FrPpZW/67FvMCf81HynQ34ZVElAUVoMxfBwwvRHldqc=; b=H5NA28x/59qsKkhajuuSe6yvaT QDX94bCrmayuMAAS+QILAUHrXuyhxTwkrB3OgOydqUxHJyziPKLKg5PXiKEpUNzLKHg78/IVX1ZHa ho0Ch+1jbQtmyvefXIrSxdEeW0u5ASs6Jw+8OjBlNJ1iAiWkl5krD5Bcb6GjbmbE1fwbYu+gfV7B+ dl1rAmik7YdyJbLY/Bz3z/jyBF4RFt+FUlOavWSTC+KyvJW4AQ0LJBCQvvyZeK9jbg9tN93fQFTzc dg1Jy+Nhs0zyPNxUxZ9HqWwhjM3GT4+WN2YbI2MotLI6ih9IRr0SW/RMJe++d8zkPzaD2OhU8Xw1g EPhemz8Q==; Received: from [2601:1c0:6280:3f0::19c2] by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jO2dd-0006f0-Qr; Mon, 13 Apr 2020 17:12:49 +0000 Subject: Re: [PATCH v2,2/3] driver: rpmon: qmi message version 01 To: Wang Wenhu , gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Cc: kernel@vivo.com References: <20200411095301.18780-1-wenhu.wang@vivo.com> <20200412112405.24116-1-wenhu.wang@vivo.com> <20200412112405.24116-3-wenhu.wang@vivo.com> From: Randy Dunlap Message-ID: Date: Mon, 13 Apr 2020 10:12:49 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20200412112405.24116-3-wenhu.wang@vivo.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi-- On 4/12/20 4:24 AM, Wang Wenhu wrote: > Implements a RPMON_QMI message set for connection checking service. > RPMON_QMI defines its message types modularly. Each rpmon service > binds to a message set and introduced as a module. This version 1.0 > message set could be used for connection checking of remote processors. > > RPMON_QMI messages depend on QCOM_QMI_HELPERS and should be updated > together with QMI related modules, and if so, RPMON_QMI_MAG_V2 would > be introduced as a new module, in parallel with RPMON_QMI_MAG_V1. > > Signed-off-by: Wang Wenhu > --- > Changes since v1: > - Addressed review comments from Randy > > --- > drivers/rpmon/Kconfig | 13 ++ > drivers/rpmon/Makefile | 1 + > drivers/rpmon/rpmon_qmi.h | 77 ++++++++++ > drivers/rpmon/rpmon_qmi_msg_v1.c | 242 +++++++++++++++++++++++++++++++ > 4 files changed, 333 insertions(+) > create mode 100644 drivers/rpmon/rpmon_qmi.h > create mode 100644 drivers/rpmon/rpmon_qmi_msg_v1.c > > diff --git a/drivers/rpmon/rpmon_qmi_msg_v1.c b/drivers/rpmon/rpmon_qmi_msg_v1.c > new file mode 100644 > index 000000000000..3fe6d6a4cf31 > --- /dev/null > +++ b/drivers/rpmon/rpmon_qmi_msg_v1.c > @@ -0,0 +1,242 @@ I am hoping that your patch: [PATCH] soc: qmi: move tlv-micros to header file will eventually allow the .tlv_type constants below to become #define values. Otherwise these changes (patch 2/3) look good. Thanks. > +static struct qmi_elem_info register_req_v01_ei[] = { > + { > + .data_type = QMI_OPT_FLAG, > + .elem_len = 1, > + .elem_size = sizeof(uint8_t), > + .array_type = NO_ARRAY, > + .tlv_type = 0x10, > + .offset = offsetof(struct rpmon_register_req, > + name_valid), > + }, > + { > + .data_type = QMI_STRING, > + .elem_len = RP_NAME_LEN, > + .elem_size = sizeof(char), > + .array_type = NO_ARRAY, > + .tlv_type = 0x10, > + .offset = offsetof(struct rpmon_register_req, > + name), > + }, > + { > + .data_type = QMI_OPT_FLAG, > + .elem_len = 1, > + .elem_size = sizeof(uint8_t), > + .array_type = NO_ARRAY, > + .tlv_type = 0x11, > + .offset = offsetof(struct rpmon_register_req, > + timeout_valid), > + }, > + { > + .data_type = QMI_UNSIGNED_4_BYTE, > + .elem_len = 1, > + .elem_size = sizeof(u32), > + .array_type = NO_ARRAY, > + .tlv_type = 0x11, > + .offset = offsetof(struct rpmon_register_req, > + timeout), > + }, > + { > + .data_type = QMI_EOTI, > + .array_type = NO_ARRAY, > + .tlv_type = QMI_COMMON_TLV_TYPE, > + }, > +}; > + > +static struct qmi_elem_info conn_check_resp_v01_ei[] = { > + { > + .data_type = QMI_OPT_FLAG, > + .elem_len = 1, > + .elem_size = sizeof(uint8_t), > + .array_type = NO_ARRAY, > + .tlv_type = 0x10, > + .offset = offsetof(struct rpmon_conn_check_resp, > + result_valid), > + }, > + { > + .data_type = QMI_SIGNED_4_BYTE_ENUM, > + .elem_len = 1, > + .elem_size = sizeof(enum rpmon_exec_result), > + .array_type = NO_ARRAY, > + .tlv_type = 0x10, > + .offset = offsetof(struct rpmon_conn_check_resp, > + result), > + }, > + { > + .data_type = QMI_EOTI, > + .array_type = NO_ARRAY, > + .tlv_type = QMI_COMMON_TLV_TYPE, > + }, > +}; -- ~Randy