arm-dma-amba_pl08x-avoid-64bit-division.patch: get rid of another 64-bit division
This commit is contained in:
parent
3f8c3dd605
commit
a2366c0397
@ -1,5 +1,5 @@
|
||||
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
|
||||
index 06fe45c..4ce4ac1 100644
|
||||
index 06fe45c..63744cf 100644
|
||||
--- a/drivers/dma/amba-pl08x.c
|
||||
+++ b/drivers/dma/amba-pl08x.c
|
||||
@@ -886,8 +886,8 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
|
||||
@ -13,16 +13,19 @@ index 06fe45c..4ce4ac1 100644
|
||||
dev_err(&pl08x->adev->dev,
|
||||
"%s src & dst address must be aligned to src"
|
||||
" & dst width if peripheral is flow controller",
|
||||
@@ -908,7 +908,7 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
|
||||
@@ -908,9 +908,8 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
|
||||
*/
|
||||
if (bd.remainder < mbus->buswidth)
|
||||
early_bytes = bd.remainder;
|
||||
- else if ((mbus->addr) % (mbus->buswidth)) {
|
||||
+ else if (((u8)(mbus->addr & 0xff)) % (mbus->buswidth)) {
|
||||
early_bytes = mbus->buswidth - (mbus->addr) %
|
||||
(mbus->buswidth);
|
||||
- early_bytes = mbus->buswidth - (mbus->addr) %
|
||||
- (mbus->buswidth);
|
||||
+ else if ((early_bytes = (u8)(mbus->addr & 0xff) % mbus->buswidth)) {
|
||||
+ early_bytes = mbus->buswidth - early_bytes;
|
||||
if ((bd.remainder - early_bytes) < mbus->buswidth)
|
||||
@@ -928,7 +928,7 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
|
||||
early_bytes = bd.remainder;
|
||||
}
|
||||
@@ -928,7 +927,7 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
|
||||
* Master now aligned
|
||||
* - if slave is not then we must set its width down
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user