mbox series

[0/5] MHI changes for v5.10 - Take two

Message ID 20200927033652.11789-1-manivannan.sadhasivam@linaro.org
Headers show
Series MHI changes for v5.10 - Take two | expand

Message

Manivannan Sadhasivam Sept. 27, 2020, 3:36 a.m. UTC
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(-)

Comments

Greg Kroah-Hartman Sept. 27, 2020, 10:17 a.m. UTC | #1
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
Greg Kroah-Hartman Sept. 27, 2020, 10:20 a.m. UTC | #2
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
Greg Kroah-Hartman Sept. 27, 2020, 10:23 a.m. UTC | #3
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
Manivannan Sadhasivam Sept. 28, 2020, 3:48 a.m. UTC | #4
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
Manivannan Sadhasivam Sept. 28, 2020, 3:48 a.m. UTC | #5
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