Skip to content

Commit 2125801

Browse files
arndbolofj
authored andcommitted
ARM: iop: don't use using 64-bit DMA masks
clang warns about statically defined DMA masks from the DMA_BIT_MASK macro with length 64: arch/arm/mach-iop13xx/setup.c:303:35: error: shift count >= width of type [-Werror,-Wshift-count-overflow] static u64 iop13xx_adma_dmamask = DMA_BIT_MASK(64); ^~~~~~~~~~~~~~~~ include/linux/dma-mapping.h:141:54: note: expanded from macro 'DMA_BIT_MASK' #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) ^ ~~~ The ones in iop shouldn't really be 64 bit masks, so changing them to what the driver can support avoids the warning. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Olof Johansson <[email protected]>
1 parent cd92d74 commit 2125801

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

arch/arm/mach-iop13xx/setup.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ static struct resource iop13xx_adma_2_resources[] = {
300300
}
301301
};
302302

303-
static u64 iop13xx_adma_dmamask = DMA_BIT_MASK(64);
303+
static u64 iop13xx_adma_dmamask = DMA_BIT_MASK(32);
304304
static struct iop_adma_platform_data iop13xx_adma_0_data = {
305305
.hw_id = 0,
306306
.pool_size = PAGE_SIZE,
@@ -324,7 +324,7 @@ static struct platform_device iop13xx_adma_0_channel = {
324324
.resource = iop13xx_adma_0_resources,
325325
.dev = {
326326
.dma_mask = &iop13xx_adma_dmamask,
327-
.coherent_dma_mask = DMA_BIT_MASK(64),
327+
.coherent_dma_mask = DMA_BIT_MASK(32),
328328
.platform_data = (void *) &iop13xx_adma_0_data,
329329
},
330330
};
@@ -336,7 +336,7 @@ static struct platform_device iop13xx_adma_1_channel = {
336336
.resource = iop13xx_adma_1_resources,
337337
.dev = {
338338
.dma_mask = &iop13xx_adma_dmamask,
339-
.coherent_dma_mask = DMA_BIT_MASK(64),
339+
.coherent_dma_mask = DMA_BIT_MASK(32),
340340
.platform_data = (void *) &iop13xx_adma_1_data,
341341
},
342342
};
@@ -348,7 +348,7 @@ static struct platform_device iop13xx_adma_2_channel = {
348348
.resource = iop13xx_adma_2_resources,
349349
.dev = {
350350
.dma_mask = &iop13xx_adma_dmamask,
351-
.coherent_dma_mask = DMA_BIT_MASK(64),
351+
.coherent_dma_mask = DMA_BIT_MASK(32),
352352
.platform_data = (void *) &iop13xx_adma_2_data,
353353
},
354354
};

arch/arm/mach-iop13xx/tpmi.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -152,15 +152,15 @@ static struct resource iop13xx_tpmi_3_resources[] = {
152152
}
153153
};
154154

155-
u64 iop13xx_tpmi_mask = DMA_BIT_MASK(64);
155+
u64 iop13xx_tpmi_mask = DMA_BIT_MASK(32);
156156
static struct platform_device iop13xx_tpmi_0_device = {
157157
.name = "iop-tpmi",
158158
.id = 0,
159159
.num_resources = ARRAY_SIZE(iop13xx_tpmi_0_resources),
160160
.resource = iop13xx_tpmi_0_resources,
161161
.dev = {
162162
.dma_mask = &iop13xx_tpmi_mask,
163-
.coherent_dma_mask = DMA_BIT_MASK(64),
163+
.coherent_dma_mask = DMA_BIT_MASK(32),
164164
},
165165
};
166166

@@ -171,7 +171,7 @@ static struct platform_device iop13xx_tpmi_1_device = {
171171
.resource = iop13xx_tpmi_1_resources,
172172
.dev = {
173173
.dma_mask = &iop13xx_tpmi_mask,
174-
.coherent_dma_mask = DMA_BIT_MASK(64),
174+
.coherent_dma_mask = DMA_BIT_MASK(32),
175175
},
176176
};
177177

@@ -182,7 +182,7 @@ static struct platform_device iop13xx_tpmi_2_device = {
182182
.resource = iop13xx_tpmi_2_resources,
183183
.dev = {
184184
.dma_mask = &iop13xx_tpmi_mask,
185-
.coherent_dma_mask = DMA_BIT_MASK(64),
185+
.coherent_dma_mask = DMA_BIT_MASK(32),
186186
},
187187
};
188188

@@ -193,7 +193,7 @@ static struct platform_device iop13xx_tpmi_3_device = {
193193
.resource = iop13xx_tpmi_3_resources,
194194
.dev = {
195195
.dma_mask = &iop13xx_tpmi_mask,
196-
.coherent_dma_mask = DMA_BIT_MASK(64),
196+
.coherent_dma_mask = DMA_BIT_MASK(32),
197197
},
198198
};
199199

arch/arm/plat-iop/adma.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ struct platform_device iop3xx_dma_0_channel = {
143143
.resource = iop3xx_dma_0_resources,
144144
.dev = {
145145
.dma_mask = &iop3xx_adma_dmamask,
146-
.coherent_dma_mask = DMA_BIT_MASK(64),
146+
.coherent_dma_mask = DMA_BIT_MASK(32),
147147
.platform_data = (void *) &iop3xx_dma_0_data,
148148
},
149149
};
@@ -155,7 +155,7 @@ struct platform_device iop3xx_dma_1_channel = {
155155
.resource = iop3xx_dma_1_resources,
156156
.dev = {
157157
.dma_mask = &iop3xx_adma_dmamask,
158-
.coherent_dma_mask = DMA_BIT_MASK(64),
158+
.coherent_dma_mask = DMA_BIT_MASK(32),
159159
.platform_data = (void *) &iop3xx_dma_1_data,
160160
},
161161
};
@@ -167,7 +167,7 @@ struct platform_device iop3xx_aau_channel = {
167167
.resource = iop3xx_aau_resources,
168168
.dev = {
169169
.dma_mask = &iop3xx_adma_dmamask,
170-
.coherent_dma_mask = DMA_BIT_MASK(64),
170+
.coherent_dma_mask = DMA_BIT_MASK(32),
171171
.platform_data = (void *) &iop3xx_aau_data,
172172
},
173173
};

0 commit comments

Comments
 (0)