All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] MHI changes for v5.10 - Take two
@ 2020-09-27  3:36 Manivannan Sadhasivam
  2020-09-27  3:36 ` [PATCH 1/5] bus: mhi: core: debugfs: Use correct format specifiers for addresses Manivannan Sadhasivam
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Manivannan Sadhasivam @ 2020-09-27  3:36 UTC (permalink / raw)
  To: gregkh
  Cc: hemantk, bbhatt, linux-arm-msm, jhugo, linux-kernel,
	Manivannan Sadhasivam

Hi Greg,

This is the second set of MHI patches for v5.10. The summary is below:

* Fixed the format specifier used in debugfs interface. The issue was
  identified by building for ARM32 machine.

NOTE: I've sent this patch separately for review.

* Removed the auto-start option for MHI channels. This is done to avoid
  receiving spurious uplink from MHI client device when the client driver
  is not up. The corresponding qrtr change is also included with Dave's ACK.

* Moved MHI_MAX_MTU define out of internal header to global to use it in
  client drivers.

Please consider merging!

Thanks,
Mani

Hemant Kumar (1):
  bus: mhi: core: Move MHI_MAX_MTU to external header file

Loic Poulain (3):
  bus: mhi: debugfs: Print channel context read-pointer
  bus: mhi: Remove auto-start option
  net: qrtr: Start MHI channels during init

Manivannan Sadhasivam (1):
  bus: mhi: core: debugfs: Use correct format specifiers for addresses

 drivers/bus/mhi/core/debugfs.c  | 15 ++++++++-------
 drivers/bus/mhi/core/init.c     |  9 ---------
 drivers/bus/mhi/core/internal.h |  2 --
 include/linux/mhi.h             |  5 +++--
 net/qrtr/mhi.c                  |  5 +++++
 5 files changed, 16 insertions(+), 20 deletions(-)

-- 
2.17.1


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

* [PATCH 1/5] bus: mhi: core: debugfs: Use correct format specifiers for addresses
  2020-09-27  3:36 [PATCH 0/5] MHI changes for v5.10 - Take two Manivannan Sadhasivam
@ 2020-09-27  3:36 ` Manivannan Sadhasivam
  2020-09-27 10:20   ` Greg KH
  2020-09-27 10:23   ` Greg KH
  2020-09-27  3:36 ` [PATCH 2/5] bus: mhi: debugfs: Print channel context read-pointer Manivannan Sadhasivam
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 11+ messages in thread
From: Manivannan Sadhasivam @ 2020-09-27  3:36 UTC (permalink / raw)
  To: gregkh
  Cc: hemantk, bbhatt, linux-arm-msm, jhugo, linux-kernel,
	Manivannan Sadhasivam

For exposing the addresses of read/write pointers and doorbell register,
let's use the correct format specifiers. This fixes the following issues
generated using W=1 build in ARM32 and reported by Kbuild bot:

All warnings (new ones prefixed by >>):

>> drivers/bus/mhi/core/debugfs.c:75:7: warning: format specifies type 'unsigned long long' but the argument has type 'dma_addr_t' (aka 'unsigned int') [-Wformat]
                              mhi_event->db_cfg.db_val);
                              ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/bus/mhi/core/debugfs.c:123:7: warning: format specifies type 'unsigned long long' but the argument has type 'dma_addr_t' (aka 'unsigned int') [-Wformat]
                              mhi_chan->db_cfg.db_val);
                              ^~~~~~~~~~~~~~~~~~~~~~~
   2 warnings generated.

drivers/bus/mhi/core/debugfs.c: In function ‘mhi_debugfs_events_show’:
drivers/bus/mhi/core/debugfs.c:74:51: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   seq_printf(m, " local rp: 0x%llx db: 0x%pad\n", (u64)ring->rp,
                                                   ^
drivers/bus/mhi/core/debugfs.c: In function ‘mhi_debugfs_channels_show’:
drivers/bus/mhi/core/debugfs.c:122:7: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
       (u64)ring->rp, (u64)ring->wp,
       ^
drivers/bus/mhi/core/debugfs.c:122:22: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
       (u64)ring->rp, (u64)ring->wp,
                      ^
drivers/bus/mhi/core/debugfs.c:121:62: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘dma_addr_t {aka unsigned int}’ [-Wformat=]
   seq_printf(m, " local rp: 0x%llx local wp: 0x%llx db: 0x%llx\n",
                                                           ~~~^
                                                           %x
drivers/bus/mhi/core/debugfs.c:123:7:
       mhi_chan->db_cfg.db_val);

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
 drivers/bus/mhi/core/debugfs.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/bus/mhi/core/debugfs.c b/drivers/bus/mhi/core/debugfs.c
index 53d05a8e168d..f50d73054db4 100644
--- a/drivers/bus/mhi/core/debugfs.c
+++ b/drivers/bus/mhi/core/debugfs.c
@@ -71,8 +71,8 @@ static int mhi_debugfs_events_show(struct seq_file *m, void *d)
 		seq_printf(m, " rp: 0x%llx wp: 0x%llx", er_ctxt->rp,
 			   er_ctxt->wp);
 
-		seq_printf(m, " local rp: 0x%llx db: 0x%llx\n", (u64)ring->rp,
-			   mhi_event->db_cfg.db_val);
+		seq_printf(m, " local rp: 0x%pK db: 0x%pad\n", ring->rp,
+			   &mhi_event->db_cfg.db_val);
 	}
 
 	return 0;
@@ -118,9 +118,9 @@ static int mhi_debugfs_channels_show(struct seq_file *m, void *d)
 		seq_printf(m, " base: 0x%llx len: 0x%llx wp: 0x%llx",
 			   chan_ctxt->rbase, chan_ctxt->rlen, chan_ctxt->wp);
 
-		seq_printf(m, " local rp: 0x%llx local wp: 0x%llx db: 0x%llx\n",
-			   (u64)ring->rp, (u64)ring->wp,
-			   mhi_chan->db_cfg.db_val);
+		seq_printf(m, " local rp: 0x%pK local wp: 0x%pK db: 0x%pad\n",
+			   ring->rp, ring->wp,
+			   &mhi_chan->db_cfg.db_val);
 	}
 
 	return 0;
-- 
2.17.1


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

* [PATCH 2/5] bus: mhi: debugfs: Print channel context read-pointer
  2020-09-27  3:36 [PATCH 0/5] MHI changes for v5.10 - Take two Manivannan Sadhasivam
  2020-09-27  3:36 ` [PATCH 1/5] bus: mhi: core: debugfs: Use correct format specifiers for addresses Manivannan Sadhasivam
@ 2020-09-27  3:36 ` Manivannan Sadhasivam
  2020-09-27  3:36 ` [PATCH 3/5] bus: mhi: Remove auto-start option Manivannan Sadhasivam
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Manivannan Sadhasivam @ 2020-09-27  3:36 UTC (permalink / raw)
  To: gregkh
  Cc: hemantk, bbhatt, linux-arm-msm, jhugo, linux-kernel,
	Loic Poulain, Manivannan Sadhasivam

From: Loic Poulain <loic.poulain@linaro.org>

This value was missing in the channel debugfs output.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
 drivers/bus/mhi/core/debugfs.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/mhi/core/debugfs.c b/drivers/bus/mhi/core/debugfs.c
index f50d73054db4..3a48801e01f4 100644
--- a/drivers/bus/mhi/core/debugfs.c
+++ b/drivers/bus/mhi/core/debugfs.c
@@ -115,8 +115,9 @@ static int mhi_debugfs_channels_show(struct seq_file *m, void *d)
 		seq_printf(m, " type: 0x%x event ring: %u", chan_ctxt->chtype,
 			   chan_ctxt->erindex);
 
-		seq_printf(m, " base: 0x%llx len: 0x%llx wp: 0x%llx",
-			   chan_ctxt->rbase, chan_ctxt->rlen, chan_ctxt->wp);
+		seq_printf(m, " base: 0x%llx len: 0x%llx rp: 0x%llx wp: 0x%llx",
+			   chan_ctxt->rbase, chan_ctxt->rlen, chan_ctxt->rp,
+			   chan_ctxt->wp);
 
 		seq_printf(m, " local rp: 0x%pK local wp: 0x%pK db: 0x%pad\n",
 			   ring->rp, ring->wp,
-- 
2.17.1


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

* [PATCH 3/5] bus: mhi: Remove auto-start option
  2020-09-27  3:36 [PATCH 0/5] MHI changes for v5.10 - Take two Manivannan Sadhasivam
  2020-09-27  3:36 ` [PATCH 1/5] bus: mhi: core: debugfs: Use correct format specifiers for addresses Manivannan Sadhasivam
  2020-09-27  3:36 ` [PATCH 2/5] bus: mhi: debugfs: Print channel context read-pointer Manivannan Sadhasivam
@ 2020-09-27  3:36 ` Manivannan Sadhasivam
  2020-09-27  3:36 ` [PATCH 4/5] net: qrtr: Start MHI channels during init Manivannan Sadhasivam
  2020-09-27  3:36 ` [PATCH 5/5] bus: mhi: core: Move MHI_MAX_MTU to external header file Manivannan Sadhasivam
  4 siblings, 0 replies; 11+ messages in thread
From: Manivannan Sadhasivam @ 2020-09-27  3:36 UTC (permalink / raw)
  To: gregkh
  Cc: hemantk, bbhatt, linux-arm-msm, jhugo, linux-kernel,
	Loic Poulain, Manivannan Sadhasivam

From: Loic Poulain <loic.poulain@linaro.org>

There is really no point having an auto-start for channels.
This is confusing for the device drivers, some have to enable the
channels, others don't have... and waste resources (e.g. pre allocated
buffers) that may never be used.

This is really up to the MHI device(channel) driver to manage the state
of its channels.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
 drivers/bus/mhi/core/init.c     | 9 ---------
 drivers/bus/mhi/core/internal.h | 1 -
 include/linux/mhi.h             | 2 --
 3 files changed, 12 deletions(-)

diff --git a/drivers/bus/mhi/core/init.c b/drivers/bus/mhi/core/init.c
index 799111baceba..ca08437dffd6 100644
--- a/drivers/bus/mhi/core/init.c
+++ b/drivers/bus/mhi/core/init.c
@@ -772,7 +772,6 @@ static int parse_ch_cfg(struct mhi_controller *mhi_cntrl,
 		mhi_chan->offload_ch = ch_cfg->offload_channel;
 		mhi_chan->db_cfg.reset_req = ch_cfg->doorbell_mode_switch;
 		mhi_chan->pre_alloc = ch_cfg->auto_queue;
-		mhi_chan->auto_start = ch_cfg->auto_start;
 
 		/*
 		 * If MHI host allocates buffers, then the channel direction
@@ -1177,11 +1176,6 @@ static int mhi_driver_probe(struct device *dev)
 			goto exit_probe;
 
 		ul_chan->xfer_cb = mhi_drv->ul_xfer_cb;
-		if (ul_chan->auto_start) {
-			ret = mhi_prepare_channel(mhi_cntrl, ul_chan);
-			if (ret)
-				goto exit_probe;
-		}
 	}
 
 	ret = -EINVAL;
@@ -1215,9 +1209,6 @@ static int mhi_driver_probe(struct device *dev)
 	if (ret)
 		goto exit_probe;
 
-	if (dl_chan && dl_chan->auto_start)
-		mhi_prepare_channel(mhi_cntrl, dl_chan);
-
 	mhi_device_put(mhi_dev);
 
 	return ret;
diff --git a/drivers/bus/mhi/core/internal.h b/drivers/bus/mhi/core/internal.h
index 7989269ddd96..33c23203c531 100644
--- a/drivers/bus/mhi/core/internal.h
+++ b/drivers/bus/mhi/core/internal.h
@@ -563,7 +563,6 @@ struct mhi_chan {
 	bool configured;
 	bool offload_ch;
 	bool pre_alloc;
-	bool auto_start;
 	bool wake_capable;
 };
 
diff --git a/include/linux/mhi.h b/include/linux/mhi.h
index d4841e5a5f45..6522a4adc794 100644
--- a/include/linux/mhi.h
+++ b/include/linux/mhi.h
@@ -214,7 +214,6 @@ enum mhi_db_brst_mode {
  * @offload_channel: The client manages the channel completely
  * @doorbell_mode_switch: Channel switches to doorbell mode on M0 transition
  * @auto_queue: Framework will automatically queue buffers for DL traffic
- * @auto_start: Automatically start (open) this channel
  * @wake-capable: Channel capable of waking up the system
  */
 struct mhi_channel_config {
@@ -232,7 +231,6 @@ struct mhi_channel_config {
 	bool offload_channel;
 	bool doorbell_mode_switch;
 	bool auto_queue;
-	bool auto_start;
 	bool wake_capable;
 };
 
-- 
2.17.1


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

* [PATCH 4/5] net: qrtr: Start MHI channels during init
  2020-09-27  3:36 [PATCH 0/5] MHI changes for v5.10 - Take two Manivannan Sadhasivam
                   ` (2 preceding siblings ...)
  2020-09-27  3:36 ` [PATCH 3/5] bus: mhi: Remove auto-start option Manivannan Sadhasivam
@ 2020-09-27  3:36 ` Manivannan Sadhasivam
  2020-09-27  3:36 ` [PATCH 5/5] bus: mhi: core: Move MHI_MAX_MTU to external header file Manivannan Sadhasivam
  4 siblings, 0 replies; 11+ messages in thread
From: Manivannan Sadhasivam @ 2020-09-27  3:36 UTC (permalink / raw)
  To: gregkh
  Cc: hemantk, bbhatt, linux-arm-msm, jhugo, linux-kernel,
	Loic Poulain, Manivannan Sadhasivam

From: Loic Poulain <loic.poulain@linaro.org>

Start MHI device channels so that transfers can be performed.
The MHI stack does not auto-start channels anymore.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
 net/qrtr/mhi.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/net/qrtr/mhi.c b/net/qrtr/mhi.c
index ff0c41467fc1..7100f0bac4c6 100644
--- a/net/qrtr/mhi.c
+++ b/net/qrtr/mhi.c
@@ -76,6 +76,11 @@ static int qcom_mhi_qrtr_probe(struct mhi_device *mhi_dev,
 	struct qrtr_mhi_dev *qdev;
 	int rc;
 
+	/* start channels */
+	rc = mhi_prepare_for_transfer(mhi_dev);
+	if (rc)
+		return rc;
+
 	qdev = devm_kzalloc(&mhi_dev->dev, sizeof(*qdev), GFP_KERNEL);
 	if (!qdev)
 		return -ENOMEM;
-- 
2.17.1


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

* [PATCH 5/5] bus: mhi: core: Move MHI_MAX_MTU to external header file
  2020-09-27  3:36 [PATCH 0/5] MHI changes for v5.10 - Take two Manivannan Sadhasivam
                   ` (3 preceding siblings ...)
  2020-09-27  3:36 ` [PATCH 4/5] net: qrtr: Start MHI channels during init Manivannan Sadhasivam
@ 2020-09-27  3:36 ` Manivannan Sadhasivam
  2020-09-27 10:17   ` Greg KH
  4 siblings, 1 reply; 11+ messages in thread
From: Manivannan Sadhasivam @ 2020-09-27  3:36 UTC (permalink / raw)
  To: gregkh
  Cc: hemantk, bbhatt, linux-arm-msm, jhugo, linux-kernel,
	Manivannan Sadhasivam

From: Hemant Kumar <hemantk@codeaurora.org>

Currently this macro is defined in internal MHI header as
a TRE length mask. Moving it to external header allows MHI
client drivers to set this upper bound for the transmit
buffer size.

Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
 drivers/bus/mhi/core/internal.h | 1 -
 include/linux/mhi.h             | 3 +++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/bus/mhi/core/internal.h b/drivers/bus/mhi/core/internal.h
index 33c23203c531..3e41edae829c 100644
--- a/drivers/bus/mhi/core/internal.h
+++ b/drivers/bus/mhi/core/internal.h
@@ -453,7 +453,6 @@ enum mhi_pm_state {
 #define CMD_EL_PER_RING			128
 #define PRIMARY_CMD_RING		0
 #define MHI_DEV_WAKE_DB			127
-#define MHI_MAX_MTU			0xffff
 #define MHI_RANDOM_U32_NONZERO(bmsk)	(prandom_u32_max(bmsk) + 1)
 
 enum mhi_er_type {
diff --git a/include/linux/mhi.h b/include/linux/mhi.h
index 6522a4adc794..10ebda44ea3c 100644
--- a/include/linux/mhi.h
+++ b/include/linux/mhi.h
@@ -15,6 +15,9 @@
 #include <linux/wait.h>
 #include <linux/workqueue.h>
 
+/* MHI client drivers to set this upper bound for tx buffer */
+#define MHI_MAX_MTU 0xffff
+
 #define MHI_MAX_OEM_PK_HASH_SEGMENTS 16
 
 struct mhi_chan;
-- 
2.17.1


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

* Re: [PATCH 5/5] bus: mhi: core: Move MHI_MAX_MTU to external header file
  2020-09-27  3:36 ` [PATCH 5/5] bus: mhi: core: Move MHI_MAX_MTU to external header file Manivannan Sadhasivam
@ 2020-09-27 10:17   ` Greg KH
  2020-09-28  3:48     ` Manivannan Sadhasivam
  0 siblings, 1 reply; 11+ messages in thread
From: Greg KH @ 2020-09-27 10:17 UTC (permalink / raw)
  To: Manivannan Sadhasivam; +Cc: hemantk, bbhatt, linux-arm-msm, jhugo, linux-kernel

On Sun, Sep 27, 2020 at 09:06:52AM +0530, Manivannan Sadhasivam wrote:
> From: Hemant Kumar <hemantk@codeaurora.org>
> 
> Currently this macro is defined in internal MHI header as
> a TRE length mask. Moving it to external header allows MHI
> client drivers to set this upper bound for the transmit
> buffer size.
> 
> Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
>  drivers/bus/mhi/core/internal.h | 1 -
>  include/linux/mhi.h             | 3 +++
>  2 files changed, 3 insertions(+), 1 deletion(-)

If no one is using this change, then please don't make it until someone
needs it.

So submit it when you have a user please.

thanks,

greg k-h

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

* Re: [PATCH 1/5] bus: mhi: core: debugfs: Use correct format specifiers for addresses
  2020-09-27  3:36 ` [PATCH 1/5] bus: mhi: core: debugfs: Use correct format specifiers for addresses Manivannan Sadhasivam
@ 2020-09-27 10:20   ` Greg KH
  2020-09-27 10:23   ` Greg KH
  1 sibling, 0 replies; 11+ messages in thread
From: Greg KH @ 2020-09-27 10:20 UTC (permalink / raw)
  To: Manivannan Sadhasivam; +Cc: hemantk, bbhatt, linux-arm-msm, jhugo, linux-kernel

On Sun, Sep 27, 2020 at 09:06:48AM +0530, Manivannan Sadhasivam wrote:
> For exposing the addresses of read/write pointers and doorbell register,
> let's use the correct format specifiers. This fixes the following issues
> generated using W=1 build in ARM32 and reported by Kbuild bot:
> 
> All warnings (new ones prefixed by >>):
> 
> >> drivers/bus/mhi/core/debugfs.c:75:7: warning: format specifies type 'unsigned long long' but the argument has type 'dma_addr_t' (aka 'unsigned int') [-Wformat]
>                               mhi_event->db_cfg.db_val);
>                               ^~~~~~~~~~~~~~~~~~~~~~~~
>    drivers/bus/mhi/core/debugfs.c:123:7: warning: format specifies type 'unsigned long long' but the argument has type 'dma_addr_t' (aka 'unsigned int') [-Wformat]
>                               mhi_chan->db_cfg.db_val);
>                               ^~~~~~~~~~~~~~~~~~~~~~~
>    2 warnings generated.
> 
> drivers/bus/mhi/core/debugfs.c: In function ‘mhi_debugfs_events_show’:
> drivers/bus/mhi/core/debugfs.c:74:51: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
>    seq_printf(m, " local rp: 0x%llx db: 0x%pad\n", (u64)ring->rp,
>                                                    ^
> drivers/bus/mhi/core/debugfs.c: In function ‘mhi_debugfs_channels_show’:
> drivers/bus/mhi/core/debugfs.c:122:7: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
>        (u64)ring->rp, (u64)ring->wp,
>        ^
> drivers/bus/mhi/core/debugfs.c:122:22: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
>        (u64)ring->rp, (u64)ring->wp,
>                       ^
> drivers/bus/mhi/core/debugfs.c:121:62: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘dma_addr_t {aka unsigned int}’ [-Wformat=]
>    seq_printf(m, " local rp: 0x%llx local wp: 0x%llx db: 0x%llx\n",
>                                                            ~~~^
>                                                            %x
> drivers/bus/mhi/core/debugfs.c:123:7:
>        mhi_chan->db_cfg.db_val);
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
>  drivers/bus/mhi/core/debugfs.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)

This file is not in any of the branches of any of my trees.

What was it made against?

confused,

greg k-h

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

* Re: [PATCH 1/5] bus: mhi: core: debugfs: Use correct format specifiers for addresses
  2020-09-27  3:36 ` [PATCH 1/5] bus: mhi: core: debugfs: Use correct format specifiers for addresses Manivannan Sadhasivam
  2020-09-27 10:20   ` Greg KH
@ 2020-09-27 10:23   ` Greg KH
  2020-09-28  3:48     ` Manivannan Sadhasivam
  1 sibling, 1 reply; 11+ messages in thread
From: Greg KH @ 2020-09-27 10:23 UTC (permalink / raw)
  To: Manivannan Sadhasivam; +Cc: hemantk, bbhatt, linux-arm-msm, jhugo, linux-kernel

On Sun, Sep 27, 2020 at 09:06:48AM +0530, Manivannan Sadhasivam wrote:
> For exposing the addresses of read/write pointers and doorbell register,
> let's use the correct format specifiers. This fixes the following issues
> generated using W=1 build in ARM32 and reported by Kbuild bot:
> 
> All warnings (new ones prefixed by >>):
> 
> >> drivers/bus/mhi/core/debugfs.c:75:7: warning: format specifies type 'unsigned long long' but the argument has type 'dma_addr_t' (aka 'unsigned int') [-Wformat]
>                               mhi_event->db_cfg.db_val);
>                               ^~~~~~~~~~~~~~~~~~~~~~~~
>    drivers/bus/mhi/core/debugfs.c:123:7: warning: format specifies type 'unsigned long long' but the argument has type 'dma_addr_t' (aka 'unsigned int') [-Wformat]
>                               mhi_chan->db_cfg.db_val);
>                               ^~~~~~~~~~~~~~~~~~~~~~~
>    2 warnings generated.
> 
> drivers/bus/mhi/core/debugfs.c: In function ‘mhi_debugfs_events_show’:
> drivers/bus/mhi/core/debugfs.c:74:51: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
>    seq_printf(m, " local rp: 0x%llx db: 0x%pad\n", (u64)ring->rp,
>                                                    ^
> drivers/bus/mhi/core/debugfs.c: In function ‘mhi_debugfs_channels_show’:
> drivers/bus/mhi/core/debugfs.c:122:7: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
>        (u64)ring->rp, (u64)ring->wp,
>        ^
> drivers/bus/mhi/core/debugfs.c:122:22: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
>        (u64)ring->rp, (u64)ring->wp,
>                       ^
> drivers/bus/mhi/core/debugfs.c:121:62: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘dma_addr_t {aka unsigned int}’ [-Wformat=]
>    seq_printf(m, " local rp: 0x%llx local wp: 0x%llx db: 0x%llx\n",
>                                                            ~~~^
>                                                            %x
> drivers/bus/mhi/core/debugfs.c:123:7:
>        mhi_chan->db_cfg.db_val);
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
>  drivers/bus/mhi/core/debugfs.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)

Ah, this is against your first set of patches, that's the confusion on
my part.

Please just fix them all up and resend 1 series of patches, that isn't
broken, and I will be glad to review and take that.

thanks,

greg k-h

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

* Re: [PATCH 1/5] bus: mhi: core: debugfs: Use correct format specifiers for addresses
  2020-09-27 10:23   ` Greg KH
@ 2020-09-28  3:48     ` Manivannan Sadhasivam
  0 siblings, 0 replies; 11+ messages in thread
From: Manivannan Sadhasivam @ 2020-09-28  3:48 UTC (permalink / raw)
  To: Greg KH; +Cc: hemantk, bbhatt, linux-arm-msm, jhugo, linux-kernel

On Sun, Sep 27, 2020 at 12:23:10PM +0200, Greg KH wrote:
> On Sun, Sep 27, 2020 at 09:06:48AM +0530, Manivannan Sadhasivam wrote:
> > For exposing the addresses of read/write pointers and doorbell register,
> > let's use the correct format specifiers. This fixes the following issues
> > generated using W=1 build in ARM32 and reported by Kbuild bot:
> > 
> > All warnings (new ones prefixed by >>):
> > 
> > >> drivers/bus/mhi/core/debugfs.c:75:7: warning: format specifies type 'unsigned long long' but the argument has type 'dma_addr_t' (aka 'unsigned int') [-Wformat]
> >                               mhi_event->db_cfg.db_val);
> >                               ^~~~~~~~~~~~~~~~~~~~~~~~
> >    drivers/bus/mhi/core/debugfs.c:123:7: warning: format specifies type 'unsigned long long' but the argument has type 'dma_addr_t' (aka 'unsigned int') [-Wformat]
> >                               mhi_chan->db_cfg.db_val);
> >                               ^~~~~~~~~~~~~~~~~~~~~~~
> >    2 warnings generated.
> > 
> > drivers/bus/mhi/core/debugfs.c: In function ‘mhi_debugfs_events_show’:
> > drivers/bus/mhi/core/debugfs.c:74:51: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
> >    seq_printf(m, " local rp: 0x%llx db: 0x%pad\n", (u64)ring->rp,
> >                                                    ^
> > drivers/bus/mhi/core/debugfs.c: In function ‘mhi_debugfs_channels_show’:
> > drivers/bus/mhi/core/debugfs.c:122:7: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
> >        (u64)ring->rp, (u64)ring->wp,
> >        ^
> > drivers/bus/mhi/core/debugfs.c:122:22: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
> >        (u64)ring->rp, (u64)ring->wp,
> >                       ^
> > drivers/bus/mhi/core/debugfs.c:121:62: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘dma_addr_t {aka unsigned int}’ [-Wformat=]
> >    seq_printf(m, " local rp: 0x%llx local wp: 0x%llx db: 0x%llx\n",
> >                                                            ~~~^
> >                                                            %x
> > drivers/bus/mhi/core/debugfs.c:123:7:
> >        mhi_chan->db_cfg.db_val);
> > 
> > Reported-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > ---
> >  drivers/bus/mhi/core/debugfs.c | 10 +++++-----
> >  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> Ah, this is against your first set of patches, that's the confusion on
> my part.
> 
> Please just fix them all up and resend 1 series of patches, that isn't
> broken, and I will be glad to review and take that.
> 

Sure, will merge this patch with debugfs one. I submitted this patch as I got
error report from Kbuild bot and I thought you applied the series to
char-misc-testing branch.

Thanks,
Mani

> thanks,
> 
> greg k-h

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

* Re: [PATCH 5/5] bus: mhi: core: Move MHI_MAX_MTU to external header file
  2020-09-27 10:17   ` Greg KH
@ 2020-09-28  3:48     ` Manivannan Sadhasivam
  0 siblings, 0 replies; 11+ messages in thread
From: Manivannan Sadhasivam @ 2020-09-28  3:48 UTC (permalink / raw)
  To: Greg KH; +Cc: hemantk, bbhatt, linux-arm-msm, jhugo, linux-kernel

On Sun, Sep 27, 2020 at 12:17:34PM +0200, Greg KH wrote:
> On Sun, Sep 27, 2020 at 09:06:52AM +0530, Manivannan Sadhasivam wrote:
> > From: Hemant Kumar <hemantk@codeaurora.org>
> > 
> > Currently this macro is defined in internal MHI header as
> > a TRE length mask. Moving it to external header allows MHI
> > client drivers to set this upper bound for the transmit
> > buffer size.
> > 
> > Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
> > Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > ---
> >  drivers/bus/mhi/core/internal.h | 1 -
> >  include/linux/mhi.h             | 3 +++
> >  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> If no one is using this change, then please don't make it until someone
> needs it.
> 
> So submit it when you have a user please.
> 

Okay, will drop it.

Thanks,
Mani

> thanks,
> 
> greg k-h

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

end of thread, other threads:[~2020-09-28  3:48 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-27  3:36 [PATCH 0/5] MHI changes for v5.10 - Take two Manivannan Sadhasivam
2020-09-27  3:36 ` [PATCH 1/5] bus: mhi: core: debugfs: Use correct format specifiers for addresses Manivannan Sadhasivam
2020-09-27 10:20   ` Greg KH
2020-09-27 10:23   ` Greg KH
2020-09-28  3:48     ` Manivannan Sadhasivam
2020-09-27  3:36 ` [PATCH 2/5] bus: mhi: debugfs: Print channel context read-pointer Manivannan Sadhasivam
2020-09-27  3:36 ` [PATCH 3/5] bus: mhi: Remove auto-start option Manivannan Sadhasivam
2020-09-27  3:36 ` [PATCH 4/5] net: qrtr: Start MHI channels during init Manivannan Sadhasivam
2020-09-27  3:36 ` [PATCH 5/5] bus: mhi: core: Move MHI_MAX_MTU to external header file Manivannan Sadhasivam
2020-09-27 10:17   ` Greg KH
2020-09-28  3:48     ` Manivannan Sadhasivam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.