linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] lib.c: skip --param parameters
@ 2014-06-16 10:43 Andy Shevchenko
  2014-06-16 16:02 ` Josh Triplett
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2014-06-16 10:43 UTC (permalink / raw)
  To: linux-kernel, linux-sparse; +Cc: Andy Shevchenko

Very dumb patch to just skip --param allow-store-data-races=0 introduced in
newest Linux kernel buildsystem.

Actually the option is present in few GCC versions and probably should be
handled properly.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 lib.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib.c b/lib.c
index bf3e91c..e56037b 100644
--- a/lib.c
+++ b/lib.c
@@ -673,6 +673,12 @@ static char **handle_version(char *arg, char **next)
 	exit(0);
 }
 
+static char **handle_param(char *arg, char **next)
+{
+	++next;
+	return ++next;
+}
+
 struct switches {
 	const char *name;
 	char **(*fn)(char *, char **);
@@ -681,6 +687,7 @@ struct switches {
 static char **handle_long_options(char *arg, char **next)
 {
 	static struct switches cmd[] = {
+		{ "param", handle_param },
 		{ "version", handle_version },
 		{ NULL, NULL }
 	};
-- 
2.0.0

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

* Re: [PATCH] lib.c: skip --param parameters
  2014-06-16 10:43 [PATCH] lib.c: skip --param parameters Andy Shevchenko
@ 2014-06-16 16:02 ` Josh Triplett
  2014-06-16 23:48   ` David Rientjes
  2014-06-17  8:15   ` Andy Shevchenko
  0 siblings, 2 replies; 5+ messages in thread
From: Josh Triplett @ 2014-06-16 16:02 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-kernel, linux-sparse

On Mon, Jun 16, 2014 at 01:43:06PM +0300, Andy Shevchenko wrote:
> Very dumb patch to just skip --param allow-store-data-races=0 introduced in
> newest Linux kernel buildsystem.
> 
> Actually the option is present in few GCC versions and probably should be
> handled properly.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

As far as I can tell, this seems to only handle "--param arg"; however,
according to the thread on LKML, GCC handles --param=arg as well.  Could
you please handle that variant too?

>  lib.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/lib.c b/lib.c
> index bf3e91c..e56037b 100644
> --- a/lib.c
> +++ b/lib.c
> @@ -673,6 +673,12 @@ static char **handle_version(char *arg, char **next)
>  	exit(0);
>  }
>  
> +static char **handle_param(char *arg, char **next)
> +{
> +	++next;
> +	return ++next;
> +}
> +
>  struct switches {
>  	const char *name;
>  	char **(*fn)(char *, char **);
> @@ -681,6 +687,7 @@ struct switches {
>  static char **handle_long_options(char *arg, char **next)
>  {
>  	static struct switches cmd[] = {
> +		{ "param", handle_param },
>  		{ "version", handle_version },
>  		{ NULL, NULL }
>  	};
> -- 
> 2.0.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] lib.c: skip --param parameters
  2014-06-16 16:02 ` Josh Triplett
@ 2014-06-16 23:48   ` David Rientjes
  2014-06-17  2:36     ` Josh Triplett
  2014-06-17  8:15   ` Andy Shevchenko
  1 sibling, 1 reply; 5+ messages in thread
From: David Rientjes @ 2014-06-16 23:48 UTC (permalink / raw)
  To: Josh Triplett; +Cc: Andy Shevchenko, linux-kernel, linux-sparse

On Mon, 16 Jun 2014, Josh Triplett wrote:

> On Mon, Jun 16, 2014 at 01:43:06PM +0300, Andy Shevchenko wrote:
> > Very dumb patch to just skip --param allow-store-data-races=0 introduced in
> > newest Linux kernel buildsystem.
> > 
> > Actually the option is present in few GCC versions and probably should be
> > handled properly.
> > 
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> As far as I can tell, this seems to only handle "--param arg"; however,
> according to the thread on LKML, GCC handles --param=arg as well.  Could
> you please handle that variant too?
> 

This is only from linux-next and not Linus's tree, correct?

Is this still necessary since the "./Makefile: tell gcc optimizer to never 
introduce new data races" patch has been removed from -mm due to failures?

See http://marc.info/?l=linux-mm-commits&m=140295825623471

> >  lib.c | 7 +++++++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git a/lib.c b/lib.c
> > index bf3e91c..e56037b 100644
> > --- a/lib.c
> > +++ b/lib.c
> > @@ -673,6 +673,12 @@ static char **handle_version(char *arg, char **next)
> >  	exit(0);
> >  }
> >  
> > +static char **handle_param(char *arg, char **next)
> > +{
> > +	++next;
> > +	return ++next;
> > +}
> > +
> >  struct switches {
> >  	const char *name;
> >  	char **(*fn)(char *, char **);
> > @@ -681,6 +687,7 @@ struct switches {
> >  static char **handle_long_options(char *arg, char **next)
> >  {
> >  	static struct switches cmd[] = {
> > +		{ "param", handle_param },
> >  		{ "version", handle_version },
> >  		{ NULL, NULL }
> >  	};

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

* Re: [PATCH] lib.c: skip --param parameters
  2014-06-16 23:48   ` David Rientjes
@ 2014-06-17  2:36     ` Josh Triplett
  0 siblings, 0 replies; 5+ messages in thread
From: Josh Triplett @ 2014-06-17  2:36 UTC (permalink / raw)
  To: David Rientjes; +Cc: Andy Shevchenko, linux-kernel, linux-sparse

On Mon, Jun 16, 2014 at 04:48:51PM -0700, David Rientjes wrote:
> On Mon, 16 Jun 2014, Josh Triplett wrote:
> 
> > On Mon, Jun 16, 2014 at 01:43:06PM +0300, Andy Shevchenko wrote:
> > > Very dumb patch to just skip --param allow-store-data-races=0 introduced in
> > > newest Linux kernel buildsystem.
> > > 
> > > Actually the option is present in few GCC versions and probably should be
> > > handled properly.
> > > 
> > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > 
> > As far as I can tell, this seems to only handle "--param arg"; however,
> > according to the thread on LKML, GCC handles --param=arg as well.  Could
> > you please handle that variant too?
> > 
> 
> This is only from linux-next and not Linus's tree, correct?
> 
> Is this still necessary since the "./Makefile: tell gcc optimizer to never 
> introduce new data races" patch has been removed from -mm due to failures?
> 
> See http://marc.info/?l=linux-mm-commits&m=140295825623471

I'd still like to see Sparse not choke on the option, in either form,
whether the kernel ends up using it or not.

- Josh Triplett

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

* Re: [PATCH] lib.c: skip --param parameters
  2014-06-16 16:02 ` Josh Triplett
  2014-06-16 23:48   ` David Rientjes
@ 2014-06-17  8:15   ` Andy Shevchenko
  1 sibling, 0 replies; 5+ messages in thread
From: Andy Shevchenko @ 2014-06-17  8:15 UTC (permalink / raw)
  To: Josh Triplett; +Cc: linux-kernel, linux-sparse

On Mon, 2014-06-16 at 09:02 -0700, Josh Triplett wrote:
> On Mon, Jun 16, 2014 at 01:43:06PM +0300, Andy Shevchenko wrote:
> > Very dumb patch to just skip --param allow-store-data-races=0 introduced in
> > newest Linux kernel buildsystem.
> > 
> > Actually the option is present in few GCC versions and probably should be
> > handled properly.
> > 
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> As far as I can tell, this seems to only handle "--param arg"; however,
> according to the thread on LKML, GCC handles --param=arg as well.  Could
> you please handle that variant too?

Yes, I will in v2.

> 
> >  lib.c | 7 +++++++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git a/lib.c b/lib.c
> > index bf3e91c..e56037b 100644
> > --- a/lib.c
> > +++ b/lib.c
> > @@ -673,6 +673,12 @@ static char **handle_version(char *arg, char **next)
> >  	exit(0);
> >  }
> >  
> > +static char **handle_param(char *arg, char **next)
> > +{
> > +	++next;
> > +	return ++next;
> > +}
> > +
> >  struct switches {
> >  	const char *name;
> >  	char **(*fn)(char *, char **);
> > @@ -681,6 +687,7 @@ struct switches {
> >  static char **handle_long_options(char *arg, char **next)
> >  {
> >  	static struct switches cmd[] = {
> > +		{ "param", handle_param },
> >  		{ "version", handle_version },
> >  		{ NULL, NULL }
> >  	};
> > -- 
> > 2.0.0
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html


-- 
Andy Shevchenko <andriy.shevchenko@intel.com>
Intel Finland Oy


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

end of thread, other threads:[~2014-06-17  8:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-16 10:43 [PATCH] lib.c: skip --param parameters Andy Shevchenko
2014-06-16 16:02 ` Josh Triplett
2014-06-16 23:48   ` David Rientjes
2014-06-17  2:36     ` Josh Triplett
2014-06-17  8:15   ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).