mhi.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH] bus: mhi: ep: Demote unsupported channel error log to debug
@ 2023-03-07  7:42 Manivannan Sadhasivam
  2023-03-07 16:04 ` Jeffrey Hugo
  2023-03-07 16:48 ` Manivannan Sadhasivam
  0 siblings, 2 replies; 3+ messages in thread
From: Manivannan Sadhasivam @ 2023-03-07  7:42 UTC (permalink / raw)
  To: mhi, linux-arm-msm; +Cc: Manivannan Sadhasivam

Not all MHI endpoints will support all available channels. Most of them
support only a selected number of channels based on the implementations.
In those cases, it is not needed to print error messages in the endpoint.
So let's demote the error log to debug.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
 drivers/bus/mhi/ep/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/mhi/ep/main.c b/drivers/bus/mhi/ep/main.c
index 48bc6abb7b37..ba062df4fe25 100644
--- a/drivers/bus/mhi/ep/main.c
+++ b/drivers/bus/mhi/ep/main.c
@@ -126,7 +126,7 @@ static int mhi_ep_process_cmd_ring(struct mhi_ep_ring *ring, struct mhi_ring_ele
 
 	/* Check if the channel is supported by the controller */
 	if ((ch_id >= mhi_cntrl->max_chan) || !mhi_cntrl->mhi_chan[ch_id].name) {
-		dev_err(dev, "Channel (%u) not supported!\n", ch_id);
+		dev_dbg(dev, "Channel (%u) not supported!\n", ch_id);
 		return -ENODEV;
 	}
 
@@ -702,7 +702,7 @@ static void mhi_ep_cmd_ring_worker(struct work_struct *work)
 		el = &ring->ring_cache[ring->rd_offset];
 
 		ret = mhi_ep_process_cmd_ring(ring, el);
-		if (ret)
+		if (ret && ret != -ENODEV)
 			dev_err(dev, "Error processing cmd ring element: %zu\n", ring->rd_offset);
 
 		mhi_ep_ring_inc_index(ring);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] bus: mhi: ep: Demote unsupported channel error log to debug
  2023-03-07  7:42 [PATCH] bus: mhi: ep: Demote unsupported channel error log to debug Manivannan Sadhasivam
@ 2023-03-07 16:04 ` Jeffrey Hugo
  2023-03-07 16:48 ` Manivannan Sadhasivam
  1 sibling, 0 replies; 3+ messages in thread
From: Jeffrey Hugo @ 2023-03-07 16:04 UTC (permalink / raw)
  To: Manivannan Sadhasivam, mhi, linux-arm-msm

On 3/7/2023 12:42 AM, Manivannan Sadhasivam wrote:
> Not all MHI endpoints will support all available channels. Most of them
> support only a selected number of channels based on the implementations.
> In those cases, it is not needed to print error messages in the endpoint.
> So let's demote the error log to debug.
> 
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

Makes sense to me.

Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] bus: mhi: ep: Demote unsupported channel error log to debug
  2023-03-07  7:42 [PATCH] bus: mhi: ep: Demote unsupported channel error log to debug Manivannan Sadhasivam
  2023-03-07 16:04 ` Jeffrey Hugo
@ 2023-03-07 16:48 ` Manivannan Sadhasivam
  1 sibling, 0 replies; 3+ messages in thread
From: Manivannan Sadhasivam @ 2023-03-07 16:48 UTC (permalink / raw)
  To: mhi, linux-arm-msm

On Tue, Mar 07, 2023 at 01:12:48PM +0530, Manivannan Sadhasivam wrote:
> Not all MHI endpoints will support all available channels. Most of them
> support only a selected number of channels based on the implementations.
> In those cases, it is not needed to print error messages in the endpoint.
> So let's demote the error log to debug.
> 
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

Applied to mhi-next!

Thanks,
Mani

> ---
>  drivers/bus/mhi/ep/main.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/bus/mhi/ep/main.c b/drivers/bus/mhi/ep/main.c
> index 48bc6abb7b37..ba062df4fe25 100644
> --- a/drivers/bus/mhi/ep/main.c
> +++ b/drivers/bus/mhi/ep/main.c
> @@ -126,7 +126,7 @@ static int mhi_ep_process_cmd_ring(struct mhi_ep_ring *ring, struct mhi_ring_ele
>  
>  	/* Check if the channel is supported by the controller */
>  	if ((ch_id >= mhi_cntrl->max_chan) || !mhi_cntrl->mhi_chan[ch_id].name) {
> -		dev_err(dev, "Channel (%u) not supported!\n", ch_id);
> +		dev_dbg(dev, "Channel (%u) not supported!\n", ch_id);
>  		return -ENODEV;
>  	}
>  
> @@ -702,7 +702,7 @@ static void mhi_ep_cmd_ring_worker(struct work_struct *work)
>  		el = &ring->ring_cache[ring->rd_offset];
>  
>  		ret = mhi_ep_process_cmd_ring(ring, el);
> -		if (ret)
> +		if (ret && ret != -ENODEV)
>  			dev_err(dev, "Error processing cmd ring element: %zu\n", ring->rd_offset);
>  
>  		mhi_ep_ring_inc_index(ring);
> -- 
> 2.25.1
> 

-- 
மணிவண்ணன் சதாசிவம்

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-07 16:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-07  7:42 [PATCH] bus: mhi: ep: Demote unsupported channel error log to debug Manivannan Sadhasivam
2023-03-07 16:04 ` Jeffrey Hugo
2023-03-07 16:48 ` Manivannan Sadhasivam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).