Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp810589pxf; Thu, 1 Apr 2021 14:19:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzyesL5Jne1o3JkopFwp2nw2aXtkCYA2R9HrI/kZTeT7FQo5oWiLGZf94QDbyoERMI8RrtN X-Received: by 2002:a05:6638:1a6:: with SMTP id b6mr9668086jaq.116.1617311947253; Thu, 01 Apr 2021 14:19:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617311947; cv=none; d=google.com; s=arc-20160816; b=kZ+I7Frn1Uv5flLAPLxARzpFWtqlyibo4cA6clGmTQYXV192jdchEYvN8OQfea0jg1 6kXhkI+l3jGAp8N3lPkFSUCButrys23VMgGMH84ltSNKLakwB8NoxmL6Uq3POf3003Q3 jDZBEcgo7D/s9GgBkyx6PX3HcUIKmEBQfcGNnzZAlbpIkB5UdsOx+jT2ZAnyEd/jpNmR JSOSYnIr75CTky9tTf+FcMtOVq7R/xksdtGnTlwgRMvA1eqigPJ4mO+j7wKeIe6uY/Oj w2amKxbtkfUG8nQRdiCsj9z2/gGt8uDsBnq3MZGSnGtHoCc/2+fIJpbVkd4MZ8KjiXfW 6DTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dmarc-filter:sender:dkim-signature; bh=pEQHSbTu9yyRJG7rdnF6GRVzPSxwx5P/b0wocRHhruk=; b=o+fcklGPRyMsSmX6g06/zJVfoVfq43mQHigKKsqHAp0jrpdiTuipNmxFYb6RjSIoHr KF00RDlFzlxOnRpwPhBnVrDMK1WVPszpRSPyQB3JyaovE4ntpr3i82LBHkWMqkHbI9l+ tRwFg0hi8TwV9vB2D+qubduypAjtfFlxDGk8dx+XsXn2fvTLoPZjZtmXM9aPwnIy6hs4 XOTBKu+Fm2KPlKReAaQI0gC+ExGOe2vkqfISEdwh0B0Sj+eSif4EYCYxhTbv8vhRcepE QxbTEGNqStoTfi3kY9sAyHkAHRXAQeGiDBk8p+jZnM3jbdwdJ9/n/1zxtSx/ElfISxpO cZQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=v4fXBhxd; spf=pass (google.com: 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 b6si5625975ilf.133.2021.04.01.14.18.53; Thu, 01 Apr 2021 14:19:07 -0700 (PDT) Received-SPF: pass (google.com: 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=pass header.i=@mg.codeaurora.org header.s=smtp header.b=v4fXBhxd; spf=pass (google.com: 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 S235125AbhDAVRQ (ORCPT + 99 others); Thu, 1 Apr 2021 17:17:16 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:33124 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234965AbhDAVRP (ORCPT ); Thu, 1 Apr 2021 17:17:15 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1617311835; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=pEQHSbTu9yyRJG7rdnF6GRVzPSxwx5P/b0wocRHhruk=; b=v4fXBhxdpw16m4RP6lSCoCMR+VvxUT3rnNeb9pjI8Lt3HqihqiyuWmnGqqv7nLJO/X7aZ2YM kOUbXwYo7hlX2yU+X925VXohG4yTbU+6E+sQ75kbsio/6DLX2fQBa0oVOXGAmONx0FwGHTD+ 5rTxd0inorpCMSfrBaEsorYd2qk= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n03.prod.us-east-1.postgun.com with SMTP id 6066382d03cfff3452bb4d4b (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 01 Apr 2021 21:16:29 GMT Sender: bbhatt=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id B4D4CC43461; Thu, 1 Apr 2021 21:16:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from malabar-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: bbhatt) by smtp.codeaurora.org (Postfix) with ESMTPSA id 5169BC43461; Thu, 1 Apr 2021 21:16:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 5169BC43461 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=bbhatt@codeaurora.org From: Bhaumik Bhatt To: manivannan.sadhasivam@linaro.org Cc: linux-arm-msm@vger.kernel.org, hemantk@codeaurora.org, jhugo@codeaurora.org, linux-kernel@vger.kernel.org, carl.yin@quectel.com, naveen.kumar@quectel.com, loic.poulain@linaro.org, Bhaumik Bhatt Subject: [PATCH v8 4/9] bus: mhi: core: Update debug messages to use client device Date: Thu, 1 Apr 2021 14:16:13 -0700 Message-Id: <1617311778-1254-5-git-send-email-bbhatt@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1617311778-1254-1-git-send-email-bbhatt@codeaurora.org> References: <1617311778-1254-1-git-send-email-bbhatt@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Debug messages dealing with client devices use the generic MHI controller or parent device along with a channel number. It would be better to instead use the client device directly and enable better log messages for channel updates. Suggested-by: Manivannan Sadhasivam Signed-off-by: Bhaumik Bhatt --- drivers/bus/mhi/core/main.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/bus/mhi/core/main.c b/drivers/bus/mhi/core/main.c index 710ca0f..94fdbf7 100644 --- a/drivers/bus/mhi/core/main.c +++ b/drivers/bus/mhi/core/main.c @@ -1238,7 +1238,7 @@ static int mhi_update_channel_state(struct mhi_controller *mhi_cntrl, struct mhi_chan *mhi_chan, enum mhi_ch_state_type to_state) { - struct device *dev = &mhi_cntrl->mhi_dev->dev; + struct device *dev = &mhi_chan->mhi_dev->dev; enum mhi_cmd_type cmd = MHI_CMD_NOP; int ret; @@ -1316,7 +1316,7 @@ static void __mhi_unprepare_channel(struct mhi_controller *mhi_cntrl, struct mhi_chan *mhi_chan) { int ret; - struct device *dev = &mhi_cntrl->mhi_dev->dev; + struct device *dev = &mhi_chan->mhi_dev->dev; mutex_lock(&mhi_chan->mutex); @@ -1340,13 +1340,11 @@ int mhi_prepare_channel(struct mhi_controller *mhi_cntrl, struct mhi_chan *mhi_chan) { int ret = 0; - struct device *dev = &mhi_cntrl->mhi_dev->dev; + struct device *dev = &mhi_chan->mhi_dev->dev; if (!(BIT(mhi_cntrl->ee) & mhi_chan->ee_mask)) { - dev_err(dev, - "Current EE: %s Required EE Mask: 0x%x for chan: %s\n", - TO_MHI_EXEC_STR(mhi_cntrl->ee), mhi_chan->ee_mask, - mhi_chan->name); + dev_err(dev, "Current EE: %s Required EE Mask: 0x%x\n", + TO_MHI_EXEC_STR(mhi_cntrl->ee), mhi_chan->ee_mask); return -ENOTCONN; } -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project