dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Osipenko <digetx@gmail.com>
To: Ben Dooks <ben.dooks@codethink.co.uk>,
	dan.j.williams@intel.com, vkoul@kernel.org
Cc: ldewangan@nvidia.com, dmaengine@vger.kernel.org,
	linux-tegra@vger.kernel.org
Subject: [2/3] dma: tegra: make byte counters unsigned int
Date: Wed, 14 Nov 2018 15:13:02 +0300	[thread overview]
Message-ID: <4e5bfd47-bc57-af23-334b-24e6bdbe6914@gmail.com> (raw)

On 14.11.2018 13:13, Ben Dooks wrote:
> The buffer byte request length and counter are declared as signed integers
> but the values should never be below zero, so make these unsigned integers
> instead.
> 
> Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> ---
>  drivers/dma/tegra20-apb-dma.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
> index 8219ab88a507..adfd918baedc 100644
> --- a/drivers/dma/tegra20-apb-dma.c
> +++ b/drivers/dma/tegra20-apb-dma.c
> @@ -155,7 +155,7 @@ struct tegra_dma_channel_regs {
>   */
>  struct tegra_dma_sg_req {
>  	struct tegra_dma_channel_regs	ch_regs;
> -	int				req_len;
> +	unsigned int			req_len;
>  	bool				configured;
>  	bool				last_sg;
>  	struct list_head		node;
> @@ -169,8 +169,8 @@ struct tegra_dma_sg_req {
>   */
>  struct tegra_dma_desc {
>  	struct dma_async_tx_descriptor	txd;
> -	int				bytes_requested;
> -	int				bytes_transferred;
> +	unsigned int			bytes_requested;
> +	unsigned int			bytes_transferred;
>  	enum dma_status			dma_status;
>  	struct list_head		node;
>  	struct list_head		tx_list;
> 

Tested-by: Dmitry Osipenko <digetx@gmail.com>

             reply	other threads:[~2018-11-14 12:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-14 12:13 Dmitry Osipenko [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-11-14 10:13 [2/3] dma: tegra: make byte counters unsigned int Ben Dooks

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4e5bfd47-bc57-af23-334b-24e6bdbe6914@gmail.com \
    --to=digetx@gmail.com \
    --cc=ben.dooks@codethink.co.uk \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=ldewangan@nvidia.com \
    --cc=linux-tegra@vger.kernel.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).