Skip to content

Commit 216a1d7

Browse files
bjdooks-ctvinodkoul
authored andcommitted
dmaengine: tegra: make byte counters unsigned int
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> Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent e486df3 commit 216a1d7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/dma/tegra20-apb-dma.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ struct tegra_dma_channel_regs {
155155
*/
156156
struct tegra_dma_sg_req {
157157
struct tegra_dma_channel_regs ch_regs;
158-
int req_len;
158+
unsigned int req_len;
159159
bool configured;
160160
bool last_sg;
161161
struct list_head node;
@@ -169,8 +169,8 @@ struct tegra_dma_sg_req {
169169
*/
170170
struct tegra_dma_desc {
171171
struct dma_async_tx_descriptor txd;
172-
int bytes_requested;
173-
int bytes_transferred;
172+
unsigned int bytes_requested;
173+
unsigned int bytes_transferred;
174174
enum dma_status dma_status;
175175
struct list_head node;
176176
struct list_head tx_list;

0 commit comments

Comments
 (0)