All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: wlan-ng: Edit struct member type for endianness verification
@ 2016-09-22  3:20 Katie Dunne
  2016-09-23  6:48 ` [Outreachy kernel] " Alison Schofield
  0 siblings, 1 reply; 4+ messages in thread
From: Katie Dunne @ 2016-09-22  3:20 UTC (permalink / raw)
  To: outreachy-kernel

Fixes warnings found using sparse on
drivers/staging/wlan-ng/p80211conv.c:
warning: cast to restricted __le16
warning: cast to restricted __be16

Updates the corresponding type in
drivers/staging/wlan-ng/p80211conv.h

Signed-off-by: Katie Dunne <kdunne@mail.ccsf.edu>
---
 drivers/staging/wlan-ng/p80211conv.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wlan-ng/p80211conv.h b/drivers/staging/wlan-ng/p80211conv.h
index 8c10357..d8fda07 100644
--- a/drivers/staging/wlan-ng/p80211conv.h
+++ b/drivers/staging/wlan-ng/p80211conv.h
@@ -130,7 +130,7 @@ struct p80211_metawep {
 struct wlan_ethhdr {
 	u8 daddr[ETH_ALEN];
 	u8 saddr[ETH_ALEN];
-	u16 type;
+	__be16 type;
 } __packed;
 
 /* local llc header type */
@@ -143,7 +143,7 @@ struct wlan_llc {
 /* local snap header type */
 struct wlan_snap {
 	u8 oui[WLAN_IEEE_OUI_LEN];
-	u16 type;
+	__le16 type;
 } __packed;
 
 /* Circular include trick */
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Outreachy kernel] [PATCH] staging: wlan-ng: Edit struct member type for endianness verification
  2016-09-22  3:20 [PATCH] staging: wlan-ng: Edit struct member type for endianness verification Katie Dunne
@ 2016-09-23  6:48 ` Alison Schofield
  2016-09-23  7:06   ` Julia Lawall
  0 siblings, 1 reply; 4+ messages in thread
From: Alison Schofield @ 2016-09-23  6:48 UTC (permalink / raw)
  To: Katie Dunne; +Cc: outreachy-kernel

On Wed, Sep 21, 2016 at 08:20:14PM -0700, Katie Dunne wrote:
> Fixes warnings found using sparse on
> drivers/staging/wlan-ng/p80211conv.c:
> warning: cast to restricted __le16
> warning: cast to restricted __be16
> 
> Updates the corresponding type in
> drivers/staging/wlan-ng/p80211conv.h

Hi Katie,

I ran sparse on p80211conv.c before the patch, and then again after
the patch and can see the sparse errors that the change cleans up.
My concern is with the ones it leaves undone and new ones added 
at line 452.

I'm guessing it's best to work this type of problem as a whole, rather
than addressing pieces of it.

I see Greg is maintainer, so look some more at those warnings and
wait and see what he says.

alisons


> 
> Signed-off-by: Katie Dunne <kdunne@mail.ccsf.edu>
> ---
>  drivers/staging/wlan-ng/p80211conv.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/wlan-ng/p80211conv.h b/drivers/staging/wlan-ng/p80211conv.h
> index 8c10357..d8fda07 100644
> --- a/drivers/staging/wlan-ng/p80211conv.h
> +++ b/drivers/staging/wlan-ng/p80211conv.h
> @@ -130,7 +130,7 @@ struct p80211_metawep {
>  struct wlan_ethhdr {
>  	u8 daddr[ETH_ALEN];
>  	u8 saddr[ETH_ALEN];
> -	u16 type;
> +	__be16 type;
>  } __packed;
>  
>  /* local llc header type */
> @@ -143,7 +143,7 @@ struct wlan_llc {
>  /* local snap header type */
>  struct wlan_snap {
>  	u8 oui[WLAN_IEEE_OUI_LEN];
> -	u16 type;
> +	__le16 type;
>  } __packed;
>  
>  /* Circular include trick */
> -- 
> 2.7.4
> 
> -- 
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160922032014.GA31033%40katie-Inspiron-5748.
> For more options, visit https://groups.google.com/d/optout.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Outreachy kernel] [PATCH] staging: wlan-ng: Edit struct member type for endianness verification
  2016-09-23  6:48 ` [Outreachy kernel] " Alison Schofield
@ 2016-09-23  7:06   ` Julia Lawall
  2016-09-23  7:33     ` Alison Schofield
  0 siblings, 1 reply; 4+ messages in thread
From: Julia Lawall @ 2016-09-23  7:06 UTC (permalink / raw)
  To: Alison Schofield; +Cc: Katie Dunne, outreachy-kernel



On Thu, 22 Sep 2016, Alison Schofield wrote:

> On Wed, Sep 21, 2016 at 08:20:14PM -0700, Katie Dunne wrote:
> > Fixes warnings found using sparse on
> > drivers/staging/wlan-ng/p80211conv.c:
> > warning: cast to restricted __le16
> > warning: cast to restricted __be16
> >
> > Updates the corresponding type in
> > drivers/staging/wlan-ng/p80211conv.h
>
> Hi Katie,
>
> I ran sparse on p80211conv.c before the patch, and then again after
> the patch and can see the sparse errors that the change cleans up.
> My concern is with the ones it leaves undone and new ones added
> at line 452.
>
> I'm guessing it's best to work this type of problem as a whole, rather
> than addressing pieces of it.

I'm not certain that it is necessary to address all instances of an issue,
if they are disjoint, and if they require different amounts of knowledge.
Then nothing would happen until the most expert person comes across the
issue.  And anyway the tool will continue to find the other
occurrences.  But adding new issues is not good.

julia


>
> I see Greg is maintainer, so look some more at those warnings and
> wait and see what he says.
>
> alisons
>
>
> >
> > Signed-off-by: Katie Dunne <kdunne@mail.ccsf.edu>
> > ---
> >  drivers/staging/wlan-ng/p80211conv.h | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/staging/wlan-ng/p80211conv.h b/drivers/staging/wlan-ng/p80211conv.h
> > index 8c10357..d8fda07 100644
> > --- a/drivers/staging/wlan-ng/p80211conv.h
> > +++ b/drivers/staging/wlan-ng/p80211conv.h
> > @@ -130,7 +130,7 @@ struct p80211_metawep {
> >  struct wlan_ethhdr {
> >  	u8 daddr[ETH_ALEN];
> >  	u8 saddr[ETH_ALEN];
> > -	u16 type;
> > +	__be16 type;
> >  } __packed;
> >
> >  /* local llc header type */
> > @@ -143,7 +143,7 @@ struct wlan_llc {
> >  /* local snap header type */
> >  struct wlan_snap {
> >  	u8 oui[WLAN_IEEE_OUI_LEN];
> > -	u16 type;
> > +	__le16 type;
> >  } __packed;
> >
> >  /* Circular include trick */
> > --
> > 2.7.4
> >
> > --
> > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> > To post to this group, send email to outreachy-kernel@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160922032014.GA31033%40katie-Inspiron-5748.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160923064804.GA2338%40d830.WORKGROUP.
> For more options, visit https://groups.google.com/d/optout.
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Outreachy kernel] [PATCH] staging: wlan-ng: Edit struct member type for endianness verification
  2016-09-23  7:06   ` Julia Lawall
@ 2016-09-23  7:33     ` Alison Schofield
  0 siblings, 0 replies; 4+ messages in thread
From: Alison Schofield @ 2016-09-23  7:33 UTC (permalink / raw)
  To: Julia Lawall; +Cc: Katie Dunne, outreachy-kernel

On Fri, Sep 23, 2016 at 09:06:18AM +0200, Julia Lawall wrote:
> 
> 
> On Thu, 22 Sep 2016, Alison Schofield wrote:
> 
> > On Wed, Sep 21, 2016 at 08:20:14PM -0700, Katie Dunne wrote:
> > > Fixes warnings found using sparse on
> > > drivers/staging/wlan-ng/p80211conv.c:
> > > warning: cast to restricted __le16
> > > warning: cast to restricted __be16
> > >
> > > Updates the corresponding type in
> > > drivers/staging/wlan-ng/p80211conv.h
> >
> > Hi Katie,
> >
> > I ran sparse on p80211conv.c before the patch, and then again after
> > the patch and can see the sparse errors that the change cleans up.
> > My concern is with the ones it leaves undone and new ones added
> > at line 452.
> >
> > I'm guessing it's best to work this type of problem as a whole, rather
> > than addressing pieces of it.
> 
> I'm not certain that it is necessary to address all instances of an issue,
> if they are disjoint, and if they require different amounts of knowledge.
> Then nothing would happen until the most expert person comes across the
> issue.  And anyway the tool will continue to find the other
> occurrences.  But adding new issues is not good.
> 
> julia

Not sure these could be called disjoint.  They are all about managing the
incoming data - endianess related warnings.  The changes are also in a
header file, so it fans out even further than just the file mentioned above.  
alisons

> 
> 
> >
> > I see Greg is maintainer, so look some more at those warnings and
> > wait and see what he says.
> >
> > alisons
> >
> >
> > >
> > > Signed-off-by: Katie Dunne <kdunne@mail.ccsf.edu>
> > > ---
> > >  drivers/staging/wlan-ng/p80211conv.h | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/staging/wlan-ng/p80211conv.h b/drivers/staging/wlan-ng/p80211conv.h
> > > index 8c10357..d8fda07 100644
> > > --- a/drivers/staging/wlan-ng/p80211conv.h
> > > +++ b/drivers/staging/wlan-ng/p80211conv.h
> > > @@ -130,7 +130,7 @@ struct p80211_metawep {
> > >  struct wlan_ethhdr {
> > >  	u8 daddr[ETH_ALEN];
> > >  	u8 saddr[ETH_ALEN];
> > > -	u16 type;
> > > +	__be16 type;
> > >  } __packed;
> > >
> > >  /* local llc header type */
> > > @@ -143,7 +143,7 @@ struct wlan_llc {
> > >  /* local snap header type */
> > >  struct wlan_snap {
> > >  	u8 oui[WLAN_IEEE_OUI_LEN];
> > > -	u16 type;
> > > +	__le16 type;
> > >  } __packed;
> > >
> > >  /* Circular include trick */
> > > --
> > > 2.7.4
> > >
> > > --
> > > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> > > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> > > To post to this group, send email to outreachy-kernel@googlegroups.com.
> > > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160922032014.GA31033%40katie-Inspiron-5748.
> > > For more options, visit https://groups.google.com/d/optout.
> >
> > --
> > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> > To post to this group, send email to outreachy-kernel@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160923064804.GA2338%40d830.WORKGROUP.
> > For more options, visit https://groups.google.com/d/optout.
> >


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-09-23  7:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-22  3:20 [PATCH] staging: wlan-ng: Edit struct member type for endianness verification Katie Dunne
2016-09-23  6:48 ` [Outreachy kernel] " Alison Schofield
2016-09-23  7:06   ` Julia Lawall
2016-09-23  7:33     ` Alison Schofield

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.