Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1592589 > unrolled thread
| Started by | Andrea Ghittino <aghittino@gmail.com> |
|---|---|
| First post | 2017-03-04 18:30 +0100 |
| Last post | 2017-03-07 23:00 +0100 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] staging: unisys: fix sparse warnings Andrea Ghittino <aghittino@gmail.com> - 2017-03-04 18:30 +0100
RE: [PATCH] staging: unisys: fix sparse warnings "Kershner, David A" <David.Kershner@unisys.com> - 2017-03-07 13:50 +0100
Re: [PATCH] staging: unisys: fix sparse warnings Andrea Ghittino <aghittino@gmail.com> - 2017-03-07 22:50 +0100
Re: [PATCH] staging: unisys: fix sparse warnings Dan Carpenter <dan.carpenter@oracle.com> - 2017-03-07 23:00 +0100
| From | Andrea Ghittino <aghittino@gmail.com> |
|---|---|
| Date | 2017-03-04 18:30 +0100 |
| Subject | [PATCH] staging: unisys: fix sparse warnings |
| Message-ID | <thlFf-47R-1@gated-at.bofh.it> |
Sparse generates two warnings related to incorrect type in assignment.
This patch changes the types in the struct defined in unisys
Signed-off-by: Andrea Ghittino <aghittino@gmail.com>
---
Compile tested only
iochannel.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/unisys/include/iochannel.h b/drivers/staging/unisys/include/iochannel.h
index 54f4900..41e5b4e 100644
--- a/drivers/staging/unisys/include/iochannel.h
+++ b/drivers/staging/unisys/include/iochannel.h
@@ -308,8 +308,8 @@ struct net_pkt_xmt {
u8 valid; /* 1 = struct is valid - else ignore */
u8 hrawoffv; /* 1 = hwrafoff is valid */
u8 nhrawoffv; /* 1 = nhwrafoff is valid */
- u16 protocol; /* specifies packet protocol */
- u32 csum; /* value used to set skb->csum at IOPart */
+ __be16 protocol; /* specifies packet protocol */
+ __wsum csum; /* value used to set skb->csum at IOPart */
u32 hrawoff; /* value used to set skb->h.raw at IOPart */
/* hrawoff points to the start of the TRANSPORT LAYER HEADER */
u32 nhrawoff; /* value used to set skb->nh.raw at IOPart */
[toc] | [next] | [standalone]
| From | "Kershner, David A" <David.Kershner@unisys.com> |
|---|---|
| Date | 2017-03-07 13:50 +0100 |
| Message-ID | <timIW-7Bl-15@gated-at.bofh.it> |
| In reply to | #1592589 |
> -----Original Message-----
> From: Andrea Ghittino [mailto:aghittino@gmail.com]
> Sent: Saturday, March 4, 2017 12:21 PM
> To: devel@driverdev.osuosl.org; Kershner, David A
> <David.Kershner@unisys.com>; gregkh@linuxfoundation.org; *S-Par-
> Maintainer <SParMaintainer@unisys.com>; linux-kernel@vger.kernel.org
> Subject: [PATCH] staging: unisys: fix sparse warnings
>
> Sparse generates two warnings related to incorrect type in assignment.
> This patch changes the types in the struct defined in unisys
>
> Signed-off-by: Andrea Ghittino <aghittino@gmail.com>
Acked-by: David Kershner <david.kershner@unisys.com>
Tested it on s-Par and no problems.
> ---
> Compile tested only
>
> iochannel.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/unisys/include/iochannel.h
> b/drivers/staging/unisys/include/iochannel.h
> index 54f4900..41e5b4e 100644
> --- a/drivers/staging/unisys/include/iochannel.h
> +++ b/drivers/staging/unisys/include/iochannel.h
> @@ -308,8 +308,8 @@ struct net_pkt_xmt {
> u8 valid; /* 1 = struct is valid - else ignore */
> u8 hrawoffv; /* 1 = hwrafoff is valid */
> u8 nhrawoffv; /* 1 = nhwrafoff is valid */
> - u16 protocol; /* specifies packet protocol */
> - u32 csum; /* value used to set skb->csum at IOPart */
> + __be16 protocol; /* specifies packet protocol */
> + __wsum csum; /* value used to set skb->csum at IOPart */
> u32 hrawoff; /* value used to set skb->h.raw at IOPart */
> /* hrawoff points to the start of the TRANSPORT LAYER
> HEADER */
> u32 nhrawoff; /* value used to set skb->nh.raw at IOPart */
[toc] | [prev] | [next] | [standalone]
| From | Andrea Ghittino <aghittino@gmail.com> |
|---|---|
| Date | 2017-03-07 22:50 +0100 |
| Message-ID | <tiv9v-5b2-17@gated-at.bofh.it> |
| In reply to | #1592589 |
On Tue, Mar 07, 2017 at 11:17:36PM +0300, Dan Carpenter wrote: > On Sat, Mar 04, 2017 at 06:20:50PM +0100, Andrea Ghittino wrote: > > Sparse generates two warnings related to incorrect type in assignment. > > This patch changes the types in the struct defined in unisys > > Can you post the Sparse warning? Otherwise when I'm reviewing this > code I have to re-run Sparse to see what you're talking about. > > regards, > dan carpenter Here you can find sparse warnings: drivers/staging/unisys/visornic/visornic_main.c:844:50: warning: incorrect type in assignment (different base types) drivers/staging/unisys/visornic/visornic_main.c:844:50: expected unsigned short [unsigned] [usertype] protocol drivers/staging/unisys/visornic/visornic_main.c:844:50: got restricted __be16 [usertype] protocol drivers/staging/unisys/visornic/visornic_main.c:855:46: warning: incorrect type in assignment (different base types) drivers/staging/unisys/visornic/visornic_main.c:855:46: expected unsigned int [unsigned] [usertype] csum drivers/staging/unisys/visornic/visornic_main.c:855:46: got restricted __wsum [usertype] csum andrea
[toc] | [prev] | [next] | [standalone]
| From | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| Date | 2017-03-07 23:00 +0100 |
| Message-ID | <tiv9v-5b2-19@gated-at.bofh.it> |
| In reply to | #1592589 |
On Sat, Mar 04, 2017 at 06:20:50PM +0100, Andrea Ghittino wrote: > Sparse generates two warnings related to incorrect type in assignment. > This patch changes the types in the struct defined in unisys Can you post the Sparse warning? Otherwise when I'm reviewing this code I have to re-run Sparse to see what you're talking about. regards, dan carpenter
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web