* [2/3] dma: tegra: make byte counters unsigned int
@ 2018-11-14 12:13 Dmitry Osipenko
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Osipenko @ 2018-11-14 12:13 UTC (permalink / raw)
To: Ben Dooks, dan.j.williams, vkoul; +Cc: ldewangan, dmaengine, linux-tegra
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>
^ permalink raw reply [flat|nested] 2+ messages in thread* [2/3] dma: tegra: make byte counters unsigned int
@ 2018-11-14 10:13 Ben Dooks
0 siblings, 0 replies; 2+ messages in thread
From: Ben Dooks @ 2018-11-14 10:13 UTC (permalink / raw)
To: dan.j.williams, vkoul
Cc: ldewangan, dmaengine, linux-tegra, digetx, Ben Dooks
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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-14 12:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-14 12:13 [2/3] dma: tegra: make byte counters unsigned int Dmitry Osipenko
-- strict thread matches above, loose matches on Subject: below --
2018-11-14 10:13 Ben Dooks
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).