lkml.org 
[lkml]   [2024]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] net: smc91x: Fix pointer types
> -#define SMC_PUSH_DATA(lp, p, l)					\
> +#define SMC_PUSH_DATA(lp, p, l) \
> do { \
> - if (SMC_32BIT(lp)) { \
> + void __iomem *__ioaddr = ioaddr; \

ioaddr is not a parameter passed to this macro.

> + if (SMC_32BIT(lp)) { \
> void *__ptr = (p); \
> int __len = (l); \
> - void __iomem *__ioaddr = ioaddr; \
> if (__len >= 2 && (unsigned long)__ptr & 2) { \
> __len -= 2; \
> - SMC_outsw(ioaddr, DATA_REG(lp), __ptr, 1); \
> + SMC_outsw(__ioaddr, DATA_REG(lp), __ptr, 1); \

You probably should use lp->base here, which is passed into this
macro, and should have the correct type.

> @@ -1072,7 +1072,7 @@ static const char * chip_ids[ 16 ] = {
> */ \
> __ptr -= 2; \
> __len += 2; \
> - SMC_SET_PTR(lp, \
> + SMC_SET_PTR(lp, \
> 2|PTR_READ|PTR_RCV|PTR_AUTOINC); \
> } \
> if (SMC_CAN_USE_DATACS && lp->datacs) \

This is just a whitespace change. Please put that into a different
patch.

Andrew

\
 
 \ /
  Last update: 2024-05-27 18:29    [W:0.058 / U:0.788 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site