Re: [Cocci] [PATCH v2 0/2] of: of_device.h cleanups

2021-02-11 Thread Greg Kroah-Hartman
On Thu, Feb 11, 2021 at 05:27:43PM -0600, Rob Herring wrote:
> This is a couple of cleanups for of_device.h. They fell out from my
> attempt at decoupling of_device.h and of_platform.h which is a mess
> and I haven't finished, but there's no reason to wait on these.

Reviewed-by: Greg Kroah-Hartman 
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] [PATCH v2] scripts: coccicheck: Change default value for parallelism

2020-08-14 Thread Greg Kroah-Hartman
On Fri, Aug 14, 2020 at 03:06:06PM +0200, Markus Elfring wrote:
> > a decrease in performance is noted. The elapsed time is  minimum
> 
> Can the following wording variant be more appropriate?
> 
>   a decrease was noticed in the software performance. The elapsed time is 
> minimal
> 
> 
> > respectively for two separate runs. …
> 
> Can such information trigger further considerations for benchmarking 
> approaches?
> 
> Regards,
> Markus


Hi,

This is the semi-friendly patch-bot of Greg Kroah-Hartman.

Markus, you seem to have sent a nonsensical or otherwise pointless
review comment to a patch submission on a Linux kernel developer mailing
list.  I strongly suggest that you not do this anymore.  Please do not
bother developers who are actively working to produce patches and
features with comments that, in the end, are a waste of time.

Patch submitter, please ignore Markus's suggestion; you do not need to
follow it at all.  The person/bot/AI that sent it is being ignored by
almost all Linux kernel maintainers for having a persistent pattern of
behavior of producing distracting and pointless commentary, and
inability to adapt to feedback.  Please feel free to also ignore emails
from them.

thanks,

greg k-h's patch email bot
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] [v3] documentation: coccinelle: Improve command example for make C={1, 2}

2020-08-11 Thread Greg Kroah-Hartman
On Tue, Aug 11, 2020 at 09:03:09AM +0200, Markus Elfring wrote:
> >>> the usage of the makefile C variable flag by coccicheck.
> >>
> >> * Can it be confusing to denote an item as a variable and a flag?
> >>
> >> * Would you really like to stress here that a flag can be variable?
> >
> > This is not part of the documentation, so it doesn't really matter.
> 
> It seems then that your expectations for the clarity of change descriptions
> (or commit messages) can vary considerably.
> 
> 
> > Nevertheless, Sumera, there is stail an occurrence of flag in the proposed
> > change to the documentation, so you could indeed change that one to 
> > variable.
> 
> Will any related adjustments become more interesting?
> 
> 
> >>> +This variable can be used to run scripts for …
> >>
> >> Can the scope for a make command be selected also without such a variable?
> >
> > If you know something that is different than what is in the documentation,
> > then please say what it is.  Don't just ask questions.
> 
> I suggest to increase the distinction for the application of such command 
> parameters.
> 
> 
> >> Will clarification requests for previously mentioned background information
> >> influence the proposed descriptions any further?
> >
> > The point is to document the use of make coccicheck,
> 
> Another attempt is evolving for the affected software documentation.
> 
> 
> > not the C variables.
> 
> I got an other impression here.
> 
> 
> > So the point about KBUILD_CHECK, while interesting, does not seem
> > appropriate for this documentation.
> 
> How do you think about to clarify the influence of a macro like 
> “KBUILD_CHECKSRC”
> (or the specification “$(call cmd,force_checksrc)”)?
> 
> Will a cross reference for the applied make scripts help to achieve
> a better common understanding (and corresponding descriptions) of
> the involved dependencies?
> 
> Regards,
> Markus



Hi,

This is the friendly semi-automated patch-bot of Greg Kroah-Hartman.
You have sent him a patch that has triggered this response.

Right now, the development tree you have sent a patch for is "closed"
due to the timing of the merge window.  Don't worry, the patch(es) you
have sent are not lost, and will be looked at after the merge window is
over (after the -rc1 kernel is released by Linus).

So thank you for your patience and your patches will be reviewed at this
later time, you do not have to do anything further, this is just a short
note to let you know the patch status and so you don't worry they didn't
make it through.

thanks,

greg k-h's patch email bot
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] [PATCH v4] documentation: coccinelle: Improve command example for make C={1, 2}

2020-08-11 Thread Greg Kroah-Hartman
On Tue, Aug 11, 2020 at 10:00:20AM +0200, Markus Elfring wrote:
> > +This variable can be used to run scripts for the entire kernel, a
> > +specific directory, or for a single file.
> 
> I imagine that this wording can be improved another bit (as I indicated it 
> before).

Hi,

This is the semi-friendly patch-bot of Greg Kroah-Hartman.

Markus, you seem to have sent a nonsensical or otherwise pointless
review comment to a patch submission on a Linux kernel developer mailing
list.  I strongly suggest that you not do this anymore.  Please do not
bother developers who are actively working to produce patches and
features with comments that, in the end, are a waste of time.

Patch submitter, please ignore Markus's suggestion; you do not need to
follow it at all.  The person/bot/AI that sent it is being ignored by
almost all Linux kernel maintainers for having a persistent pattern of
behavior of producing distracting and pointless commentary, and
inability to adapt to feedback.  Please feel free to also ignore emails
from them.

thanks,

greg k-h's patch email bot
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


[Cocci] [PATCH 5.4 23/67] scripts: add dummy report mode to add_namespace.cocci

2020-08-10 Thread Greg Kroah-Hartman
From: Matthias Maennich 

commit 55c7549819e438f40a3ef1d8ac5c38b73390bcb7 upstream.

When running `make coccicheck` in report mode using the
add_namespace.cocci file, it will fail for files that contain
MODULE_LICENSE. Those match the replacement precondition, but spatch
errors out as virtual.ns is not set.

In order to fix that, add the virtual rule nsdeps and only do search and
replace if that rule has been explicitly requested.

In order to make spatch happy in report mode, we also need a dummy rule,
as otherwise it errors out with "No rules apply". Using a script:python
rule appears unrelated and odd, but this is the shortest I could come up
with.

Adjust scripts/nsdeps accordingly to set the nsdeps rule when run trough
`make nsdeps`.

Suggested-by: Julia Lawall 
Fixes: c7c4e29fb5a4 ("scripts: add_namespace: Fix coccicheck failed")
Cc: YueHaibing 
Cc: j...@kernel.org
Cc: cocci@systeme.lip6.fr
Cc: sta...@vger.kernel.org
Signed-off-by: Matthias Maennich 
Reported-by: Shuah Khan 
Acked-by: Julia Lawall 
Link: https://lore.kernel.org/r/20200604164145.173925-1-maenn...@google.com
Signed-off-by: Greg Kroah-Hartman 

---
 scripts/coccinelle/misc/add_namespace.cocci |8 +++-
 scripts/nsdeps  |2 +-
 2 files changed, 8 insertions(+), 2 deletions(-)

--- a/scripts/coccinelle/misc/add_namespace.cocci
+++ b/scripts/coccinelle/misc/add_namespace.cocci
@@ -6,6 +6,7 @@
 /// add a missing namespace tag to a module source file.
 ///
 
+virtual nsdeps
 virtual report
 
 @has_ns_import@
@@ -16,10 +17,15 @@ MODULE_IMPORT_NS(ns);
 
 // Add missing imports, but only adjacent to a MODULE_LICENSE statement.
 // That ensures we are adding it only to the main module source file.
-@do_import depends on !has_ns_import@
+@do_import depends on !has_ns_import && nsdeps@
 declarer name MODULE_LICENSE;
 expression license;
 identifier virtual.ns;
 @@
 MODULE_LICENSE(license);
 + MODULE_IMPORT_NS(ns);
+
+// Dummy rule for report mode that would otherwise be empty and make spatch
+// fail ("No rules apply.")
+@script:python depends on report@
+@@
--- a/scripts/nsdeps
+++ b/scripts/nsdeps
@@ -23,7 +23,7 @@ fi
 
 generate_deps_for_ns() {
$SPATCH --very-quiet --in-place --sp-file \
-   $srctree/scripts/coccinelle/misc/add_namespace.cocci -D ns=$1 $2
+   $srctree/scripts/coccinelle/misc/add_namespace.cocci -D nsdeps 
-D ns=$1 $2
 }
 
 generate_deps() {


___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


[Cocci] [PATCH 5.7 21/79] scripts: add dummy report mode to add_namespace.cocci

2020-08-10 Thread Greg Kroah-Hartman
From: Matthias Maennich 

commit 55c7549819e438f40a3ef1d8ac5c38b73390bcb7 upstream.

When running `make coccicheck` in report mode using the
add_namespace.cocci file, it will fail for files that contain
MODULE_LICENSE. Those match the replacement precondition, but spatch
errors out as virtual.ns is not set.

In order to fix that, add the virtual rule nsdeps and only do search and
replace if that rule has been explicitly requested.

In order to make spatch happy in report mode, we also need a dummy rule,
as otherwise it errors out with "No rules apply". Using a script:python
rule appears unrelated and odd, but this is the shortest I could come up
with.

Adjust scripts/nsdeps accordingly to set the nsdeps rule when run trough
`make nsdeps`.

Suggested-by: Julia Lawall 
Fixes: c7c4e29fb5a4 ("scripts: add_namespace: Fix coccicheck failed")
Cc: YueHaibing 
Cc: j...@kernel.org
Cc: cocci@systeme.lip6.fr
Cc: sta...@vger.kernel.org
Signed-off-by: Matthias Maennich 
Reported-by: Shuah Khan 
Acked-by: Julia Lawall 
Link: https://lore.kernel.org/r/20200604164145.173925-1-maenn...@google.com
Signed-off-by: Greg Kroah-Hartman 

---
 scripts/coccinelle/misc/add_namespace.cocci |8 +++-
 scripts/nsdeps  |2 +-
 2 files changed, 8 insertions(+), 2 deletions(-)

--- a/scripts/coccinelle/misc/add_namespace.cocci
+++ b/scripts/coccinelle/misc/add_namespace.cocci
@@ -6,6 +6,7 @@
 /// add a missing namespace tag to a module source file.
 ///
 
+virtual nsdeps
 virtual report
 
 @has_ns_import@
@@ -16,10 +17,15 @@ MODULE_IMPORT_NS(ns);
 
 // Add missing imports, but only adjacent to a MODULE_LICENSE statement.
 // That ensures we are adding it only to the main module source file.
-@do_import depends on !has_ns_import@
+@do_import depends on !has_ns_import && nsdeps@
 declarer name MODULE_LICENSE;
 expression license;
 identifier virtual.ns;
 @@
 MODULE_LICENSE(license);
 + MODULE_IMPORT_NS(ns);
+
+// Dummy rule for report mode that would otherwise be empty and make spatch
+// fail ("No rules apply.")
+@script:python depends on report@
+@@
--- a/scripts/nsdeps
+++ b/scripts/nsdeps
@@ -29,7 +29,7 @@ fi
 
 generate_deps_for_ns() {
$SPATCH --very-quiet --in-place --sp-file \
-   $srctree/scripts/coccinelle/misc/add_namespace.cocci -D ns=$1 $2
+   $srctree/scripts/coccinelle/misc/add_namespace.cocci -D nsdeps 
-D ns=$1 $2
 }
 
 generate_deps() {


___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


[Cocci] [PATCH 5.8 21/38] scripts: add dummy report mode to add_namespace.cocci

2020-08-10 Thread Greg Kroah-Hartman
From: Matthias Maennich 

commit 55c7549819e438f40a3ef1d8ac5c38b73390bcb7 upstream.

When running `make coccicheck` in report mode using the
add_namespace.cocci file, it will fail for files that contain
MODULE_LICENSE. Those match the replacement precondition, but spatch
errors out as virtual.ns is not set.

In order to fix that, add the virtual rule nsdeps and only do search and
replace if that rule has been explicitly requested.

In order to make spatch happy in report mode, we also need a dummy rule,
as otherwise it errors out with "No rules apply". Using a script:python
rule appears unrelated and odd, but this is the shortest I could come up
with.

Adjust scripts/nsdeps accordingly to set the nsdeps rule when run trough
`make nsdeps`.

Suggested-by: Julia Lawall 
Fixes: c7c4e29fb5a4 ("scripts: add_namespace: Fix coccicheck failed")
Cc: YueHaibing 
Cc: j...@kernel.org
Cc: cocci@systeme.lip6.fr
Cc: sta...@vger.kernel.org
Signed-off-by: Matthias Maennich 
Reported-by: Shuah Khan 
Acked-by: Julia Lawall 
Link: https://lore.kernel.org/r/20200604164145.173925-1-maenn...@google.com
Signed-off-by: Greg Kroah-Hartman 

---
 scripts/coccinelle/misc/add_namespace.cocci |8 +++-
 scripts/nsdeps  |2 +-
 2 files changed, 8 insertions(+), 2 deletions(-)

--- a/scripts/coccinelle/misc/add_namespace.cocci
+++ b/scripts/coccinelle/misc/add_namespace.cocci
@@ -6,6 +6,7 @@
 /// add a missing namespace tag to a module source file.
 ///
 
+virtual nsdeps
 virtual report
 
 @has_ns_import@
@@ -16,10 +17,15 @@ MODULE_IMPORT_NS(ns);
 
 // Add missing imports, but only adjacent to a MODULE_LICENSE statement.
 // That ensures we are adding it only to the main module source file.
-@do_import depends on !has_ns_import@
+@do_import depends on !has_ns_import && nsdeps@
 declarer name MODULE_LICENSE;
 expression license;
 identifier virtual.ns;
 @@
 MODULE_LICENSE(license);
 + MODULE_IMPORT_NS(ns);
+
+// Dummy rule for report mode that would otherwise be empty and make spatch
+// fail ("No rules apply.")
+@script:python depends on report@
+@@
--- a/scripts/nsdeps
+++ b/scripts/nsdeps
@@ -29,7 +29,7 @@ fi
 
 generate_deps_for_ns() {
$SPATCH --very-quiet --in-place --sp-file \
-   $srctree/scripts/coccinelle/misc/add_namespace.cocci -D ns=$1 $2
+   $srctree/scripts/coccinelle/misc/add_namespace.cocci -D nsdeps 
-D ns=$1 $2
 }
 
 generate_deps() {


___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] [PATCH] scripts: add dummy report mode to add_namespace.cocci

2020-08-06 Thread Greg Kroah-Hartman
On Thu, Aug 06, 2020 at 01:48:26PM -0600, Shuah Khan wrote:
> On 6/22/20 10:14 AM, Shuah Khan wrote:
> > On 6/22/20 9:06 AM, Greg Kroah-Hartman wrote:
> > > On Mon, Jun 22, 2020 at 08:46:18AM -0600, Shuah Khan wrote:
> > > > On 6/22/20 2:03 AM, Matthias Maennich wrote:
> > > > > On Thu, Jun 04, 2020 at 02:39:18PM -0600, Shuah Khan wrote:
> > > > > > On 6/4/20 1:31 PM, Julia Lawall wrote:
> > > > > > > 
> > > > > > > 
> > > > > > > On Thu, 4 Jun 2020, Matthias Maennich wrote:
> > > > > > > 
> > > > > > > > When running `make coccicheck` in report mode using the
> > > > > > > > add_namespace.cocci file, it will fail for files that contain
> > > > > > > > MODULE_LICENSE. Those match the replacement precondition, but 
> > > > > > > > spatch
> > > > > > > > errors out as virtual.ns is not set.
> > > > > > > > 
> > > > > > > > In order to fix that, add the virtual rule nsdeps and only
> > > > > > > > do search and
> > > > > > > > replace if that rule has been explicitly requested.
> > > > > > > > 
> > > > > > > > In order to make spatch happy in report mode, we also need a
> > > > > > > > dummy rule,
> > > > > > > > as otherwise it errors out with "No rules
> > > > > > > > apply". Using a script:python
> > > > > > > > rule appears unrelated and odd, but this is the shortest I
> > > > > > > > could come up
> > > > > > > > with.
> > > > > > > > 
> > > > > > > > Adjust scripts/nsdeps accordingly to set the nsdeps rule
> > > > > > > > when run trough
> > > > > > > > `make nsdeps`.
> > > > > > > > 
> > > > > > > > Suggested-by: Julia Lawall 
> > > > > > > > Fixes: c7c4e29fb5a4 ("scripts: add_namespace:
> > > > > > > > Fix coccicheck failed")
> > > > > > > > Cc: YueHaibing 
> > > > > > > > Cc: j...@kernel.org
> > > > > > > > Cc: cocci@systeme.lip6.fr
> > > > > > > > Cc: sta...@vger.kernel.org
> > > > > > > > Signed-off-by: Matthias Maennich 
> > > > > > > 
> > > > > > > Acked-by: Julia Lawall 
> > > > > > > 
> > > > > > > Shuah reported the problem to me, so you could add
> > > > > > > 
> > > > > > > Reported-by: Shuah Khan 
> > > > > > > 
> > > > > > 
> > > > > > Very cool. No errors with this patch. Thanks for fixing it
> > > > > > quickly.
> > > > > 
> > > > > I am happy I could fix that and thanks for confirming. I assume your
> > > > > Tested-by could be added?
> > > > 
> > > > Yes
> > > > 
> > > > Tested-by: Shuah Khan 
> > > > > 
> > > > > Is somebody willing to take this patch through their tree?
> > > > > 
> > > > 
> > > > My guess is that these go through kbuild git??
> > > 
> > > If you want to take this, that's fine with me.  But as I had the
> > > original file come through my tree, I can take it too.  It's up to you,
> > > either is ok with me.
> > > 
> > 
> > Great. Please take this through your tree.
> > 
> 
> Greg! Looks like this one didn't make it in. Can you pick this up?

I think this is 55c7549819e4 ("scripts: add dummy report mode to
add_namespace.cocci") in Linus's tree right now, right?

thanks,

greg k-h
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] [PATCH] scripts: add dummy report mode to add_namespace.cocci

2020-06-22 Thread Greg Kroah-Hartman
On Mon, Jun 22, 2020 at 08:46:18AM -0600, Shuah Khan wrote:
> On 6/22/20 2:03 AM, Matthias Maennich wrote:
> > On Thu, Jun 04, 2020 at 02:39:18PM -0600, Shuah Khan wrote:
> > > On 6/4/20 1:31 PM, Julia Lawall wrote:
> > > > 
> > > > 
> > > > On Thu, 4 Jun 2020, Matthias Maennich wrote:
> > > > 
> > > > > When running `make coccicheck` in report mode using the
> > > > > add_namespace.cocci file, it will fail for files that contain
> > > > > MODULE_LICENSE. Those match the replacement precondition, but spatch
> > > > > errors out as virtual.ns is not set.
> > > > > 
> > > > > In order to fix that, add the virtual rule nsdeps and only
> > > > > do search and
> > > > > replace if that rule has been explicitly requested.
> > > > > 
> > > > > In order to make spatch happy in report mode, we also need a
> > > > > dummy rule,
> > > > > as otherwise it errors out with "No rules apply". Using a 
> > > > > script:python
> > > > > rule appears unrelated and odd, but this is the shortest I
> > > > > could come up
> > > > > with.
> > > > > 
> > > > > Adjust scripts/nsdeps accordingly to set the nsdeps rule
> > > > > when run trough
> > > > > `make nsdeps`.
> > > > > 
> > > > > Suggested-by: Julia Lawall 
> > > > > Fixes: c7c4e29fb5a4 ("scripts: add_namespace: Fix coccicheck failed")
> > > > > Cc: YueHaibing 
> > > > > Cc: j...@kernel.org
> > > > > Cc: cocci@systeme.lip6.fr
> > > > > Cc: sta...@vger.kernel.org
> > > > > Signed-off-by: Matthias Maennich 
> > > > 
> > > > Acked-by: Julia Lawall 
> > > > 
> > > > Shuah reported the problem to me, so you could add
> > > > 
> > > > Reported-by: Shuah Khan 
> > > > 
> > > 
> > > Very cool. No errors with this patch. Thanks for fixing it
> > > quickly.
> > 
> > I am happy I could fix that and thanks for confirming. I assume your
> > Tested-by could be added?
> 
> Yes
> 
> Tested-by: Shuah Khan 
> > 
> > Is somebody willing to take this patch through their tree?
> > 
> 
> My guess is that these go through kbuild git??

If you want to take this, that's fine with me.  But as I had the
original file come through my tree, I can take it too.  It's up to you,
either is ok with me.

thanks

greg k-h
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] console: Complete exception handling in newport_probe()

2020-04-23 Thread Greg Kroah-Hartman
On Fri, Apr 24, 2020 at 01:02:45AM +0800, Dejin Zheng wrote:
> On Thu, Apr 23, 2020 at 05:23:29PM +0200, Markus Elfring wrote:
> > >> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/scripts/coccinelle/free/iounmap.cocci
> > >>
> > >> How do you think about to extend presented software analysis approaches?
> > >>
> > > Sorry, I am not familiar with it, I don't know.
> > 
> > Do you find the comments helpful at the beginning of this SmPL script?
> >
> Sorry, I do not know how to use the SmPL script. 



Please note you are responding to someone who many kernel maintainers,
myself included, have on their blacklist as they are totally unhelpful.
Please feel free to ignore them like the rest of us do.

greg k-h
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] [RFC] scripts: Fix coccicheck failed

2019-10-06 Thread Greg Kroah-Hartman
On Sun, Oct 06, 2019 at 07:34:49AM +0200, Markus Elfring wrote:
> >> Would you like to increase your software development attention for
> >> efficient system configuration on this issue?
> >
> > No.
> 
> Thanks for this information.
> 
> I am still curious if other contributors will care more for this aspect.

No.  Please stop.

greg k-h


Re: [PATCH v2 09/29] docs: driver-model: convert docs to ReST and rename to *.rst

2019-06-21 Thread Greg Kroah-Hartman
On Tue, Jun 18, 2019 at 05:53:27PM -0300, Mauro Carvalho Chehab wrote:
> Convert the various documents at the driver-model, preparing
> them to be part of the driver-api book.
> 
> The conversion is actually:
>   - add blank lines and identation in order to identify paragraphs;
>   - fix tables markups;
>   - add some lists markups;
>   - mark literal blocks;
>   - adjust title markups.
> 
> At its new index.rst, let's add a :orphan: while this is not linked to
> the main index.rst file, in order to avoid build warnings.
> 
> Signed-off-by: Mauro Carvalho Chehab 
> Acked-by: Jeff Kirsher  # ice

Now applied, thanks.

greg k-h


Re: [PATCH] drivers: Inline code in devm_platform_ioremap_resource() from two functions

2019-06-14 Thread Greg Kroah-Hartman
On Fri, Jun 14, 2019 at 11:22:40AM +0200, Markus Elfring wrote:
> From: Markus Elfring 
> Date: Fri, 14 Jun 2019 11:05:33 +0200
> 
> Two function calls were combined in this function implementation.
> Inline corresponding code so that extra error checks can be avoided here.
> 
> Signed-off-by: Markus Elfring 
> ---
>  drivers/base/platform.c | 39 ++-
>  1 file changed, 34 insertions(+), 5 deletions(-)

Hey, looks like you timed out from my kill-file and this snuck through
somehow.  Let me go add you again to it, so I'm not bothered by
pointless stuff like this anymore.

*plonk*



Re: [Cocci] [Outreachy kernel] Re: [PATCH] net: usb: hso.c: remove unneeded DRIVER_LICENSE #define

2017-11-22 Thread Greg Kroah-Hartman
On Wed, Nov 22, 2017 at 10:20:49PM +0100, Julia Lawall wrote:
> 
> 
> On Wed, 22 Nov 2017, Joe Perches wrote:
> 
> > On Fri, 2017-11-17 at 15:19 +0100, Greg Kroah-Hartman wrote:
> > > There is no need to #define the license of the driver, just put it in
> > > the MODULE_LICENSE() line directly as a text string.
> > >
> > > This allows tools that check that the module license matches the source
> > > code license to work properly, as there is no need to unwind the
> > > unneeded dereference.
> > []
> > > diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
> > []
> > > @@ -76,7 +76,6 @@
> > >
> > >  #define MOD_AUTHOR   "Option Wireless"
> > >  #define MOD_DESCRIPTION  "USB High Speed Option driver"
> > > -#define MOD_LICENSE  "GPL"
> > >
> > >  #define HSO_MAX_NET_DEVICES  10
> > >  #define HSO__MAX_MTU 2048
> > > @@ -3288,7 +3287,7 @@ module_exit(hso_exit);
> > >
> > >  MODULE_AUTHOR(MOD_AUTHOR);
> > >  MODULE_DESCRIPTION(MOD_DESCRIPTION);
> > > -MODULE_LICENSE(MOD_LICENSE);
> > > +MODULE_LICENSE("GPL");
> >
> > Probably all of these MODULE_(MOD_) uses could be
> > simplified as well.
> >
> > Perhaps there's utility in a (cocci?) script that looks for
> > used-once
> > macro #defines in various types of macros.
> 
> What about module_version, eg:
> 
> diff -u -p a/drivers/ata/pata_pdc202xx_old.c
> b/drivers/ata/pata_pdc202xx_old.c
> --- a/drivers/ata/pata_pdc202xx_old.c
> +++ b/drivers/ata/pata_pdc202xx_old.c
> @@ -21,7 +21,6 @@
>  #include 
> 
>  #define DRV_NAME "pata_pdc202xx_old"
> -#define DRV_VERSION "0.4.3"
> 
>  static int pdc2026x_cable_detect(struct ata_port *ap)
>  {
> @@ -389,4 +388,4 @@ MODULE_AUTHOR("Alan Cox");
>  MODULE_DESCRIPTION("low-level driver for Promise 2024x and 20262-20267");
>  MODULE_LICENSE("GPL");
>  MODULE_DEVICE_TABLE(pci, pdc202xx);
> -MODULE_VERSION(DRV_VERSION);
> +MODULE_VERSION("0.4.3");

I've just deleted MODULE_VERSION() entirely from some subsystems, as
once the driver is in the kernel source tree, the "version" makes almost
no sense at all.

But I know some companies love incrementing it (some network and scsi
drivers specifically), so those might want to keep it around for some
odd reason.

thanks

greg k-h
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] [PATCH] net: usb: hso.c: remove unneeded DRIVER_LICENSE #define

2017-11-22 Thread Greg Kroah-Hartman
On Wed, Nov 22, 2017 at 09:05:36AM -0800, Joe Perches wrote:
> On Fri, 2017-11-17 at 15:19 +0100, Greg Kroah-Hartman wrote:
> > There is no need to #define the license of the driver, just put it in
> > the MODULE_LICENSE() line directly as a text string.
> > 
> > This allows tools that check that the module license matches the source
> > code license to work properly, as there is no need to unwind the
> > unneeded dereference.
> []
> > diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
> []
> > @@ -76,7 +76,6 @@
> >  
> >  #define MOD_AUTHOR "Option Wireless"
> >  #define MOD_DESCRIPTION"USB High Speed Option driver"
> > -#define MOD_LICENSE"GPL"
> >  
> >  #define HSO_MAX_NET_DEVICES10
> >  #define HSO__MAX_MTU   2048
> > @@ -3288,7 +3287,7 @@ module_exit(hso_exit);
> >  
> >  MODULE_AUTHOR(MOD_AUTHOR);
> >  MODULE_DESCRIPTION(MOD_DESCRIPTION);
> > -MODULE_LICENSE(MOD_LICENSE);
> > +MODULE_LICENSE("GPL");
> 
> Probably all of these MODULE_(MOD_) uses could be
> simplified as well.

Agreed, I did that for a bunch of USB drivers, need to do it for others
as well.

thanks,

greg k-h
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] [PATCH 1/2] firmware: Google VPD: import lib_vpd source files

2017-04-11 Thread Greg Kroah-Hartman
On Tue, Apr 11, 2017 at 11:15:54AM -0700, Joe Perches wrote:
> On Tue, 2017-04-11 at 16:09 +0200, Greg Kroah-Hartman wrote:
> > Care to use "real" kernel variable types please?  u8, u16, and others
> > are you friend, uint8_t really isn't what we prefer, and checkpatch
> > should tell you that...
> 
> checkpatch doesn't warn about "u?int\d+_t" types unless
> --strict is enabled and most likely it shouldn't.

For brand new drivers, it's a good thing to run, to keep maintainers
from complaining about obvious things :)

thanks,

greg k-h
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci


Re: [Cocci] [PATCH 1/1] staging - rtl8188eu: Deletion of unnecessary checks before three function calls

2014-10-31 Thread Greg Kroah-Hartman
On Thu, Oct 23, 2014 at 09:20:29PM +0200, SF Markus Elfring wrote:
 From 45970693cad6c12da2d5ac7da3d2bd7a566170d7 Mon Sep 17 00:00:00 2001
 From: Markus Elfring elfr...@users.sourceforge.net
 Date: Thu, 23 Oct 2014 20:55:13 +0200
 Subject: [PATCH] staging - rtl8188eu: Deletion of unnecessary checks before
  three function calls

Why is this here?  Please use git send-email to send a patch, so I don't
have to hand-edit the text in it.

Also, your Subject is a bit odd, it has a Re: in it for no reason, and
your From: doesn't match the name you used here.

Please fix up and resend.

thanks,

greg k-h
___
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci