diff mbox series

patman: use new --u-boot option with checkpath.pl

Message ID 20200606213103.26605-1-daniel.schwierzeck@gmail.com
State New
Headers show
Series patman: use new --u-boot option with checkpath.pl | expand

Commit Message

Daniel Schwierzeck June 6, 2020, 9:31 p.m. UTC
checkpatch.pl now supports a --u-boot option for U-Boot specific
checks. Use that in patman to check the patch series.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck at gmail.com>

---

 tools/patman/checkpatch.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Simon Glass June 7, 2020, 2:02 a.m. UTC | #1
Hi Daniel,

On Sat, 6 Jun 2020 at 15:31, Daniel Schwierzeck
<daniel.schwierzeck at gmail.com> wrote:
>
> checkpatch.pl now supports a --u-boot option for U-Boot specific
> checks. Use that in patman to check the patch series.
>
> Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck at gmail.com>
>
> ---
>
>  tools/patman/checkpatch.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/patman/checkpatch.py b/tools/patman/checkpatch.py
> index 795b519314..7f507154b8 100644
> --- a/tools/patman/checkpatch.py
> +++ b/tools/patman/checkpatch.py
> @@ -64,7 +64,7 @@ def CheckPatch(fname, verbose=False):
>      result.problems = []
>      chk = FindCheckPatch()
>      item = {}
> -    result.stdout = command.Output(chk, '--no-tree', fname,
> +    result.stdout = command.Output(chk, '--no-tree', '--u-boot', fname,
>                                     raise_on_error=False)

Can we make this conditional on something? Maybe detecting a U-Boot
tree? Patman is used for linux and Zephyr, for example.

>      #pipe = subprocess.Popen(cmd, stdout=subprocess.PIPE)
>      #stdout, stderr = pipe.communicate()
> --
> 2.27.0
>

Regards,
Simon
Simon Glass June 7, 2020, 3:44 a.m. UTC | #2
Hi Daniel,

On Sat, 6 Jun 2020 at 20:02, Simon Glass <sjg at chromium.org> wrote:
>
> Hi Daniel,
>
> On Sat, 6 Jun 2020 at 15:31, Daniel Schwierzeck
> <daniel.schwierzeck at gmail.com> wrote:
> >
> > checkpatch.pl now supports a --u-boot option for U-Boot specific
> > checks. Use that in patman to check the patch series.
> >
> > Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck at gmail.com>
> >
> > ---
> >
> >  tools/patman/checkpatch.py | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/patman/checkpatch.py b/tools/patman/checkpatch.py
> > index 795b519314..7f507154b8 100644
> > --- a/tools/patman/checkpatch.py
> > +++ b/tools/patman/checkpatch.py
> > @@ -64,7 +64,7 @@ def CheckPatch(fname, verbose=False):
> >      result.problems = []
> >      chk = FindCheckPatch()
> >      item = {}
> > -    result.stdout = command.Output(chk, '--no-tree', fname,
> > +    result.stdout = command.Output(chk, '--no-tree', '--u-boot', fname,
> >                                     raise_on_error=False)
>
> Can we make this conditional on something? Maybe detecting a U-Boot
> tree? Patman is used for linux and Zephyr, for example.

Actually I just remembered that I was hoping we could just adjust the
.checkpatch.conf file in the U-Boot directory to add the option. Would
that work?

>
> >      #pipe = subprocess.Popen(cmd, stdout=subprocess.PIPE)
> >      #stdout, stderr = pipe.communicate()
> > --
> > 2.27.0
> >

Regards,
Simon
Daniel Schwierzeck June 7, 2020, 2:14 p.m. UTC | #3
Am 07.06.20 um 05:44 schrieb Simon Glass:
> Hi Daniel,
> 
> On Sat, 6 Jun 2020 at 20:02, Simon Glass <sjg at chromium.org> wrote:
>>
>> Hi Daniel,
>>
>> On Sat, 6 Jun 2020 at 15:31, Daniel Schwierzeck
>> <daniel.schwierzeck at gmail.com> wrote:
>>>
>>> checkpatch.pl now supports a --u-boot option for U-Boot specific
>>> checks. Use that in patman to check the patch series.
>>>
>>> Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck at gmail.com>
>>>
>>> ---
>>>
>>>  tools/patman/checkpatch.py | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/tools/patman/checkpatch.py b/tools/patman/checkpatch.py
>>> index 795b519314..7f507154b8 100644
>>> --- a/tools/patman/checkpatch.py
>>> +++ b/tools/patman/checkpatch.py
>>> @@ -64,7 +64,7 @@ def CheckPatch(fname, verbose=False):
>>>      result.problems = []
>>>      chk = FindCheckPatch()
>>>      item = {}
>>> -    result.stdout = command.Output(chk, '--no-tree', fname,
>>> +    result.stdout = command.Output(chk, '--no-tree', '--u-boot', fname,
>>>                                     raise_on_error=False)
>>
>> Can we make this conditional on something? Maybe detecting a U-Boot
>> tree? Patman is used for linux and Zephyr, for example.
> 
> Actually I just remembered that I was hoping we could just adjust the
> .checkpatch.conf file in the U-Boot directory to add the option. Would
> that work?
> 

hm, missed that earlier but you already added that with commit
b77df5980c3e24e34e0db3a52c5bce396a81c430. Then you can ignore this patch ;)
Simon Glass June 7, 2020, 7:37 p.m. UTC | #4
Hi Daniel,

On Sun, 7 Jun 2020 at 08:15, Daniel Schwierzeck
<daniel.schwierzeck at gmail.com> wrote:
>
>
>
> Am 07.06.20 um 05:44 schrieb Simon Glass:
> > Hi Daniel,
> >
> > On Sat, 6 Jun 2020 at 20:02, Simon Glass <sjg at chromium.org> wrote:
> >>
> >> Hi Daniel,
> >>
> >> On Sat, 6 Jun 2020 at 15:31, Daniel Schwierzeck
> >> <daniel.schwierzeck at gmail.com> wrote:
> >>>
> >>> checkpatch.pl now supports a --u-boot option for U-Boot specific
> >>> checks. Use that in patman to check the patch series.
> >>>
> >>> Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck at gmail.com>
> >>>
> >>> ---
> >>>
> >>>  tools/patman/checkpatch.py | 2 +-
> >>>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>>
> >>> diff --git a/tools/patman/checkpatch.py b/tools/patman/checkpatch.py
> >>> index 795b519314..7f507154b8 100644
> >>> --- a/tools/patman/checkpatch.py
> >>> +++ b/tools/patman/checkpatch.py
> >>> @@ -64,7 +64,7 @@ def CheckPatch(fname, verbose=False):
> >>>      result.problems = []
> >>>      chk = FindCheckPatch()
> >>>      item = {}
> >>> -    result.stdout = command.Output(chk, '--no-tree', fname,
> >>> +    result.stdout = command.Output(chk, '--no-tree', '--u-boot', fname,
> >>>                                     raise_on_error=False)
> >>
> >> Can we make this conditional on something? Maybe detecting a U-Boot
> >> tree? Patman is used for linux and Zephyr, for example.
> >
> > Actually I just remembered that I was hoping we could just adjust the
> > .checkpatch.conf file in the U-Boot directory to add the option. Would
> > that work?
> >
>
> hm, missed that earlier but you already added that with commit
> b77df5980c3e24e34e0db3a52c5bce396a81c430. Then you can ignore this patch ;)

Ah OK. Does it work correctly for you?

Regards,
Simon
diff mbox series

Patch

diff --git a/tools/patman/checkpatch.py b/tools/patman/checkpatch.py
index 795b519314..7f507154b8 100644
--- a/tools/patman/checkpatch.py
+++ b/tools/patman/checkpatch.py
@@ -64,7 +64,7 @@  def CheckPatch(fname, verbose=False):
     result.problems = []
     chk = FindCheckPatch()
     item = {}
-    result.stdout = command.Output(chk, '--no-tree', fname,
+    result.stdout = command.Output(chk, '--no-tree', '--u-boot', fname,
                                    raise_on_error=False)
     #pipe = subprocess.Popen(cmd, stdout=subprocess.PIPE)
     #stdout, stderr = pipe.communicate()