Received: by 10.192.165.148 with SMTP id m20csp1883838imm; Sat, 28 Apr 2018 07:29:45 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp4/lELAdYsVaBRZu7uVhQtucOKmzlsr+lHaa5pdisn13uRcNdEqYSdTf+fIX8SGxCh8apd X-Received: by 10.98.92.129 with SMTP id q123mr5978270pfb.252.1524925785760; Sat, 28 Apr 2018 07:29:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524925785; cv=none; d=google.com; s=arc-20160816; b=0d9AnRVjjC0FCI2j5ZU4Cj9RNKdvl1m2Rf9PO1DVhb/pCbLUBgiLP07zeeQzg7Eon8 bkP0d+MtlMxK9XTva7LRsjEcSD/76IlGhFAkO6SQlHwuMpR0Xa3zxYNOwL69rPEN8Y+j uu8CqCrKvof3KnktM4QpHDwhvj/Zll00YenjNte8b2RhpjDGNnrpTMK4/YUo6LsWaN9k Xcafj7bPAA2EtiXKZAYvGTqBidkcL6pLtsPUAndQEdmlr0lV9D6VOg54UclAJjJH5OvR Oozx6MkHJsEgPd59Yl6ZzANIP/bWdbBF7ff7DifSPVdGaeAXa/kS8uVj2tyrk1da+9nl HQug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=CDWjnad+YP8nZEVvEes6lb8wHPwDtoykdLtH9Mnqkjk=; b=PVBCuRTFdHt2rF3B8ojzr8+QQmFShflapTC3r8eNzlmiipsfRiWg9FqHUSbZy8BbDv ieq1BHljGX/cPC22w6K57B/Zmpx8DrqjaQx/Seo0DhXvC00Zvjwp2P5OJCk5gZ93rD3q yLhSteFsCXGjIyUpsgjWy0qaIdbfF4y9j+rvfyGfTBXV2wqskTOYBPvQLCsWVUm78En9 stiUdhY3pz7vQRZMpeveQlrCo1FWcpK1cel7OYHhYRXcWeXVwdpwdIMSZ2UHhDpflsqH 8U4UCA0EavHI09A6cMF8RAs3Anc+s00qVeJFMyIIZkgMejgly9sYbnSuHXg0Lj52OxWM ELKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=PIytoDb0; dkim=pass header.i=@codeaurora.org header.s=default header.b=BI+wow7/; 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 w33-v6si3509852plb.431.2018.04.28.07.29.31; Sat, 28 Apr 2018 07:29:45 -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=@codeaurora.org header.s=default header.b=PIytoDb0; dkim=pass header.i=@codeaurora.org header.s=default header.b=BI+wow7/; 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 S1752364AbeD1O2W (ORCPT + 99 others); Sat, 28 Apr 2018 10:28:22 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:38710 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751395AbeD1O2U (ORCPT ); Sat, 28 Apr 2018 10:28:20 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id B3D7D60556; Sat, 28 Apr 2018 14:28:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1524925699; bh=3OmnsoQSo5oVw2taPmhfO0eEgAwkDwOVg+8nf+Z+9l0=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=PIytoDb0aKhNtaF+zKrG1VlUUvY54z0RUfmdjgtq2gdOTAgV76aEBfbBbHNeIzYay bH2zVSaxOkcm7dQaYfjYhf/IGF4oh2LVGL4nRuZvwXPjSGs3rZsWuYRU33vETtqZA1 x34QiqqKn/SL5JzBpNTCjh8zX9eTLJWu9nSjxB80= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.46.162.58] (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sdias@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id A0A8E60556; Sat, 28 Apr 2018 14:28:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1524925698; bh=3OmnsoQSo5oVw2taPmhfO0eEgAwkDwOVg+8nf+Z+9l0=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=BI+wow7/R/sfRSMC8NnQ0LYbttZEDG3Ofe05zBkq7ybocDtHmci/QGaQdqLylTjyF YaMxFll8rwTPz+kUIt5w+2DM1gqTK4mykliN84VMVvGcZtd5sI9xS2kJI6IugBZn+l o0GqGmONB/6xzrxpcZHunCEQohMys6ft1Q+QmxUo= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org A0A8E60556 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sdias@codeaurora.org Subject: Re: [PATCH v1 1/4] mhi_bus: core: Add support for MHI host interface To: Greg Kroah-Hartman Cc: Arnd Bergmann , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Tony Truong References: <1524795811-21399-1-git-send-email-sdias@codeaurora.org> <1524795811-21399-2-git-send-email-sdias@codeaurora.org> <20180427072211.GA6735@kroah.com> From: Sujeev Dias Message-ID: <71afaf61-4f93-8ebd-bcef-5b1a391890d4@codeaurora.org> Date: Sat, 28 Apr 2018 07:28:17 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20180427072211.GA6735@kroah.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks for quick feedback On 04/27/2018 12:22 AM, Greg Kroah-Hartman wrote: > On Thu, Apr 26, 2018 at 07:23:28PM -0700, Sujeev Dias wrote: >> MHI Host Interface is a communication protocol to be used by the host >> to control and communcate with modem over a high speed peripheral bus. >> This module will allow host to communicate with external devices that >> support MHI protocol. >> >> Signed-off-by: Sujeev Dias > No one else has ever reviewed this code before? That's not good, please > at the very least, have someone else at your company go over it first. > I don't want to be the ones having to point out all of the "obvious" > issues :) > This code has gone thru rigorous code review and testing, before I submit next patch I will have multiple people sign off on it. >> --- >> Documentation/00-INDEX | 2 + >> Documentation/devicetree/bindings/bus/mhi.txt | 141 +++ >> Documentation/mhi.txt | 235 ++++ >> drivers/bus/Kconfig | 17 + >> drivers/bus/Makefile | 1 + >> drivers/bus/mhi/Makefile | 8 + >> drivers/bus/mhi/core/Makefile | 1 + >> drivers/bus/mhi/core/mhi_boot.c | 593 ++++++++++ >> drivers/bus/mhi/core/mhi_dtr.c | 177 +++ >> drivers/bus/mhi/core/mhi_init.c | 1290 +++++++++++++++++++++ >> drivers/bus/mhi/core/mhi_internal.h | 732 ++++++++++++ >> drivers/bus/mhi/core/mhi_main.c | 1476 +++++++++++++++++++++++++ >> drivers/bus/mhi/core/mhi_pm.c | 1177 ++++++++++++++++++++ >> include/linux/mhi.h | 694 ++++++++++++ >> include/linux/mod_devicetable.h | 11 + >> 15 files changed, 6555 insertions(+) > And a 6555 line patch is a bit hard to consume all at once. Can't this > be split up into much more reviewable chunks? Look at how some of the > other new bus subsystems got added to the tree recently. They were > submitted in longer patch series, but smaller sized patches > individually. That makes things much easier to review. > > For example, there is no reason your debugfs stuff needs to be in this > initial patch. That should be in a separate one, right? Same for > firmware download. Please take the time to break this up into logical > steps. > > Like my son's math teacher keeps telling him, "show your work, not just > an answer at the bottom of the page". > > Also, it is required by the DT maintainers to split that file alone up > into a separate patch to be even considered for merging. > > One thing I can tell you right now that isn't acceptable: That is interesting because internally it's separated, and I squash them thinking it was preferred. I will separate them out to functional blocks >> +#ifdef CONFIG_MHI_DEBUG > Don't have a separate config option for debugging. No one will enable > it, which makes it pointless. Everything has to be dynamic these days. Intention was to completely compile out MHI_VERB messages because we have those messages in data path. For release build, we wanted to reduce as much mips as possible. However, for debugging these messages are extremely helpful. I will look into tracepoints... >> + >> +#define MHI_VERB(fmt, ...) do { \ >> + if (mhi_cntrl->klog_lvl <= MHI_MSG_LVL_VERBOSE) \ >> + pr_debug("[D][%s] " fmt, __func__, ##__VA_ARGS__);\ >> +} while (0) >> + >> +#else >> + >> +#define MHI_VERB(fmt, ...) >> + >> +#endif >> + >> +#define MHI_LOG(fmt, ...) do { \ >> + if (mhi_cntrl->klog_lvl <= MHI_MSG_LVL_INFO) \ >> + pr_info("[I][%s] " fmt, __func__, ##__VA_ARGS__);\ >> +} while (0) >> + >> +#define MHI_ERR(fmt, ...) do { \ >> + if (mhi_cntrl->klog_lvl <= MHI_MSG_LVL_ERROR) \ >> + pr_err("[E][%s] " fmt, __func__, ##__VA_ARGS__); \ >> +} while (0) >> + >> +#define MHI_CRITICAL(fmt, ...) do { \ >> + if (mhi_cntrl->klog_lvl <= MHI_MSG_LVL_CRITICAL) \ >> + pr_alert("[C][%s] " fmt, __func__, ##__VA_ARGS__); \ >> +} while (0) >> + > And do not roll your own debugging/logging macros. Use what is given to > you (dev_info(), dev_err(), dev_dbg()), they are there for a reason. By > going around them, you circumvent the whole of the kernel logging > infrastructure and declare that your tiny bus is somehow more "special" > than it. > > And I doubt you want to make such a statement :) well :).. I will remove them in next revision. > thanks, > > greg k-h > -- > To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Thanks Sujeev -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project