Re: [PATCH v7 1/2] bus: mhi: Add mhi_queue_is_full function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 27, 2020 at 4:33 AM Loic Poulain <loic.poulain@xxxxxxxxxx> wrote:
>
> This function can be used by client driver to determine whether it's
> possible to queue new elements in a channel ring.
>
> Signed-off-by: Loic Poulain <loic.poulain@xxxxxxxxxx>
> ---
>  v1->v5: not part of the series
>  v6: Add this commit, used for stopping TX queue
>  v7: no change
>
>  drivers/bus/mhi/core/main.c | 15 +++++++++++++--
>  include/linux/mhi.h         |  7 +++++++
>  2 files changed, 20 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/bus/mhi/core/main.c b/drivers/bus/mhi/core/main.c
> index a588eac..44aa11f 100644
> --- a/drivers/bus/mhi/core/main.c
> +++ b/drivers/bus/mhi/core/main.c
> @@ -943,8 +943,8 @@ void mhi_ctrl_ev_task(unsigned long data)
>         }
>  }
>
> -static bool mhi_is_ring_full(struct mhi_controller *mhi_cntrl,
> -                            struct mhi_ring *ring)
> +static inline bool mhi_is_ring_full(struct mhi_controller *mhi_cntrl,
> +                                   struct mhi_ring *ring)

The compiler can decide whether to inline or not.

>  {
>         void *tmp = ring->wp + ring->el_size;
>
> @@ -1173,6 +1173,17 @@ int mhi_queue_buf(struct mhi_device *mhi_dev, enum dma_data_direction dir,
>  }
>  EXPORT_SYM



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux